Skip to main content
QUICK REVIEW

[논문 리뷰] Large Language Models as Tool Makers

Tianle Cai, Xuezhi Wang|arXiv (Cornell University)|2023. 05. 26.
Topic ModelingComputer Science인용 수 19
한 줄 요약

LATM은 강력한 모델로 먼저 재사용 가능한 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가 다양한 작업을 위해 재사용 가능한 도구를 자체적으로 생성하도록 함으로써 기존 도구에 대한 의존도를 줄이는 동기를 부여한다.
  • 도구 생성자(tool-maker)와 도구 사용자(tool-user), 그리고 스트리밍 데이터를 위한 디스패처를 포함하는 폐쇄 루프 LATM 아키텍처를 제안한다.
  • 도구 만들어진 기능이 인스턴스 간에 재사용되어 효율성과 비용 효율성을 향상시킬 수 있음을 보여준다.
  • 고용량 도구 생성자(예: GPT-4)가 도구를 생산하여 경량 도구 사용자(예: GPT-3.5 Turbo)가 더 낮은 비용으로 성능을 같거나 더 높게 달성하도록 하는 도구를 제공할 수 있음을 보인다.

제안 방법

  • 2단계 LATM 파이프라인: 도구 만들기(파이썬 함수 도구 생성)와 도구 사용(작업에 도구 적용).
  • 도구 만들기는 강력한 모델을 사용하여 시연으로부터 일반 Python 도구를 제안하고 검증하며 래핑한다(예시를 통한 프로그래밍).
  • 도구 검증은 도구를 검증하기 위한 단위 테스트를 생성한다; 실패는 재시도와 수정으로 이어진다.
  • 도구 사용은 래핑된 도구를 맥락 내 함수 호출과 선택적 후처리를 통해 적용하기 위해 더 경량화된 모델을 사용한다.
  • 디스패처는 기존 도구로의 라우팅 또는 보지 못한 작업에 대한 새로운 도구 생성을 촉발하여 스트리밍 데이터를 처리한다.
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

실험 결과

연구 질문

  • RQ1LLMs가 학습된 시연을 넘어서 새로운 작업을 해결하는 일반적이고 재사용 가능한 도구 함수들을 생성할 수 있는가?
  • RQ2도구 만들기(고용량)와 도구 사용(저비용)을 분리하는 것이 성능을 유지하거나 향상시키면서 런타임 비용을 줄일 수 있는가?
  • RQ3디스패처가 도구를 재사용하거나 보지 못한 작업에 대해 도구 생성을 시작함으로써 스트리밍 작업 도착을 효과적으로 관리할 수 있는가?
  • RQ4도구가 복잡한 추론 작업에서 경량 모델의 실적을 어느 정도 향상시키는가?
  • RQ5작업 전반에 걸친 도구 생성자 대 도구 사용자 모델의 용량 요건과 비용 영향은 어느 정도인가?

주요 결과

  • 고용량 도구 생성자(GPT-4)는 다양한 작업에 대한 재사용 가능한 Python 도구를 생성할 수 있으며, 이를 경량 도구 사용자(GPT-3.5 Turbo 또는 GPT-4)가 적용할 수 있다.
  • GPT-4로 만들어져 GPT-3.5 Turbo가 사용하는 도구를 갖춘 LATM은 두 단계 모두에 GPT-4를 사용하는 것과 비슷한 성능을 달성하면서 추론 비용을 줄인다.
  • LatM은 체인-오브-생각(Chain-of-Thought) 프롬프팅에 비해 여러 Big-Bench 형식 작업에서 크게 성능을 향상시키며, 특히 비용 효율성을 위해 경량 도구 사용자를 사용할 때 그렇다.
  • 디스패처는 스트리밍 설정에서 도구의 실시간 생성 및 사용을 가능하게 하며, 도구 식별과 새로운 작업 촉발에서 높은 정확도를 보인다.
  • 용량 분석은 더 어려운 작업에서 도구 만들기가 더 강한 모델의 이점을 보인다는 것을 보여주고, 반면에 GPT-3.5 Turbo를 이용한 도구 사용은 비용-성능 균형에서 우수한 trade-off를 제공한다.
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

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.