Reason for Future, Act for Now: A Principled Framework for Autonomous LLM Agents with Provable Sample Efficiency

要約

大規模言語モデル (LLM) は優れた推論能力を示しますが、現実世界で推論をアクションに変換することは依然として困難です。
特に、内部の推論メカニズムなどを通じて、外部環境との最小限のインタラクション内で特定のタスクを完了する方法は依然として不明瞭です。
この目的を達成するために、私たちは、推論と行動を調整するための証明可能な後悔保証を備えた原則的なフレームワークを提案します。これを「将来のための理由、今のための行動」(\texttt{RAFA})と呼びます。
具体的には、メモリ バッファから学習し、長期にわたる将来の軌道を計画する推論用のプロンプト テンプレート (「将来の理由」) を設計します。
各ステップで、LLM エージェントは計画された軌道の最初のアクション (「とりあえず行動する」) を実行し、収集されたフィードバックをメモリ バッファに保存し、推論ルーチンを再度呼び出して、新しい状態から将来の軌道を再計画します。
重要なアイデアは、ベイズ適応マルコフ決定プロセス (MDP) の学習と計画として LLM の推論をキャストすることです。
これに応じて、メモリ バッファから未知の環境の更新された事後分布を形成し (学習)、価値関数を最大化する将来の複数のステップの最適な軌道を生成するように LLM に指示します (計画)。
学習および計画サブルーチンは、MDP のアクターと批評の更新をエミュレートするために「インコンテキスト」方式で実行されます。
私たちの理論分析は、長期的な推論と短期的な行動の新しい組み合わせが $\sqrt{T}$ の後悔を達成することを証明しています。
特に、後悔限界は、事前トレーニングを通じて得られた事前知識と、推論と行動によって達成される不確実性の低減との間の興味深い相互作用を強調しています。
私たちの経験的検証により、さまざまな既存のフレームワークよりも優れたパフォーマンスを示し、いくつかのベンチマークでほぼ完璧なスコアを達成していることが示されています。

要約(オリジナル)

Large language models (LLMs) demonstrate impressive reasoning abilities, but translating reasoning into actions in the real world remains challenging. In particular, it remains unclear how to complete a given task provably within a minimum number of interactions with the external environment, e.g., through an internal mechanism of reasoning. To this end, we propose a principled framework with provable regret guarantees to orchestrate reasoning and acting, which we call “reason for future, act for now’ (\texttt{RAFA}). Specifically, we design a prompt template for reasoning that learns from the memory buffer and plans a future trajectory over a long horizon (“reason for future’). At each step, the LLM agent takes the initial action of the planned trajectory (“act for now’), stores the collected feedback in the memory buffer, and reinvokes the reasoning routine to replan the future trajectory from the new state. The key idea is to cast reasoning in LLMs as learning and planning in Bayesian adaptive Markov decision processes (MDPs). Correspondingly, we prompt LLMs to form an updated posterior of the unknown environment from the memory buffer (learning) and generate an optimal trajectory for multiple future steps that maximizes a value function (planning). The learning and planning subroutines are performed in an ‘in-context’ manner to emulate the actor-critic update for MDPs. Our theoretical analysis proves that the novel combination of long-term reasoning and short-term acting achieves a $\sqrt{T}$ regret. In particular, the regret bound highlights an intriguing interplay between the prior knowledge obtained through pretraining and the uncertainty reduction achieved by reasoning and acting. Our empirical validation shows that it outperforms various existing frameworks and achieves nearly perfect scores on a few benchmarks.

arxiv情報

著者 Zhihan Liu,Hao Hu,Shenao Zhang,Hongyi Guo,Shuqi Ke,Boyi Liu,Zhaoran Wang
発行日 2023-09-29 16:36:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG パーマリンク