PreprintCited by 32Topic ModelingMultimodal Machine Learning ApplicationsRobot Manipulation and Learning

ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases

Open access
Tang, Qiaoyu, Deng, Ziliang, Lin, Hongyu, Han, Xianpei, Liang, Qiao, Cao, Boxi, Sun, Le·2023·arXiv

Abstract

Enabling large language models to utilize real-world tools effectively is crucial for achieving embodied intelligence. Existing approaches to tool learning have either primarily relied on extremely large language models, such as GPT-4, to attain generalized tool-use abilities in a zero-shot manner, or utilized supervised learning to train limited scopes of tools on compact models. However, it remains uncertain whether smaller language models can achieve generalized tool-use abilities without tool-specific training. To address this question, this paper introduces ToolAlpaca, a novel framework designed to automatically generate a diverse tool-use corpus and learn generalized tool-use abilities on compact language models with minimal human intervention. Specifically, ToolAlpaca first automatically creates a highly diversified tool-use corpus by building a multi-agent simulation environment. The corpus contains 3938 tool-use instances from more than 400 real-world tool APIs spanning 50 distinct categories. Subsequently, the constructed corpus is employed to fine-tune compact language models, resulting in two models, namely ToolAlpaca-7B and ToolAlpaca-13B, respectively. Finally, we evaluate the ability of these models to utilize previously unseen tools without specific training. Experimental results demonstrate that ToolAlpaca achieves effective generalized tool-use capabilities comparable to those of extremely large language models like GPT-3.5, demonstrating that learning generalized tool-use ability is feasible for compact language models.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2306.05301

Cites

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Prior works building instruction tuning data for tool use fail to fully stimulate tool-use capabilities within LLMs.

    “Although prior works have explored building instruction tuning data for tool use (Li et al., 2023a; Patil et al., 2023; Tang et al., 2023; Xu et al., 2023b), they fail to fully stimulate the tool-use capabilities within LLMs and have inherent limitations”

    From Counterfactually Auditable Lifecycle Certification for Autonomous Agents (2023) · cites this paper as Tang et al., 2023

  • Existing tool-use instruction tuning works either fail to involve real-world APIs or consider only a small scope of APIs with poor diversity.

    “(1) limited APIs : they either fail to involve real-world APIs (e.g., RESTAPI) (Patil et al., 2023; Tang et al., 2023) or consider only a small scope of APIs with poor diversity (Patil et al., 2023; Xu et al., 2023b; Li et al., 2023a);”

    From Counterfactually Auditable Lifecycle Certification for Autonomous Agents (2023) · cites this paper as Tang et al., 2023

  • Some existing works do not execute APIs to obtain real responses, which serve as important information for subsequent model planning.

    “In addition, some works do not even execute APIs to obtain real responses (Patil et al., 2023; Tang et al., 2023), which serve as important information for subsequent model planning.”

    From Counterfactually Auditable Lifecycle Certification for Autonomous Agents (2023) · cites this paper as Tang et al., 2023

  • Existing tool-learning datasets and their construction methods cannot effectively address real human needs.

    “existing tool-learning dataset (Li et al., 2023a; Patil et al., 2023; Tang et al., 2023; Xu et al., 2023b) and their construction methods cannot effectively address real human needs as mentioned in § 1”

    From Counterfactually Auditable Lifecycle Certification for Autonomous Agents (2023) · cites this paper as Tang et al., 2023

Cites

Still being checked.

Cited by

Sorted by citations

Authors
Tang, Q., Deng, Z., Lin, H., Han, X., Liang, Q., Cao, B., & Sun, L.
Affiliations
  • University of Chinese Academy of Sciences (CN)
  • Chinese Academy of Sciences (CN)
Venue
arXiv
Publisher
arXiv
Published
2023
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4380136738
Cited by
16
References
0
Citations by year
2025: 7 · 2024: 7 · 2023: 2
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
  • Physical Sciences › Engineering › Control and Systems Engineering › Robot Manipulation and Learning
Keywords
tool use, large language models, small language models, multi-agent simulation, fine-tuning, embodied AI

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review