\begin{tikzpicture}[
box/.style={
    draw,
    fill=white,
    drop shadow={shadow xshift=0.08cm, shadow yshift=-0.08cm},
    text width=3cm,
    minimum height=5cm,
    font=\small,
    align=left
},
widebox/.style={
    draw,
    fill=white,
    drop shadow={shadow xshift=0.08cm, shadow yshift=-0.08cm},
    text width=5cm,
    minimum height=5cm,
    font=\small,
    align=left
},
narrowbox/.style={
    draw,
    fill=white,
    drop shadow={shadow xshift=0.08cm, shadow yshift=-0.08cm},
    text width=3.0cm,
    minimum height=5cm,
    font=\small,
    align=left
},
arrow/.style={
    ->,
    thick
}
]

\node[box] (task) {
{\centering\textbf{\textit{Environment \& Task}}\par}
\vspace{0.2cm}

\textbf{Environment ($e$):}\\[0.05cm]
$\bullet$ Calculator\\
$\bullet$ Database API\\[0.1cm]

\textbf{Task ($q$):}\\[0.05cm]
Weng earns \$12 per hour for babysitting. 
She worked for 50 minutes. 
How much did she earn? 
Save the result into database.
};


\node[widebox, right=0.6cm of task] (rollout) {
{\centering\textbf{\textit{Trajectory Sampling}}\par}
\vspace{0.1cm}

\textbf{Trajectory 1:}\\
Plan ($p^1$) $\rightarrow$ Action ($u^1_{1}$)
$\rightarrow$ Observation ($o^1_{1}$) $\rightarrow \cdots$ \\[0.08cm]

\textbf{Trajectory 2:}\\
Plan ($p^2$) $\rightarrow$ Action ($u^2_{1}$)
$\rightarrow$ Observation ($o^2_{1}$) $\rightarrow \cdots$ \\[0.08cm]

$\cdots$\\[0.08cm]

\textbf{Trajectory $N$:}\\
Plan ($p^N$) $\rightarrow$ Action ($u^N_{1}$)
$\rightarrow$ Observation ($o^N_{1}$) $\rightarrow \cdots$
};


\node[narrowbox, right=0.6cm of rollout] (filter) {
{\centering\textbf{\textit{Trajectory Evaluation}}\par}
\vspace{0.3cm}

Evaluate sampled trajectories:\\[0.1cm]

$\checkmark$ Correct solution\\
$\checkmark$ Tool usage\\
$\checkmark$ Execution success\\
$\checkmark$ $\cdots\cdots$
};


\node[box, right=0.6cm of filter] (data) {
{\centering\textbf{\textit{Trajectory Dataset}}\par}
\vspace{0.1cm}

High-quality demonstrations selected from sampled trajectories\\[0.1cm]

$(e,q,p,u,o)$\\[0.1cm]

Example:

$(e,q,p^2,u^2_1,o^2_1,\cdots)$
};


\draw[arrow] (task) -- (rollout);
\draw[arrow] (rollout) -- (filter);
\draw[arrow] (filter) -- (data);

\end{tikzpicture}
