ChatPaper.aiChatPaper

大規模言語モデルをツールメーカーとして

Large Language Models as Tool Makers

May 26, 2023
著者: Tianle Cai, Xuezhi Wang, Tengyu Ma, Xinyun Chen, Denny Zhou
cs.AI

要旨

近年の研究では、外部ツールを活用することで大規模言語モデル(LLM)の問題解決能力を向上させる可能性が示されている。しかし、これまでの研究は既存のツールの利用可能性に依存していた。本研究では、この依存性を排除するための第一歩として、LLMが自身で再利用可能なツールを作成する「LLM As Tool Makers(LATM)」と呼ばれる閉ループフレームワークを提案する。このアプローチは、以下の2つの主要なフェーズから構成される:1)ツール作成:LLMがツールメーカーとして、与えられたタスクに対してツールを設計し、そのツールはPythonのユーティリティ関数として実装される。2)ツール利用:LLMがツールユーザーとして、ツールメーカーによって作成されたツールを問題解決に適用する。ツールユーザーは、ツールメーカーと同じLLMでも異なるLLMでもよい。ツール作成により、LLMはさまざまなリクエストに適用可能なツールを継続的に生成でき、将来のリクエストではタスク解決に有益な場合に対応するAPIを呼び出すことができる。さらに、ツール作成とツール利用のフェーズでLLM間の分業を行うことで、生成されるツールや問題解決の品質を低下させることなく、コスト効率を達成する機会が生まれる。例えば、ツール作成はツール利用よりも高度な能力を必要とすることを認識し、リソース集約的だが強力なモデルをツールメーカーとして、軽量でコスト効率の高いモデルをツールユーザーとして適用することができる。我々は、Big-Benchタスクを含むさまざまな複雑な推論タスクにおいて、このアプローチの有効性を検証した。GPT-4をツールメーカー、GPT-3.5をツールユーザーとして使用した場合、LATMはツール作成とツール利用の両方にGPT-4を使用した場合と同等の性能を達成しつつ、推論コストを大幅に削減できることが確認された。
English
Recent research shows the potential of enhancing the problem-solving ability of large language models (LLMs) through the use of external tools. However, prior work along this line depends on the availability of existing tools. In this work, we take an initial step towards removing this dependency by proposing a closed-loop framework, referred to as LLMs As Tool Makers (LATM), where LLMs create their own reusable tools for problem-solving. Our approach consists of two key phases: 1) tool making: an LLM acts as the tool maker that crafts tools for given tasks, where a tool is implemented as a Python utility function. 2) tool using: an LLM acts as the tool user, which applies the tool built by the tool maker for problem-solving. The tool user can be either the same or a different LLM from the tool maker. Tool-making enables an LLM to continually generate tools that can be applied to different requests so that future requests can call the corresponding APIs when beneficial for solving the tasks. Furthermore, the division of labor among LLMs for tool-making and tool-using phases introduces the opportunity to achieve cost effectiveness without degrading the quality of generated tools and problem solutions. For example, recognizing that tool-making demands more sophisticated capabilities than tool-using, we can apply a powerful yet resource-intensive model as the tool maker, and a lightweight while cost-effective model as the tool user. We validate the effectiveness of our approach across a variety of complex reasoning tasks, including Big-Bench tasks. With GPT-4 as the tool maker and GPT-3.5 as the tool user, LATM can achieve performance that is on par with using GPT-4 for both tool making and tool using, while the inference cost is significantly reduced.
PDF31December 15, 2024