  The goal of this article is to provide an explicit algorithmic construction
of formal $F$-manifold structures, formal Frobenius manifold structures, and
higher residue pairings on the primitive middle-dimensional cohomology
$\mathbb{H}$ of a smooth projective Calabi-Yau complete intersection variety
$X$ defined by homogeneous polynomials $G_1(\underline x), \dots,
G_k(\underline x)$. Our main method is to analyze a certain dGBV (differential
Gerstenhaber-Batalin-Vilkovisky) algebra $\mathcal{A}$ obtained from the
twisted de Rham complex which computes $\mathbb{H}$. More explicitly, we
introduce a notion of \textit{a weak primitive form} associated to a solution
of the Maurer-Cartan equation of $\mathcal{A}$ and the Gauss-Manin connection,
which is a weakened version of Saito's primitive form (\cite{Saito}). In
addition, we provide an explicit algorithm for a weak primitive form based on
the Gr\"obner basis in order to achieve our goal. Our approach through the weak
primitive form can be viewed as a unifying link (based on Witten's gauged
linear sigma model, \cite{W93}) between the Barannikov-Kontsevich's approach to
Frobenius manifolds via dGBV algebras (non-linear topological sigma model,
\cite{BK}) and Saito's approach to Frobenius manifolds via primitive forms and
higher residue pairings (Landau-Ginzburg model, \cite{ST}).
