ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases
By Qiaoyu Tang, Ziliang Deng, Hongyu Lin, Xianpei Han, Qiao Liang, Boxi Cao, Le Sun. arXiv.org, 2023
387 citations recorded by the source corpus.
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.
View Paper: https://www.semanticscholar.org/paper/455866ca838f356b53a7e3e5b344834f9e93dbbc
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
- Dacheng Tao
- Xingyao Wang
- Shunyu Yao
- Izzeddin Gur
- Sergey Levine
- Yi Tay
- Karthik Narasimhan
- Theodore R. Sumers
Citations in the corpus
- MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedback (2023, methodology): “…task or dimension, like task completion (Liu et al., 2023c), code generation (Yang et al., 2023a), human-LLM collaborative task solving (Lee et al., 2022b; Huang et al., 2023b; Fu et al., 2023), tool manipulation (Tang et al., 2023), and web nevigation (Zhou et al., 2023; Deng et al., 2023a).”
- Understanding HTML with Large Language Models (2022, methodology): “ToolAlpaca (Tang et al., 2023) and TOOLLLM (Qin et al., 2023) are two examples that study multi-step tool-use with iterated API calls.”
- API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs (2023, methodology): “To assess the quality of the dataset created, we conducted experiments to fine-tune Alpaca using the training dataset of ToolAlpaca.”
- Tool learning with large language models: a survey (2024, unknown): “Lastly, we conclude the survey by summarizing the key findings (§7).”
- Cognitive Architectures for Language Agents (2023, background): “…Côté et al., 2019; Shridhar et al., 2020; Wang et al., 2022a; Liu et al., 2023d), APIs (Schick et al., 2023; Yao et al., 2022b; Parisi et al., 2022; Tang et al., 2023b), and websites (Shi et al., 2017; Nakano et al., 2021; Yao et al., 2022a; Zhou et al., 2023b; Gur et al., 2023; Deng et al., 2023)…”
- A Survey on Knowledge Distillation of Large Language Models (2024, methodology): “LawyerLLaMA (Huang et al., 2023b), LawGPT (Cui et al., 2023b), Fuzi (Wu et al., 2023d) Medical and Healthcare Huatuogpt (Zhang et al., 2023c), Huatuogpt-II (Chen et al., 2023d), Doctorglm (Xiong et al., 2023), Alpacare (Zhang et al., 2023f), Huatuo (Wang et al., 2023a), ChatDoctor (Li et al., 2023i)”
- UniSD: Towards a Unified Self-Distillation Framework for Large Language Models (2026, unknown): “T OOL A LPACA [29] features multi-step tool-calling interactions.”