Let $\pi \colon X \to S$ be a smooth projective morphism of algebraic varieties, say over $\mathbf C$. By Deligne's argument ("Théorème de Lefschetz...", 1968), there is for each $i$ an injection $$ \newcommand{\Q}{\mathbf{Q}} R^i \pi_\ast\Q[-i] \hookrightarrow R\pi_\ast\Q,$$ such that the direct sum of all these gives a quasi-isomorphism between $R\pi_\ast\Q$ and its cohomology.
Question: Can this construction be made compatible with cup-product? That is, can one choose these injections so that the diagram $$ \begin{matrix} R^i\pi_\ast\Q[-i] \otimes R^j\pi_\ast\Q[-j] & \to & R^{i+j}\pi_\ast\Q[-i-j] \\\\ \downarrow & & \downarrow \\\\ R\pi_\ast\Q \otimes R\pi_\ast\Q & \to & R\pi_\ast\Q \end{matrix}$$ commutes? If not, can one write down an obstruction?
The question is motivated by the fact that the fibers are compact Kähler manifolds, hence formal by Deligne-Griffiths-Morgan-Sullivan. So on each fiber $X_s$, we have a quasi-isomorphism with the cohomology when both are considered as dg algebras. Hence an affirmative answer would be a version of DGMS's result which is moreover valid in families.