Lune

NeurIPS2023Top-tier venue

ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings

Shibo Hao, Tianyang Liu, Zhen Wang, Zhiting Hu

Abstract

Augmenting large language models (LLMs) with external tools has emerged as a promising approach to solving complex problems. However, traditional methods, which finetune LLMs with tool demonstration data, can be both costly and restricted to a predefined set of tools. Recent in-context learning paradigm alleviates these issues, but the limited context length only allows for a few shots of demonstrations, leading to suboptimal understandings of the tools. Moreover, when there are numerous tools to choose from, in-context learning could completely fail to work. In this paper, we propose an alternative approach, ToolkenGPT\textbf{ToolkenGPT}, which combines the benefits of both sides. Our approach represents each tool‾\underline{tool} as a token‾\underline{ken} (toolken\textit{toolken}) and learns an embedding for it, enabling tool calls in the same way as generating a regular word token. Once a toolken is triggered, the LLM is prompted to complete arguments for the tool to execute. ToolkenGPT offers the flexibility to plug in an arbitrary number of tools by expanding the set of toolkens on the fly. In addition, it improves tool use by allowing extensive demonstration data for learning the toolken embeddings. In diverse domains, including numerical reasoning, knowledge-based question answering, and embodied plan generation, our approach effectively augments LLMs with tools and substantially outperforms various latest baselines. ToolkenGPT demonstrates the promising ability to use relevant tools from a large tool set in complex scenarios.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

52 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets cites MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedback
  • CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets cites Confucius: Iterative Tool Learning from Introspection Feedback by Easy-to-Difficult Curriculum
  • CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets cites Language Models are Few-Shot Learners
  • CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ToolChain: Efficient Action Space Navigation in Large Language Models with A Search cites Language Models are Few-Shot Learners
  • Language Models are Few-Shot Learners cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
  • API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers52

  1. MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language FeedbackXingyao Wang, Zihan Wang, Jiateng Liu, Yangyi Chen et al.ICLR 2024 · 308 citations
  2. ToolChain*: Efficient Action Space Navigation in Large Language Models with A* SearchYuchen Zhuang, Xiang Chen, Tong Yu, Saayan Mitra et al.ICLR 2024 · 119 citations
  3. CRAFT: Customizing LLMs by Creating and Retrieving from Specialized ToolsetsLifan Yuan, Yangyi Chen, Xingyao Wang, Yi Fung et al.ICLR 2024 · 117 citations
  4. Confucius: Iterative Tool Learning from Introspection Feedback by Easy-to-Difficult CurriculumShen Gao, Zhengliang Shi, Minghang Zhu, Bowen Fang et al.AAAI 2024 · 84 citations
  5. API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMsMinghao Li, Yingxiu Zhao, Bowen Yu, Feifan Song et al.EMNLP 2023 · 72 citations

Builds on22

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
  4. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  5. Retrieval Augmented Language Model Pre-TrainingKelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat et al.ICML 2020 · 2,937 citations

Related papers

  1. ParaTool: Shifting Tool Representations from Context to ParametersZekai Yu, Qi Meng, Qizhi Chu, Yu Hao et al.ICML 2026
  2. Tool Learning in the Wild: Empowering Language Models as Automatic Tool AgentsZhengliang Shi, Shen Gao, Lingyong Yan, Yue Feng et al.WWW 2025 · 59 citations
  3. ToolGen: Unified Tool Retrieval and Calling via GenerationRenxi Wang, Xudong Han, Lei Ji, Shu Wang et al.ICLR 2025
  4. Toolken+: Improving LLM Tool Usage with Reranking and a Reject OptionKonstantin Yakovlev, Sergey I. Nikolenko, Andrey BoutEMNLP Findings 2024 · 1 citation
  5. ToolOmni: Enabling Open-World Tool Use via Agentic learning with Proactive Retrieval and Grounded ExecutionShouzheng Huang, Meishan Zhang, Baotian Hu, Min ZhangACL 2026
Dusk over the sea between two cliffs drawn in fine vertical lines