要約
ツール学習は、大規模な言語モデル(LLM)が外部ツールとの相互作用を通じて複雑な現実世界のタスクを解決する重要な機能として浮上しています。
既存のアプローチは、手作りのプロンプトへの依存、マルチステップ計画の難しさ、正確なエラー診断と反射メカニズムの欠如など、重大な課題に直面しています。
ツールコーダーを提案します。これは、ツール学習をコード生成タスクとして再フォーマルする新しいフレームワークです。
ソフトウェアエンジニアリングの原則に触発されたToolCoderは、自然言語のクエリを構造化されたPython関数の足場に変換し、記述的なコメントでタスクを体系的に分解し、LLMが複雑な推論と計画のためにコーディングパラダイムを活用できるようにします。
次に、機能の実装を生成および実行して、最終応答を取得します。
さらに、ツールコーダーはリポジトリで機能を正常に実行してコードの再利用を促進し、体系的なデバッグのためのエラートレースバックメカニズムを活用し、実行効率と堅牢性の両方を最適化しました。
実験は、ツールコーダーが既存のアプローチと比較してタスク完了の精度と実行の信頼性で優れたパフォーマンスを達成し、ツール学習におけるコード中心のアプローチの有効性を確立することを示しています。
要約(オリジナル)
Tool learning has emerged as a crucial capability for large language models (LLMs) to solve complex real-world tasks through interaction with external tools. Existing approaches face significant challenges, including reliance on hand-crafted prompts, difficulty in multi-step planning, and lack of precise error diagnosis and reflection mechanisms. We propose ToolCoder, a novel framework that reformulates tool learning as a code generation task. Inspired by software engineering principles, ToolCoder transforms natural language queries into structured Python function scaffold and systematically breaks down tasks with descriptive comments, enabling LLMs to leverage coding paradigms for complex reasoning and planning. It then generates and executes function implementations to obtain final responses. Additionally, ToolCoder stores successfully executed functions in a repository to promote code reuse, while leveraging error traceback mechanisms for systematic debugging, optimizing both execution efficiency and robustness. Experiments demonstrate that ToolCoder achieves superior performance in task completion accuracy and execution reliability compared to existing approaches, establishing the effectiveness of code-centric approaches in tool learning.
arxiv情報
著者 | Hanxing Ding,Shuchang Tao,Liang Pang,Zihao Wei,Jinyang Gao,Bolin Ding,Huawei Shen,Xueqi Cheng |
発行日 | 2025-05-30 16:59:23+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google