Large Language Models as Tool Makers
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.
647410cb71f07ae738d5188c
Tianle Cai
admin_assigned
2023-05-30T13:20:04.210Z
64459357c525660aa20be337
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/1fryBXRuSvAgMIDkpWBpI.jpeg
Tianle Cai
user
tianlecai
647410cb71f07ae738d5188d
Xuezhi Wang
647410cb71f07ae738d5188e
Tengyu Ma
647410cb71f07ae738d5188f
Xinyun Chen
647410cb71f07ae738d51890
Denny Zhou
claimed_verified
2024-02-20T18:28:36.433Z
65d4d62d493aeaf0bb295f1b
https://cdn-avatars.huggingface.co/v1/production/uploads/noauth/vXMxaoWwFziul8TqIhQw8.jpeg
Denny Zhou
user
dennyzhou
Large Language Models as Tool Makers
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.
A proposed framework, LATM, allows large language models (LLMs) to create and use their own tools for problem-solving, enhancing efficiency and cost-effectiveness.
LLMs tool making tool using Python utility function APIs Big-Bench GPT-4 GPT-3.5