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이 문제 해결을 위해 재사용 가능한 도구를 생성하는 폐쇄형 프레임워크인 LLMs As Tool Makers(LATM)를 제안한다. 우리의 접근 방식은 두 가지 주요 단계로 구성된다: 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