Tool Calling
Properties
- Modern LLMs are able to identify the need for usage of external tools such as calculators. Process of tool selection is different from Model Routing since the LLM needs to determined how the tool should be used. Also, LLMs are capable of selecting and evaluating tools in one go with ART framework (see below). Function Calling can be considered only a different name to the tool use.
# Resources
- Papers
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
- 1037 citations
- ART: Automatic multi-step reasoning and tool-use for large language models
- 197 citaitons
- EASYTOOL: Enhancing LLM-based Agents with Concise Tool Instruction
- 36 citations
- LLM With Tools: A Survey
- 9 citations
- ReTool: Reinforcement Learning for Strategic Tool Use in LLMs
- This paper introduces ReTool, a framework that reimagines how models learn to integrate computational tools like code interpreters into their reasoning. ReTool tackles this problem by treating tool use as a skill to be learned, not just mimicked, using outcome-driven RL ( Source: by cloud).
- 0 citations (SOTA)
- HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
- Blogs
# ART Framework
Combining CoT prompting and tools in an interleaved manner has shown to be a strong and robust approach to address many tasks with LLMs. These approaches typically require hand-crafting task-specific demonstrations and carefully scripted interleaving of model generations with tool use. Paranjape et al., (2023)(opens in a new tab) propose a new framework that uses a frozen LLM to automatically generate intermediate reasoning steps as a program.
ART works as follows:
- given a new task, it select demonstrations of multi-step reasoning and tool use from a task library
- at test time, it pauses generation whenever external tools are called, and integrate their output before resuming generation
ART encourages the model to generalize from demonstrations to decompose a new task and use tools in appropriate places, in a zero-shot fashion. In addition, ART is extensible as it also enables humans to fix mistakes in the reasoning steps or add new tools by simply updating the task and tool libraries.