ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings

要約

外部ツールを使用して大規模言語モデル (LLM) を拡張することは、複雑な問題を解決するための有望なアプローチとして浮上しています。
ただし、ツールのデモンストレーション データを使用して LLM を微調整する従来の方法は、コストがかかる上に、​​事前定義されたツールのセットに制限される可能性があります。
最近のインコンテキスト学習パラダイムはこれらの問題を軽減しますが、コンテキストの長さが制限されているため、デモンストレーションは数ショットしか行えず、ツールの理解が最適ではありません。
さらに、選択できるツールが多数ある場合、コンテキストに沿った学習が完全に機能しない可能性があります。
この論文では、両方の利点を組み合わせた代替アプローチ $\textbf{ToolkenGPT}$ を提案します。
私たちのアプローチは、各 $\underline{tool}$ を to$\underline{ken}$ ($\textit{toolken}$) として表し、その埋め込みを学習して、通常の単語トークンを生成するのと同じ方法でツール呼び出しを可能にします。

ツールケンがトリガーされると、LLM はツールを実行するための引数を入力するように求められます。
ToolkenGPT は、ツールケンのセットをオンザフライで拡張することで、任意の数のツールをプラグインできる柔軟性を提供します。
さらに、ツールケンの埋め込みを学習するための広範なデモンストレーション データが可能になるため、ツールの使用が向上します。
数的推論、知識ベースの質問応答、具体化された計画の生成などのさまざまな領域において、私たちのアプローチは LLM をツールで効果的に強化し、さまざまな最新のベースラインを大幅に上回ります。
ToolkenGPT は、複雑なシナリオで大規模なツール セットから関連するツールを使用する有望な機能を示します。

要約(オリジナル)

Augmenting large language models (LLMs) with external tools has emerged as a promising approach to solving complex problems. However, traditional methods, which finetune LLMs with tool demonstration data, can be both costly and restricted to a predefined set of tools. Recent in-context learning paradigm alleviates these issues, but the limited context length only allows for a few shots of demonstrations, leading to suboptimal understandings of the tools. Moreover, when there are numerous tools to choose from, in-context learning could completely fail to work. In this paper, we propose an alternative approach, $\textbf{ToolkenGPT}$, which combines the benefits of both sides. Our approach represents each $\underline{tool}$ as a to$\underline{ken}$ ($\textit{toolken}$) and learns an embedding for it, enabling tool calls in the same way as generating a regular word token. Once a toolken is triggered, the LLM is prompted to complete arguments for the tool to execute. ToolkenGPT offers the flexibility to plug in an arbitrary number of tools by expanding the set of toolkens on the fly. In addition, it improves tool use by allowing extensive demonstration data for learning the toolken embeddings. In diverse domains, including numerical reasoning, knowledge-based question answering, and embodied plan generation, our approach effectively augments LLMs with tools and substantially outperforms various latest baselines. ToolkenGPT demonstrates the promising ability to use relevant tools from a large tool set in complex scenarios.

arxiv情報

著者 Shibo Hao,Tianyang Liu,Zhen Wang,Zhiting Hu
発行日 2024-01-15 23:52:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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