In an abelian category $\mathcal A$ with enough projectives, we have the Yoneda pairing $$\operatorname{Ext}^p_{\mathcal A}(Y,Z)\otimes \operatorname{Ext}_{\mathcal A}^q(X,Y)\longrightarrow \operatorname{Ext}_{\mathcal A}^{p+q}(X,Z),$$ $$a\otimes b \mapsto a\smile b.$$ This pairing induces a graded algebra structure on $\operatorname{Ext}_{\mathcal A}^*(X,X)$ for any object $X$.

I'm interested in finding conditions on a given class $b\in \operatorname{Ext}_{\mathcal A}(X,X)^q$, $q>0$, ensuring that
$$-\smile b\colon \operatorname{Ext}_{\mathcal A}^p(X,X)\longrightarrow \operatorname{Ext}_{\mathcal A}^{p+q}(X,X)$$
is an isomorphism for $p>0$ and surjective for $p=0$. I would appreciate (but I'm not restricted to) conditions related to a $q$-fold extension
$$X\hookrightarrow P_q\rightarrow \cdots\rightarrow P_0\twoheadrightarrow X$$
representing $b$. Notice that this can only happen if $X$ is projective (in this case it's trivial) or of *infinite* projective dimension.

A sufficient condition would be that we can take all $P_i$ projective, $i=1,\dots,q$. I don't know if this condition is necessary. Of course, we can always take $P_i$ projective for $i=1,\dots, q-1$ (not including $q$), but what would then be (necessary and sufficient, if possible) conditions on $P_q$ so that the above property holds? Would it be enough that $P_q$ be of *finite* projective dimension?

I'm mostly interested in $\mathcal A=$ the category of bimodules over a $k$-algebra $R$ and $X=R$ as a bimodule, so $\operatorname{Ext}_{\mathcal A}^*(X,X)$ would be the Hochschild cohomology of $R$ if it is $k$-projective.