In plain words: A language model learns to call outside tools like a calculator, search engine, or calendar, deciding when to call and how to use the answers, with just a few examples per tool. It improved greatly on many tasks without examples, often matching larger models.
Abstract
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.
Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom
arXiv:2302.04761 · cs.CL · submitted Feb 9, 2023
abstract · pdf · html
The possibilities of this line of research are endless. When language models can call APIs and/or use UIs, they can become the unified natural language interface to any software, any website, any app. See also https://www.adept.ai/act.
Siri and Alexa and Google Assistant are dead ends. Language models trained to use tools will finally be able to start delivering on the promise of a software assistant that works. And eventually, they will be a key part of robots that accept natural language commands to perform everyday tasks in the real world, like this: https://sites.research.google/palm-saycan