Skip to main content
QUICK REVIEW

[Paper Review] Chain of Tools: Large Language Model is an Automatic Multi-tool Learner

Zhengliang Shi, Shen Gao|arXiv (Cornell University)|May 26, 2024
Natural Language Processing TechniquesComputer Science6 citations
TL;DR

The paper introduces Automatic Tool Chain (ATC) enabling LLMs to automatically use a chain of tools via programming, and a black-box probing method for LLMs to learn new tools, evaluated on ToolFlow and RestBench datasets.

ABSTRACT

Augmenting large language models (LLMs) with external tools has emerged as a promising approach to extend their utility, empowering them to solve practical tasks. Existing work typically empowers LLMs as tool users with a manually designed workflow, where the LLM plans a series of tools in a step-by-step manner, and sequentially executes each tool to obtain intermediate results until deriving the final answer. However, they suffer from two challenges in realistic scenarios: (1) The handcrafted control flow is often ad-hoc and constraints the LLM to local planning; (2) The LLM is instructed to use only manually demonstrated tools or well-trained Python functions, which limits its generalization to new tools. In this work, we first propose Automatic Tool Chain (ATC), a framework that enables the LLM to act as a multi-tool user, which directly utilizes a chain of tools through programming. To scale up the scope of the tools, we next propose a black-box probing method. This further empowers the LLM as a tool learner that can actively discover and document tool usages, teaching themselves to properly master new tools. For a comprehensive evaluation, we build a challenging benchmark named ToolFlow, which diverges from previous benchmarks by its long-term planning scenarios and complex toolset. Experiments on both existing datasets and ToolFlow illustrate the superiority of our framework. Analysis on different settings also validates the effectiveness and the utility of our black-box probing algorithm.

Motivation & Objective

  • Motivate enabling LLMs to act as automatic multi-tool users beyond hand-crafted workflows.
  • Propose ATC to generate executable tool-use programs from tool protocols.
  • Introduce a black-box probing method for LLMs to autonomously document and master new tools.
  • Develop ToolFlow as a challenging benchmark with long-term planning and complex tool interdependencies.
  • Demonstrate improved efficiency and tool-learning capabilities over baselines across datasets.

Proposed method

  • Provide LLMs with detailed tool protocols including arguments, schemas, and statuses to learn input-output data flow.
  • Instruct the LLM to generate an executable program that sequentially calls multiple tools to solve a task.
  • Introduce an attributable reflection mechanism to identify and correct faulty tool calls during execution.
  • Add a black-box probing component where the LLM generates testing instances to discover and document new tool protocols.
  • Implement a chain of probing algorithms to handle tool dependencies and maximize probing coverage.
  • Evaluate using existing RestBench datasets and the new ToolFlow benchmark with metrics for success, path accuracy, and tool precision.

Experimental results

Research questions

  • RQ1Can an LLM understand and utilize a chain of tools via tool protocols without handcrafted control flow?
  • RQ2How effectively can an LLM generate executable programs to orchestrate multiple tools?
  • RQ3Can an LLM autonomously discover and document new tool protocols through probing?
  • RQ4Does the proposed ATC framework improve planning efficiency and tool coverage compared to baselines?
  • RQ5How does the black-box probing mechanism extend toolset scope in realistic settings?

Key findings

  • The LLM demonstrates understanding of tool protocols and capability to plan a chain of tools programmatically.
  • ATC enables automatic composition and execution of multi-tool pipelines with improved efficiency over baselines.
  • The attributable reflection mechanism helps locate faulty tool calls and revise the program accordingly.
  • Black-box probing allows the LLM to learn and document new tool protocols, expanding tool coverage.
  • ToolFlow provides a challenging setting with long-term planning and interdependent tool data flows, validating the framework's effectiveness.
  • Experiments show superior performance of ATC and probing across multiple datasets and backbones.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.