\begin{center}
  \def\tgtwidth{0.8\textwidth}
  \begin{tikzpicture}
    \tikzstyle{ynode} = [fill=black!5!white,rounded corners=5pt,minimum width=\tgtwidth,inner sep=4pt,align=left,text width=\tgtwidth]
    \begin{scope}
      \node (input) at (0,0) {\large{$\mathbf{x}$}};
      \node [ynode, anchor=west] (note) at ([xshift=.2cm]input.east) {
        \begin{varwidth}{\textwidth}
          \footnotesize{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) {
        \setstretch{2.2}\\\footnotesize{There are three tips for improving accuracy in solving math problems: \\
          1.Practice regularly. \\
          2.Understand the concepts. \\
          3.Double-check your work. \\}
      };
      \node [anchor=east](y1) at ([xshift=-.2cm]output1.west) {\large{$\mathbf{y}$}};

      \node [fill=lolred!50, anchor=south west,minimum height=.45cm,inner sep=1pt] (label1) at ([xshift=6.85cm,yshift=-.65cm]output1.north west) {\scriptsize{Intermediate Reward: +1}};
      \draw [-,lolred!50,line width=1.5pt] ([yshift=-.2pt]label1.north west) -- ([yshift=-.90cm]label1.north west);

      \node [fill=lolred!50, anchor=south west,minimum height=.45cm,inner sep=1pt] (label1) at ([xshift=4.05cm,yshift=-2.25cm]output1.north west) {\scriptsize{Intermediate Reward: +1}};
      \draw [-,line width=1.5pt,lolred!50] ([yshift=-.2pt]label1.north west) -- ([yshift=-.78cm]label1.north west);

      \node [fill=lolblue!50, anchor=south west,minimum height=.45cm,inner sep=1pt] (label1) at ([xshift=4.1cm,yshift=-3.05cm]output1.north west) {\scriptsize{Delayed Reward: +10.6}};
      \draw [-,line width=1.5pt,lolblue!50] ([yshift=-.2pt]label1.north west) -- ([yshift=-.75cm]label1.north west);

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