Tool Use Motivation: Why LLMs Need External Tools for Accuracy › Categories of Tools
Language AI HandbookAll chapters Tool Use Motivation: Why LLMs Need External Tools for Accuracy › Categories of ToolsOne section · Sections in this chapter5 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Tools that augment LLM capabilities fall into distinct categories based on the type of limitation they address. Understanding these categories helps in designing systems that match the right external capabilities to specific tasks, creating a complete toolkit that extends the LLM's reach into domains where it would otherwise fail.
Information Retrieval Tools
These tools extend the model's knowledge beyond its training cutoff and parametric memory, acting as prosthetic extensions to the model's limited recall. Unlike the static retrieval systems we discussed in Part XLIV, these tools can access live information sources that update continuously.
Search engines give access to the current web, letting models to discover recent events, updated documentation, or niche information absent from training data. When a model encounters an unfamiliar term, a recent development, or needs current statistics, search bridges the knowledge gap by fetching fresh information from the internet. The model can then synthesize this fresh context into its response rather than relying on potentially stale parametric knowledge.
Database queries let access to structured, proprietary, or dynamic information stores that exist behind APIs or in private systems. While RAG systems work with document corpora, database tools allow precise SQL queries against relational databases, graph traversals in knowledge graphs, or lookups in specialized vector stores containing private enterprise data. This is needed for enterprise applications where the relevant information lives in internal systems that no web crawler has ever indexed.
Knowledge APIs give curated information from specific domains: scientific databases like PubMed, legal repositories containing case law, medical knowledge bases, or financial data feeds from markets. These offer higher reliability than general web search for specialized domains where accuracy is necessary and general search might surface unreliable sources.
The design of information retrieval tools also affects their usefulness in practice. A search tool that returns raw webpage HTML is harder for a model to parse than one that returns extracted, cleaned text. A database tool that returns paginated result sets forces the model to reason about pagination in ways that distract from the underlying task. Well-engineered retrieval tools pre-process their outputs to match the format the model can most easily reason about: clean text snippets with source attribution for web search, structured records with field names for database results, normalized data with units for APIs.
Computation Tools
These tools address the computational limitations of neural networks by giving access to symbolic execution environments that guarantee mathematical precision.
Calculators and mathematical engines, such as Python's math module, SymPy for symbolic mathematics, or WolframAlpha for complete computational knowledge, handle precise arithmetic and algebra as well as calculus and symbolic manipulation. They eliminate arithmetic errors and let complex mathematical reasoning that would be error-prone or impossible for neural networks alone. The key design principle here is determinism: a computation tool should return the same result every time for the same input. This gives a reliable anchor of correctness in a system where the neural components introduce stochastic variability.
Code execution environments allow models to write and run code to solve problems algorithmically. As we saw in Part XXVIII on autoregressive generation, models can generate code, but with execution tools, they can verify correctness by running the code, handle data processing tasks on actual datasets, or perform analyses requiring exact computation and data manipulation. Code execution is particularly powerful because it turns the model's ability to describe algorithms into an ability to execute them. The model writes a sorting function, runs it on actual data, checks whether the output is sorted correctly, and revises if needed, all within the same conversation.
Logic engines give access to formal reasoning systems, constraint solvers, or theorem provers for tasks requiring rigorous logical deduction beyond pattern matching. These can verify logical proofs, solve constraint satisfaction problems, or check the validity of logical arguments with guaranteed correctness. For domains like legal reasoning, formal verification, or complex scheduling, logic engines give a level of reliability that pure neural reasoning cannot match.
Action and Integration Tools
These tools overcome the text-only barrier by letting the model to interact with external systems and affect the world, transforming the LLM from a passive generator into an active agent.
API clients allow the model to call REST APIs, trigger webhooks, or interact with cloud services. This makes possible integration with business systems like CRM platforms, IoT devices, or third-party services like payment processors or booking systems. An LLM with API access can move beyond telling a user how to book a flight to booking it, and beyond explaining how to send an email to sending it.
Database manipulation tools go beyond querying to allow inserts and updates as well as deletes. This makes possible the model to maintain state across conversations, log interactions for audit trails, or modify records based on your instructions to create persistent changes in systems. With these tools, an LLM can act as a natural language interface to a database, letting users describe what they want in plain English and translating those descriptions into safe, validated database operations.
System control interfaces give capabilities like file system access, process management, or browser automation, letting models to perform software engineering tasks, data processing pipelines, or web-based workflows that require interacting with graphical interfaces or operating system resources. A model with browser automation can open a website, fill out a form, and click a submit button, tasks that previously required brittle hard-coded automation scripts.
The design of action tools requires careful attention to safety and reversibility. A read-only database tool is far safer than one that allows writes, because a wrong read simply returns incorrect information, while a wrong write may permanently corrupt data. Best practice in tool design follows the principle of minimum necessary privilege: give the model access to exactly the capabilities it needs for the task, and no more. If a task only requires reading customer records, the tool should not give write access to the same table.