Commit 71f5dbb2 by wangchenglong

update.

parent ec97a80c
No preview for this file type
\section{Preliminary} \section{Preliminary}
\label{sec:preliminary}
\subsection{Fundamentals of Large Language Models} \subsection{Fundamentals of Large Language Models}
In this subsection, we introduce the fundamentals of supervised fine-tuning for LLMs and focus on presenting the key concepts and nations necessary for the discussions in future sections. In this subsection, we introduce the fundamentals of supervised fine-tuning for LLMs and focus on presenting the key concepts and nations necessary for the discussions in future sections.
......
\begin{tikzpicture}[
box/.style={
draw,
fill=white,
drop shadow={shadow xshift=0.08cm, shadow yshift=-0.08cm},
text width=3cm,
minimum height=2.8cm,
font=\small,
align=left
},
widebox/.style={
draw,
fill=white,
drop shadow={shadow xshift=0.08cm, shadow yshift=-0.08cm},
text width=5cm,
minimum height=2.8cm,
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=2.8cm,
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}
\ No newline at end of file
...@@ -45,13 +45,24 @@ $\cdots \cdots$ ...@@ -45,13 +45,24 @@ $\cdots \cdots$
\end{tcolorbox} \end{tcolorbox}
\begin{figure} \begin{figure*}[!t]
\centering \centering
\caption{111} \resizebox{\linewidth}{!}{
\label{fig:agent-planning-sft} \input{section6/Figures/agent-planning-sft}}
\end{figure} \caption{Overview of data construction for improving agent planning.}
\label{fig:agent-planning-sft}
\end{figure*}
One commonly used approach to improve the planning capability of LLM-based agents is SFT \citep{chen-etal:fireact,zhang-etal:agentohana}. As illustrated in Figure \ref{fig:agent-planning-sft}, this process typically consists of three stages: 1) preparing environments and planning tasks; 2) synthesizing expert-level trajectories, which consist of sequences of action-observation pairs, on these tasks; and 3) instruction-tuning LLMs using the synthesized trajectory data. Specifically, expert trajectories can be generated by leveraging state-of-the-art LLMs as agent policies and selecting high-quality trajectories based on predefined reward signals or task success criteria. Through this process, LLMs can acquire planning behaviors from demonstrations and improve their ability to generate structured execution plans. Based on this procedure, we can construct SFT data for enhancing the planning capability of LLM-based agents. Specifically, each training instance consists of an input-output pair:
\begin{eqnarray}
\mathbf{x} &=& \{e,q\} \\
\mathbf{y} &=& \{p,u_1,o_1,\cdots,u_T,o_T\}
\end{eqnarray}
where $e$ denotes the environment information, including available tools and external resources, and $q$ represents the task description provided by users. $p$ denotes the generated plan that decomposes the task into intermediate steps. $u_t$ and $o_t$ represent the agent's behavior and the corresponding observation from the environment at the $t$-th interaction step, respectively. Specifically, $u_t$ denotes the executable behavior performed by the agent, such as tool invocation, while $o_t$ denotes the feedback returned by the environment after executing $u_t$. Therefore, $\{u_1,o_1,\cdots,u_T,o_T\}$ forms a sequential interaction trajectory between the agent and the environment.
One commonly used approach to improve the planning capability of LLM-based agents is instruction tuning \citep{chen-etal:fireact,zhang-etal:agentohana}. As illustrated in Figure \ref{fig:agent-planning-sft}, this process typically consists of three stages: (i) preparing environments and planning tasks; (ii) synthesizing expert-level trajectories, which consist of sequences of action-observation pairs, on these tasks; and (iii) instruction-tuning LLMs using the synthesized trajectory data. Specifically, expert trajectories can be generated by leveraging state-of-the-art LLMs as agent policies and selecting high-quality trajectories based on predefined reward signals or task success criteria. Through this process, LLMs can acquire planning behaviors from demonstrations and improve their ability to generate structured execution plans. It is worth noting that although $u_t$ and $a_t$ in Section \ref{sec:preliminary} both represent ``action'', they are defined at different levels of abstraction. Specifically, $u_t$ represents a high-level interaction step in agent planning, such as calling a specific tool, whereas $a_t$ represents the low-level token-level action in the standard LLM-based RL formulation, corresponding to the generation of an individual token by the language model.
% 先讲述使用SFT来去提升、然后再讲述与环境进行交互,之后再讲述搜索(这一部分可以重点讲述一下如何构建reward function) % 先讲述使用SFT来去提升、然后再讲述与环境进行交互,之后再讲述搜索(这一部分可以重点讲述一下如何构建reward function)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论