\definecolor{temp2}{RGB}{196,204,223}
\definecolor{temp3}{RGB}{168,208,142}
\definecolor{temp4}{RGB}{250,235,243}
\usetikzlibrary {shapes.arrows}

\begin{center}
  \begin{tikzpicture} [
    box/.style={rounded corners=6pt, align=center, minimum height=1.2cm,anchor=center},
    phasebox/.style={sharp corners,draw,thick,align=center,minimum height=0.8cm,anchor=center,text width=4.2cm,fill=white,drop shadow={fill=gray,shadow xshift=.6ex,shadow yshift=-.6ex}},
    box1/.style={box,sharp corners,align=left, minimum height=3.5cm,anchor=center,text width=4.6cm,fill=white},
    box2/.style={box,rounded corners=6pt,align=left, minimum height=3.8cm,anchor=center,minimum width=5cm,fill=temp2}
    ]

    \begin{scope}

      % \path[use as bounding box] (-11.4cm,-6.4cm) rectangle (11.4cm,1.25cm);
      \scriptsize
      \node [phasebox] (phase-1) at (0,0) {\textit{\textbf{Stage 1: Pre-training with \\ Textual Preference Data}}};
      \node [phasebox] (phase-2) at ([xshift=5.5cm]phase-1.center) {\textit{\textbf{Stage 2: Fine-tuning with Image \\ Caption-based Preference Data}}};
      \node [phasebox] (phase-3) at ([xshift=5.5cm]phase-2.center) {\textit{\textbf{Stage 3: Fine-tuning with \\ Visual Preference Data}}};

      \node [box2] (box-1) at ([yshift=-3.6cm]phase-1.center) {};
      \node [box1] (box-2) at (box-1)
      {\textit{\underline{Instruction}}: Can you determine the missing number in the sequence: 2, 6, 14, 30, 62, \_\_? \\ ~ \\
        \textit{\underline{Chosen Response}}: The missing number in the sequence is 126.\\ \textit{\underline{Rejected Response}}: The sequence is 6.};

      \node [box2] (box-3) at ([yshift=-3.6cm]phase-2.center) {};
      \node [box1] (box-4) at (box-3)
      {\textit{\underline{Instruction}}: Describe the image in detail.\\ \textit{\underline{Image Caption}}: There are four mangosteens,
        one of which has been cut open.\\ \textit{\underline{Chosen Response}}: There are several \textcolor{temp3}{mangosteens} on a \textcolor{temp3}{wooden table}.\\
        \textit{\underline{Rejected Response}}: This is a dark fruit, possibly a variety of \textcolor{red}{pitaya}.\\};

      \node [box2] (box-5) at ([yshift=-3.6cm]phase-3.center) {};
      \node [box1] (box-6) at (box-5)
      {\includegraphics{section7/Figures/mangosteens.jpg}\\\textit{\underline{Chosen Response}}: There are several \textcolor{temp3}{mangosteens} on a \textcolor{temp3}{wooden table}.\\
        \textit{\underline{Rejected Response}}: This is a dark fruit, possibly a variety of \textcolor{red}{pitaya}.\\};
      \node [text width=2.5cm,anchor=north,align=left] at ([xshift=1.1cm,yshift=-.5cm]box-6.north)
      {\textit{\underline{Instruction}}: Describe the image in detail.};

      \node[draw,fill=temp4,minimum height=1cm,minimum width=0.75cm,single arrow,anchor=south,shape border rotate=90,single arrow head extend=0.12cm,] (arrow) at ([yshift=0.1cm]box-1.north) {};
      \node[draw,fill=temp4,minimum height=1cm,minimum width=0.75cm,single arrow,anchor=south,shape border rotate=90,single arrow head extend=0.12cm,] (arrow) at ([yshift=0.1cm]box-3.north) {};
      \node[draw,fill=temp4,minimum height=1cm,minimum width=0.75cm,single arrow,anchor=south,shape border rotate=90,single arrow head extend=0.12cm,] (arrow) at ([yshift=0.1cm]box-5.north) {};

      \draw[line width=0.35mm,arrows = {-Stealth[inset=0pt, length=0.2cm, angle'=45]}] (phase-1.east) to ([xshift=0.18cm]phase-1.east)
      to [out=90,in=180] ($1/2*(phase-1.east)+1/2*(phase-2.west)+(-0.1cm,0.35cm)$) to [out=0,in=90] ([xshift=-0.38cm]phase-2.west) to (phase-2.west);
      \draw[line width=0.2mm] ($1/2*(phase-1.east)+1/2*(phase-2.west)+(-0.1cm,0.6cm)$) .. controls +(-0.5cm,-1.4cm) and +(+0.5cm,1.4cm) .. ($1/2*(phase-1.east)+1/2*(phase-2.west)+(-0.3cm,-0.4cm)$);
      \draw[line width=0.2mm] ($1/2*(phase-1.east)+1/2*(phase-2.west)+(0.1cm,0.6cm)$) .. controls +(-0.5cm,-1.4cm) and +(+0.5cm,1.4cm) .. ($1/2*(phase-1.east)+1/2*(phase-2.west)+(-0.1cm,-0.4cm)$);
      \node at ([yshift=-0.7cm]$1/2*(phase-1.east)+1/2*(phase-2.west)$) {Bridging Task Gap};

      \draw[line width=0.35mm,arrows = {-Stealth[inset=0pt, length=0.2cm, angle'=45]}] (phase-2.east) to ([xshift=0.18cm]phase-2.east)
      to [out=90,in=180] ($1/2*(phase-2.east)+1/2*(phase-3.west)+(-0.1cm,0.35cm)$) to [out=0,in=90] ([xshift=-0.38cm]phase-3.west) to (phase-3.west);
      \draw[line width=0.2mm] ($1/2*(phase-2.east)+1/2*(phase-3.west)+(-0.1cm,0.6cm)$) .. controls +(-0.5cm,-1.4cm) and +(+0.5cm,1.4cm) .. ($1/2*(phase-2.east)+1/2*(phase-3.west)+(-0.3cm,-0.4cm)$);
      \draw[line width=0.2mm] ($1/2*(phase-2.east)+1/2*(phase-3.west)+(0.1cm,0.6cm)$) .. controls +(-0.5cm,-1.4cm) and +(+0.5cm,1.4cm) .. ($1/2*(phase-2.east)+1/2*(phase-3.west)+(-0.1cm,-0.4cm)$);
      \node at ([yshift=-0.7cm]$1/2*(phase-2.east)+1/2*(phase-3.west)$) {Bridging Modality Gap };

    \end{scope}

  \end{tikzpicture}

\end{center}
