Skip to content

Tool Use in Language Models

Language models enhanced with access to external tools for improved reasoning and grounding.

Tool use refers to augmenting language models with access to external tools, APIs, or reasoning systems to improve their capabilities beyond pure text generation:

Common tool categories:

  • Information retrieval: Search engines (Google, Bing), knowledge bases, Wikipedia
  • Computation: Calculators, Python interpreters, symbolic math solvers
  • Code execution: Running generated code snippets and capturing outputs
  • External APIs: Database lookups, web services, domain-specific tools

Benefits:

  • Grounding: Tying generated text to factual sources reduces hallucination
  • Specificity: Tools enable precise information retrieval rather than relying on model training data
  • Verification: Execution-based verification (e.g., running code) objectively checks correctness
  • Task specialization: Tools handle domain-specific reasoning better than general models

Challenges:

  • Tool invocation: Models must correctly formulate queries for tools
  • Tool reliability: External tools introduce new failure modes (search engine bias, API errors)
  • Latency: Tool calls add computational overhead
  • Credit assignment: Understanding which tool invocations contributed to success/failure

Key papers in this wiki

  • 2023-chern-factool — Comprehensive framework integrating diverse tools (Google Search, code interpreters, Python, Google Scholar, LLMs) into a unified factuality detection pipeline across QA, code generation, math, and scientific writing

Papers on this topic