[論文レビュー] CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets
CRAFTは実行可能なコードスニペットのタスク固有ツールセットを構築し、マルチビュー照合で取得して微調整なしにLLMsを補強することで、視覚言語、表形式、数学的推論タスクの性能を向上させる。
Large language models (LLMs) are often augmented with tools to solve complex tasks. By generating code snippets and executing them through task-specific Application Programming Interfaces (APIs), they can offload certain functions to dedicated external modules, such as image encoding and performing calculations. However, most existing approaches to augment LLMs with tools are constrained by general-purpose APIs and lack the flexibility for tailoring them to specific tasks. In this work, we present CRAFT, a general tool creation and retrieval framework for LLMs. It creates toolsets specifically curated for the tasks and equips LLMs with a component that retrieves tools from these sets to enhance their capability to solve complex tasks. For each task, we collect specific code solutions by prompting GPT-4 to solve the training examples. Following a validation step ensuring the correctness, these solutions are abstracted into code snippets to enhance reusability, and deduplicated for higher quality. At inference time, the language model retrieves snippets from the toolsets and then executes them or generates the output conditioning on the retrieved snippets. Our method is designed to be flexible and offers a plug-and-play approach to adapt off-the-shelf LLMs to unseen domains and modalities, without any finetuning. Experiments on vision-language, tabular processing, and mathematical reasoning tasks show that our approach achieves substantial improvements compared to strong baselines. In addition, our in-depth analysis reveals that: (1) consistent performance improvement can be achieved by scaling up the number of tools and the capability of the backbone models; (2) each component of our approach contributes to the performance gains; (3) the created tools are well-structured and reliable with low complexity and atomicity. The code is available at https://github.com/lifan-yuan/CRAFT.
研究の動機と目的
- キュレーションされたツールを用いて専門分野に合わせたLLMの適応が、一般的なAPIだけに頼るより効果的である動機づけ。
- 高品質で再利用可能なツールを生成するためのオフラインツール作成・検証・重複排除の完全なパイプラインを提案。
- 問題文、API名、ドキュストリングに基づいてツールを選択するマルチビュー照合機構を開発し、推論を導く。
- パラメータフリーの適応(ファインチューニングなし)を実証し、多様なタスクで評価してスケーラビリティとロバスト性を示す。
提案手法
- 問題をサンプリングして実行可能なPythonソリューションをGPT-4で生成し、正解のみを残してオフラインでツールセットを構築。
- 変数名を変更し入力をラップすることで、横断領域適用性を高める一般的で再利用可能なツールへ抽象化。
- オリジナルの問題に対して抽象化した関数をテストしてツールを検証し、失敗を削除。
- 機能名と入力数でグルーピングして最も一般的なツールを各グループ内で選択することでツールを重複排除。
- 推論時には(問題、機能名、ドキュストリング)にわたるマルチビュー照合を用いてSimCSEベースの類似度でツールを取得し、多数決で最終セットを組み立てる。
- 取得したツールを実行可能なコードスニペットとしてLLMのプロンプトに追加し、解答生成中のツール呼び出しを可能にする。
- VQA、表形式処理、代数的推論を跨ぐエンドツーエンドをGPT-3.5-Turboで評価(補足分析でGPT-4)し、さまざまなベースラインと比較。
実験結果
リサーチクエスチョン
- RQ1大規模でキュレーションされた実行可能なツール集合は、モデルのファインチューニングなしに外部ツールを必要とするタスクでLLMの性能を向上させるか。
- RQ2問題文・API名・ドキュストリングというマルチビュー照合戦略は、関連ツールの選択において単純な照合方法より優れているか。
- RQ3ツール作成・抽象化・検証・重複排除は全体の性能にそれぞれどのように寄与するか。
- RQ4ツールセットのサイズとバックボーンモデルの能力はCRAFTから得られる利得にどのように影響するか。
- RQ5生成されたツールセットの特徴(複雑さ、多様性)は信頼性にどう影響するか。
主な発見
- CRAFTは強力なベースラインに対して顕著な改善を達成し、視覚言語タスクで顕著な利益を示す。
- ツール数とバックボーン能力が増えるほど性能が向上する。
- 各コンポーネント(抽象化、問題名/ドキュストリング一致、各ビューの照合)は利得に寄与し、いずれかのビューを削除すると性能が低下する。
- 作成されたツールは低い循環的複雑度と高い多様性を持つ傾向があり、信頼性と幅広い適用性を示す。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。