Skip to content
All papers

Toolformer: Language Models Can Teach Themselves to Use Tools

Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, et al.2023NeurIPS 2023

Read it on arxiv.org(opens in a new tab)

Why this one

Read this after Language Models are Few-Shot Learners and before ReAct: Synergizing Reasoning and Acting in Language Models. The useful idea here is not that a model can call a calculator or search API. You can bolt that on with prompt templates in an afternoon. Toolformer asks a better question: can the model learn tool use as part of next-token prediction, deciding when a call is worth interrupting itself for? People often remember this as an agents paper, but its sharper lesson is data construction. A few seed examples are used to create many possible tool-call annotations, then only the calls that improve prediction survive. That filtering step is the paper. If you are building tool calling today, this gives you a mental model for why schemas, call placement, and result formatting are training data problems, not just orchestration problems.

What to take away

  • Tool calls are inserted into ordinary text, so using a tool becomes another learned token pattern.
  • The paper keeps only API calls that make the following tokens more likely, turning self-labeling into a quality filter.
  • Its tools are simple, but the hard part is learning when not to call them.

Reads with