[2302.04761] Toolformer: Language Models Can Teach Themselves to Use Tools
Language models (LMs) exhibit remarkable abilities to solve new tasks from just a few examples or textual instructions, especially at scale. They also, paradoxically, struggle with basic functionality, such as arithmetic or factual lookup, where much simpler and smaller models excel. In this paper, we show that LMs can teach themselves to use external tools via simple APIs and achieve the best of both worlds. We introduce Toolformer, a model trained to decide which APIs to call, when to call them, what arguments to pass, and how to best incorporate the results into future token prediction. This is done in a self-supervised way, requiring nothing more than a handful of demonstrations for each API. We incorporate a range of tools, including a calculator, a Q\&A system, two different search engines, a translation system, and a calendar. Toolformer achieves substantially improved zero-shot performance across a variety of downstream tasks, often competitive with much larger models, without sacrificing its core language modeling abilities.
Language models (LMs) exhibit remarkable abilities to solve new tasks from just a few examples or textual instructions, especially at scale. They also, paradoxically, struggle with basic functionality, such as arithmetic or factual lookup, where much simpler and smaller models excel. In this paper, we show that LMs can teach themselves to use external tools via simple APIs and achieve the best of both worlds. We introduce Toolformer, a model trained to decide which APIs to call, when to call them, what arguments to pass, and how to best incorporate the results into future token prediction. Thi
Explore this link on the map →related reading
- LLM Powered Autonomous Agents | Lil'Loglilianweng.github.io
- Language Models can Solve Computer Tasksarxiv.org
- GenAI Handbookgenai-handbook.github.io
- AI Model & API Providers Analysis | Artificial Analysisartificialanalysis.ai
- The Llama Hitchiking Guide to Local LLMs – hackerllamaosanseviero.github.io
- [2210.02441] Ask Me Anything: A simple strategy for prompting language modelsarxiv.org
- Think of language models like ChatGPT as a “calculator for words”simonwillison.net
- Making Large Language Models work for yousimonwillison.net
- Pathways Language Model (PaLM): Scaling to 540 Billion Parameters for Breakthrouai.googleblog.com
- 2310.10631arxiv.org
- Catching up on the weird world of LLMssimonwillison.net
- Building reliable AI agents · parth sareenparthsareen.com