\begin{center}
  \def\tgtwidth{0.5\textwidth}
  \begin{tikzpicture}
    \tikzstyle{ynode} = [draw,rounded corners=4pt, minimum width=\tgtwidth,inner sep=4pt,align=left,text width=\tgtwidth]
    \begin{scope}
      \node (input) at (0,0) {$\mathbf{x}$};
      \node [ynode, anchor=west] (note) at ([xshift=.2cm]input.east) {
        \begin{varwidth}{\textwidth}
          \scriptsize{Give me three tips to improve my accuracy in solving math problems.}
        \end{varwidth}
      };
      \node [ynode,anchor=north west] (output1) at ([yshift=-.2cm]note.south west) {
          \scriptsize{There are three tips for improving accuracy in solving math problems: \\
            1.Practice regularly. \\
            2.Understand the concepts. \\
            3.Double-check your work. \\
            \textbf{\{Total Tokens: 20\}}}
      };
      \node [anchor=east](y1) at ([xshift=-.2cm]output1.west) {$\mathbf{y}_1$};
      \node [ynode,anchor=north] (output2) at ([yshift=-.2cm]output1.south) {
          \scriptsize{Improving accuracy in solving math problems is crucial for success in mathematics. Here are three tips that can help: \\
            1.Practice regularly: \\
            ~~~- Consistent practice builds fluency and familiarity with different problem types. \\
            ... \\
            By combining your advice with these additional tips, anyone can significantly enhance their math problem-solving abilities. \\
            \textbf{\{Total Tokens: 320\}}}
      };
      \node [anchor=east](y2) at ([xshift=-.2cm]output2.west) {$\mathbf{y}_2$};
      \node [ynode,anchor=north] (output3) at ([yshift=-.2cm]output2.south) {
          \scriptsize{Improving math accuracy requires careful attention to detail, strategic problem-solving techniques, and consistent practice. Here are three tips: \\
            1.Practice regularly: \\
            ~~~- Mathematics is a skill, and like any skill, it improves with consistent practice.... \\
            ... \\
            This is a great approach for anyone looking to improve their math skills, from students to professionals. \\
            \textbf{\{Total Tokens: 800\}}}
      };
      \node [anchor=east](y3) at ([xshift=-.2cm]output3.west) {$\mathbf{y}_3$};
      \begin{axis}[
        compat=1.3,
        anchor=north west,
        at={(output1.north east)},
        axis x line=bottom,axis y line=left,
        xshift=1.4cm,
        yshift=-1cm,
        xtick={0,1,2,3},
        xticklabels={$\mathbf{y}_1$,$\mathbf{y}_2$,$\mathbf{y}_3$,$\cdots$},
        every tick label/.append style={font=\footnotesize},
        every axis label/.append style={font=\footnotesize},
        xtick distance=.1cm,
        ymin=0,
        ymax=.6,
        ylabel=$\mathrm{Pr}_{\theta}(\mathbf{y}|\mathbf{x})$,
        ylabel shift=-.1cm,
        enlarge x limits=0.3,
        width=5cm,
        height=4cm,
        ybar]
        \addplot[fill=lolblue,draw=none] coordinates {
          (0, .5)
          (1, .3)
          (2, .1)
          (3, .1)
        };        
      \end{axis}

      \begin{axis}[
        compat=1.3,
        anchor=south west,
        at={(output3.south east)},
        axis x line=bottom,axis y line=left,
        xshift=1.4cm,
        yshift=.5cm,
        xtick={0,1,2,3},
        xticklabels={$\mathbf{y}_1$,$\mathbf{y}_2$,$\mathbf{y}_3$,$\cdots$},
        every tick label/.append style={font=\footnotesize},
        every axis label/.append style={font=\footnotesize},
        xtick distance=.1cm,
        ymin=0,
        ymax=.6,
        ylabel=$\mathrm{Pr}_{\theta}(\mathbf{y}|\mathbf{x})$,
        ylabel shift=-.1cm,
        enlarge x limits=0.3,
        width=5cm,
        height=4cm,
        ybar]
        \addplot [fill=lolblue,draw=none] coordinates {
          (0, .1)
          (1, .3)
          (2, .5)
          (3, .1)
        };
      \end{axis}

      \matrix [
      matrix anchor=north,
      matrix of nodes,
      nodes={inner sep=2pt},
      column sep=.1cm,
      inner sep=0,
      ] at ([xshift=3cm,yshift=0cm]note.north east) {
        \hspace{-0.25cm} \footnotesize{$R(\mathbf{y}_1)=2$} \\
        \footnotesize{$R(\mathbf{y}_2)=32$} \\
        \footnotesize{$R(\mathbf{y}_3)=80$} \\
      };
      \node at ([xshift=2.03cm,yshift=-1.2cm]output1.north east) {\color{lolred}{\faTimes}};
      \node at ([xshift=3.5cm,yshift=-2.85cm]output1.north east) {\color{lolgreen}{\faCheck}};
      \node at ([xshift=2.03cm,yshift=1.1cm]output3.south east) {\color{lolred}{\faTimes}};
      \node at ([xshift=3.5cm,yshift=+2.70cm]output3.south east) {\color{lolgreen}{\faCheck}};
      \draw [->,thick] ([xshift=3cm,yshift=-4cm]output1.north east) -- node [right,align=left] {
        \scriptsize{Increase the probability} \\[-1mm]
        \scriptsize{of longer outputs;} \\ [-1mm]
        \scriptsize{Decrease the probability} \\[-1mm]
        \scriptsize{of shorter outputs} 
      }([xshift=3cm,yshift=3.2cm]output3.south east);

    \end{scope}
  \end{tikzpicture}
\end{center}
