Skip to main content
QUICK REVIEW

[論文レビュー] ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings

Shibo Hao, Tianyang Liu|arXiv (Cornell University)|May 19, 2023
Topic Modeling被引用数 19
ひとこと要約

ToolkenGPT は凍結された LLM に対して、各ツールを埋め込みトークン(toolken)として扱うことで巨大なツール群を習得させ、LLM のファインチューニングなしにオンザフライのツール呼び出しを可能にし、埋め込み用の豊富なデモンストレーションデータを活用します。

ABSTRACT

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, $ extbf{ToolkenGPT}$, which combines the benefits of both sides. Our approach represents each $\underline{tool}$ as a to$\underline{ken}$ ($ extit{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.

研究の動機と目的

  • モデルのファインチューニングなしに LLM が外部ツールの大規模な集合を呼び出せるようにする。
  • ツールをトークン(toolkens)として表現し、学習可能な埋め込みを持たせる。
  • toolken の語彙を拡張することで、新しいツールへのオンザフライ拡張を可能にする。
  • 埋め込み学習のために豊富なツールデモンストレーションを活用する。
  • 数値推論、知識 QA、および具体的計画の分野で性能向上を示す。

提案手法

  • 各ツールをトークン(toolken)として表現し、toolken 埋め込み矩陣 W_tau を学習する。
  • toolken 埋め込みと標準語の埋め込みを結合して、V ∪ T 上で次トークン予測を可能にする。
  • モードスイッチを導入:toolken が予測された場合、ツールモードに切り替えてデモンストレーションを介してツール引数を完了させる。
  • ツール呼び出しを実行し、出力を推論ストリームに戻して継続的な生成を行う。
  • LLM を凍結したまま toolken 埋め込みのみを訓練し、新しいツールへの効果的な適応を可能にする。
  • デモンストレーションを合成するか、グラウンドトゥルースのツール呼び出しを用いて、監視付き学習のためのペア訓練データを作成する可能性がある。

実験結果

リサーチクエスチョン

  • RQ1ToolkenGPT は LLM をファインチューニングせずに巨大なツールセットを習得できるか?
  • RQ2豊富なツールデモンストレーションから toolken 埋め込みはどれだけ効果的に学習できるか?
  • RQ3ToolkenGPT はインコンテキストのツール学習を上回り、多数のツールでより良いスケーラビリティを示すか?
  • RQ4このアプローチは数値推論、知識 QA、および具象化された計画の領域のツールを扱えるか?

主な発見

  • ToolkenGPT は小さな算術ツールキットでインコントキストのツール学習に匹敵するか、またはそれを上回り、より大きなツールセットにもスケールする。
  • この手法はトレーニングコストを最小限に抑えつつ toolken 語彙を拡張することで、任意の新しいツールを組み込むことをサポートする。
  • Toolken 埋め込みは豊富なデモンストレーションから学習した場合、分野を超えたツールの使用と問題解決を改善する。
  • このアプローチはツールモード中にツール固有のデモンストレーションを活用して有効なツール引数を生成する。
  • 実験は数値推論、知識ベースの QA、および具象化された計画生成でベースラインより性能が向上することを示している。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。