PreprintCited by 3,205Robot Manipulation and LearningAI-based Problem Solving and PlanningMultimodal Machine Learning Applications

The DOI matches its DataCite record; 6 of the 42 references it cites were found in a registry or an index; 12 of the 18 sources its claims cite were checked for support.

Toolformer: Language Models Can Teach Themselves to Use Tools

Open access

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.

Overview

AI snapshot

Written from the paper’s full text.

TL;DR

Toolformer is a 6.7B GPT-J model trained self-supervised to insert API calls for question answering, Wikipedia search, a calculator, machine translation, and a calendar, deciding when and how to call them based on whether calls reduce future-token loss. It improves zero-shot downstream performance, often beating much larger GPT-3/OPT models, without increasing perplexity when API calls are disabled.

Key findings

  • On LAMA subsets, Toolformer improves over the best baseline by 11.7, 5.2, and 18.6 points on SQuAD, Google-RE, and T-REx, respectively, and uses the question answering tool in 98.1% of cases; it outperforms OPT (66B) and GPT-3 (175B).
  • On math benchmarks, Toolformer reaches ASDiv 40.4, SVAMP 29.4, and MAWPS 44.0, versus GPT-J’s 7.5, 5.2, and 9.9, using the calculator for 97.9% of examples.
  • On question answering, Toolformer scores WebQS 26.3, NQ 17.7, and TriviaQA 48.8, mostly using Wikipedia search (99.3%), but still lags GPT-3 (175B) at 29.0, 22.6, and 65.9.
  • On temporal datasets, Toolformer reaches DATESET 27.3 versus GPT-J 3.9, with the calendar used for 54.8% of examples; on TEMPLAMA it scores 16.3, but the calendar is used for only 0.2%.
  • Language modeling perplexity is not degraded: Toolformer (disabled) has WikiText 10.3 and CCNet 10.5, matching GPT-J + CC. Tool use emerges around 775M parameters.

Methods

  • Self-supervised pipeline: sample candidate API calls with an LM, execute them, filter calls by whether they reduce the weighted loss over future tokens by at least τ_f, merge useful calls into a CCNet subset, and finetune GPT-J on the augmented dataset.
  • Tools: Atlas for QA, BM25 retriever over Wikipedia for search, a Python calculator for basic arithmetic, 600M NLLB for machine translation, and a calendar API; up to 25k examples per API, batch size 128, learning rate 1e-4.
  • Evaluation: zero-shot downstream tasks with greedy decoding modified to allow `<API>` if among top k=10 tokens, at most one API call per input; baselines include GPT-J, GPT-J + CC, Toolformer (disabled), OPT (66B), and GPT-3 (175B).

Limitations

  • Stated: Toolformer cannot chain tools, cannot use tools interactively, is sensitive to input wording, is sample-inefficient for some tools (e.g., over a million documents yield only a few thousand useful calculator calls), and does not account for tool-dependent computational cost.
  • Evident from the text: the one-API-call-per-example restriction and independent sampling prevent chained calls; TEMPLAMA gains are not attributable to the calendar tool; MLQA does not consistently outperform GPT-J because CCNet finetuning can cause distribution shift; QA lags GPT-3 partly because the search engine is simple and Toolformer cannot reformulate queries or browse multiple results.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2302.04761

Cites

0 citation errors · 36 not checkable

Statistics

Nothing to recompute.

Verification

Claims the paper makes

12 of 18 cited sources checked · 6 supported · 1 flagged · accuracy not yet measured

Show all 35 claims

  • Probably not a substantial claim. 16
  • It may state two separate claims as one. 22
  • The quote only partly states this claim. 3
37 of 37
  • The paper relies on this without support.

    What humans find useful may be different from what a model finds useful.

    “what humans find useful may be different from what a model finds useful.”
  • The authors state this as an assumption.

    An API call is helpful to the model if providing both its input and output makes it easier for the model to predict future tokens, compared to not receiving the API call or receiving only its input.

    “Intuitively, an API call is helpful to M if providing it with both the input and the output of this call makes it easier for the model to predict future tokens, compared to not receiving the API call at all, or receiving only its input.”
  • The authors state this as an assumption.

    For creating the calendar dataset, the calendar date in such cases should be the date that the document was created.

    “we operate under the assumption that the calendar date in such cases should be the date that the document was created.”
  • The authors state this as an assumption.

    The remaining examples after filtering are close enough to the original distribution so that the model's language modeling abilities remain unaffected.

    “While this filtering alters the distribution of training examples, we assume that the remaining examples are close enough to the original distribution so that M 's language modeling abilities remain unaffected.”
4 of 4

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

  • Prompt example changes last year's goal total

    Minor

    The calculator prompt is supposed to add an API call to the input text, but its output changes last year's total from 2169 goals to 703 goals.

1 of 1

Citations

Cites

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 12

  1. Ricardo Baeza-Yates, Berthier Ribeiro-Neto, et al. 1999. Modern information retrieval, volume 463. ACM press New York.
  2. Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. 2013. Semantic parsing on Freebase from question-answer pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Lan- guage Processing, pages 1533-1544, Seattle, Wash- ington, USA. Association for Computational Lin- guistics.
  3. Sergey Brin. 1999. Extracting patterns and relations from the world wide web. In The World Wide Web and Databases, pages 172-183, Berlin, Heidelberg. Springer Berlin Heidelberg.
  4. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert- Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901.
  5. Junxian He, Jiatao Gu, Jiajun Shen, and Marc'Aurelio Ranzato. 2020. Revisiting self-training for neural sequence generation. In International Conference on Learning Representations.
  6. Gautier Izacard and Edouard Grave. 2021. Distilling knowledge from reader to retriever for question an- swering. In International Conference on Learning Representations.
  7. Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In Proceedings of machine translation summit x: papers, pages 79-86.
  8. David McClosky, Eugene Charniak, and Mark Johnson. 2006. Effective self-training for parsing. In Pro- ceedings of the Human Language Technology Con- ference of the NAACL, Main Conference, pages 152- 159, New York City, USA. Association for Compu- tational Linguistics.
  9. Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture mod- els. In International Conference on Learning Repre- sentations.
  10. Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Lan- guage models are unsupervised multitask learners. OpenAI blog, 1(8):9.
  11. Roi Reichart and Ari Rappoport. 2007. Self-training for enhancement and domain adaptation of statisti- cal parsers trained on small datasets. In Proceed- ings of the 45th Annual Meeting of the Association of Computational Linguistics, pages 616-623, Prague, Czech Republic. Association for Computational Lin- guistics.
  12. Guillaume Wenzek, Marie-Anne Lachaux, Alexis Con- neau, Vishrav Chaudhary, Francisco Guzmán, Ar- mand Joulin, and Edouard Grave. 2020. CCNet: Extracting high quality monolingual datasets from web crawl data. In Proceedings of the Twelfth Lan- guage Resources and Evaluation Conference, pages 4003-4012, Marseille, France. European Language Resources Association.

Cited by

Sorted by citations

Items 101–200 of 3,205

Metadata

Authors
Schick, T., Dwivedi-Yu, J., Dessì, R., Raileanu, R., Lomeli, M., Zettlemoyer, L., Cancedda, N., & Scialom, T.
Venue
arXiv
Publisher
arXiv
Published
2023
Pages
68539-68551
ISSN
1049-5258 (ISSN-L)
OpenAlex
W7133214447
Cited by
1,150
References
0
Citations by year
2026: 730 · 2025: 136 · 2024: 165 · 2023: 119
FWCI
492.67
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Engineering › Control and Systems Engineering › Robot Manipulation and Learning
  • Physical Sciences › Computer Science › Artificial Intelligence › AI-based Problem Solving and Planning
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Multimodal Machine Learning Applications
Keywords
tool use, language models, self-supervised learning, large language models

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

A language model drew the claims from the paper on 2026-11-08, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-11-08 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review