Skip to main content
QUICK REVIEW

[論文レビュー] Large Language Models as Tool Makers

Tianle Cai, Xuezhi Wang|arXiv (Cornell University)|May 26, 2023
Topic ModelingComputer Science被引用数 19
ひとこと要約

LATMは、LLMsがまず強力なモデルを使って再利用可能なPythonツールを作成(ツール作成)し、その後、より安価なモデル(ツール使用)を用いてタスクを解決することで、コストを抑えつつ同等の性能を達成します。さらにストリーミングタスク処理のためのディスパッチャを導入します。

ABSTRACT

Recent research has highlighted the potential of large language models (LLMs) to improve their problem-solving capabilities with the aid of suitable external tools. In our work, we further advance this concept by introducing a closed-loop framework, referred to as LLMs A s Tool Makers (LATM), where LLMs create their own reusable tools for problem-solving. Our approach consists of two phases: 1) tool making: an LLM acts as the tool maker that crafts tools for a set of tasks. 2) tool using: another LLM acts as the tool user, which applies the tool built by the tool maker for problem-solving. On the problem-solving server side, tool-making enables continual tool generation and caching as new requests emerge. This framework enables subsequent requests to access cached tools via their corresponding APIs, enhancing the efficiency of task resolution. Recognizing that tool-making requires more sophisticated capabilities, we assign this task to a powerful, albeit resource-intensive, model. Conversely, the simpler tool-using phase is delegated to a lightweight model. This strategic division of labor allows the once-off cost of tool-making to be spread over multiple instances of tool-using, significantly reducing average costs while maintaining strong performance. Furthermore, our method offers a functional cache through the caching and reuse of tools, which stores the functionality of a class of requests instead of the natural language responses from LLMs, thus extending the applicability of the conventional cache mechanism. We evaluate our approach across various complex reasoning tasks, including Big-Bench tasks. With GPT-4 as the tool maker and GPT-3.5 as the tool user, LATM demonstrates performance equivalent to using GPT-4 for both roles, but with a significantly reduced inference cost.

研究の動機と目的

  • 既存ツールへの依存を減らす動機付けとして、LLMsが多様なタスクのために自ら再利用可能なツールを生成できるようにする。
  • 提案: ツールメーカーとツールユーザーを備えた閉ループのLATMアーキテクチャと、ストリーミングデータ用のディスパッチャ。
  • ツール作成機能がインスタンスを跨いで再利用でき、効率性とコスト効果を改善することを示す。
  • 高容量のツールメーカー(例: GPT-4)がツールを生成し、軽量ツールユーザー(例: GPT-3.5 Turbo)が同等またはそれ以上の性能を、より低いコストで実現できることを示す。

提案手法

  • Two-stage LATM pipeline: tool making (generate Python function tools) and tool using (apply tools to tasks).
  • Tool making uses a powerful model to propose, verify, and wrap generic Python tools from demonstrations (programming by example).
  • Tool verification creates unit tests to validate tools; failures trigger retries and corrections.
  • Tool using employs a lighter model to apply the wrapped tools via in-context function calls and optional postprocessing.
  • A dispatcher handles streaming data by routing to existing tools or triggering new tool creation for unseen tasks.
Figure 1: The closed-loop framework of LATM . In situations with numerous problem-solving requests, directly utilizing a powerful LLM to solve all the instances can result in high costs. On the other hand, lightweight models are cost-effective but usually struggle with complex tasks. LATM leverages
Figure 1: The closed-loop framework of LATM . In situations with numerous problem-solving requests, directly utilizing a powerful LLM to solve all the instances can result in high costs. On the other hand, lightweight models are cost-effective but usually struggle with complex tasks. LATM leverages

実験結果

リサーチクエスチョン

  • RQ1Can LLMs generate generic, reusable tool functions that solve new tasks beyond the demonstrations they were trained on?
  • RQ2Does separating tool making (high-capacity) from tool using (low-cost) maintain or improve performance while reducing runtime cost?
  • RQ3Can a dispatcher effectively manage streaming task arrivals by reusing tools or initiating tool-making for unseen tasks?
  • RQ4To what extent do tools improve performance of lightweight models on complex reasoning tasks?
  • RQ5What are the capacity requirements and cost implications of the tool-maker vs tool-user models across tasks?

主な発見

  • A high-capacity tool maker (GPT-4) can generate reusable Python tools for various tasks, which a lighter tool user (GPT-3.5 Turbo or GPT-4) can apply.
  • LATM with a tool made by GPT-4 and used by GPT-3.5 Turbo achieves performance on par with using GPT-4 for both stages while reducing inference cost.
  • LatM significantly improves several Big-Bench style tasks compared to Chain-of-Thought prompting, especially when using a lightweight tool user for cost efficiency.
  • The dispatcher enables on-the-fly tool creation and usage in streaming settings with high accuracy in tool identification and new task triggering.
  • A capacity analysis shows tool-making benefits from stronger models for harder tasks, while tool-using with GPT-3.5 Turbo offers favorable cost-performance trade-offs.
Figure 2: The pipeline of LATM . LATM can be divided into two stages: 1) tool making: a powerful yet more expensive model serves as the tool maker to generate generic and reusable tools from a few demonstrations; 2) tool using: a lightweight and cheaper model serves as the tool user to use the tool
Figure 2: The pipeline of LATM . LATM can be divided into two stages: 1) tool making: a powerful yet more expensive model serves as the tool maker to generate generic and reusable tools from a few demonstrations; 2) tool using: a lightweight and cheaper model serves as the tool user to use the tool

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。