AI Ops Glossary

Tool Use

Tool use is a large language model's ability to call external tools, such as search engines, calculators, code interpreters and APIs, and to use what they return in its answer or its next action. Researchers also call it tool learning. OpenAI's API documentation calls it function calling, also known as tool calling.

The motivation is practical. Language models struggle with basic functionality such as arithmetic or factual lookup, where much simpler and smaller models excel, so a tool call hands that work to a system built for it. A 2024 survey of tool learning splits the workflow into four stages: task planning, tool selection, tool calling and response generation.

Tool use is also how AI agents act: in the agent test environments NIST's CAISI used, agents complete tasks with sets of simulated tools. NIST describes AI agent systems as capable of planning and taking autonomous actions that impact real-world systems or environments.

Tool Use at a Glance

Also calledFunction calling, tool calling, tool learning
What it doesLets a model select a tool, fill in its arguments, and use the output in a response or a next step
Where it's used in model developmentInstruction-tuning data for tool calls, function-calling benchmarks, multi-turn agent evaluation, agent security testing
The human roleWriting and validating ground-truth call trajectories, checking that each path is executable and matches the user's intent, red teaming
LimitsWrong or hallucinated arguments, calls when no tool fits, loops in multi-step tasks, inconsistent results across runs, exposure to indirect prompt injection

How Tool Use Works

Tool use works as a loop: the developer describes the available tools, the model decides whether to call one, the application runs the call, and the result goes back to the model.

The tool definition

Each tool is described to the model in the request. In OpenAI's API, a function is a specific kind of tool defined by a JSON schema, with a name, a description and typed parameters. The same platform offers custom tools that take free-text input and built-in tools that search the web, run code or access an MCP server.

The calling loop

  1. The application sends a request with the tools the model could call.
  2. The model returns a tool call: a tool name and arguments.
  3. The application executes the call in its own code.
  4. The application sends the tool output back to the model.
  5. The model gives a final response or requests more tool calls.

The loop can repeat for as many calls as the task requires. The ReAct method interleaves reasoning traces with actions, so the model can track and update its plan and handle exceptions between calls.

Call patterns

The Berkeley Function Calling Leaderboard (BFCL) separates simple calls, multiple-function cases (pick one function from 2 to 4 options), parallel calls and parallel multiple calls. Its V3 release added multi-step tasks (several calls for one request) and multi-turn tasks (several user turns).

How Tool Use Is Trained and Evaluated

Tool use is trained on demonstrations of correct calls and evaluated by checking each call, or the system state the calls leave behind, against a reference.

Training data

  • Self-supervised: Toolformer learned which APIs to call, when, and with what arguments from a handful of demonstrations per API.
  • Model-generated: ToolLLM's ToolBench dataset covers 16,464 real-world RESTful APIs across 49 categories, with instructions and solution paths generated using ChatGPT.

Evaluation methods

  • AST matching: BFCL parses each call into an abstract syntax tree, then checks the function name, required parameters and types, and flags parameters that are not in the function documentation.
  • Execution: BFCL also runs the functions to confirm the generated calls work.
  • Relevance detection: when none of the provided functions fits, the expected output is no call, which shows whether a model invents a function and its parameters.
  • State checks: BFCL V3 verifies the actual state of the API system after the model runs its functions. τ-bench compares the database state at the end of a conversation with an annotated goal state.
  • Reliability: τ-bench's pass^k metric measures whether an agent succeeds consistently over multiple trials.

Limits of Tool Use and the Human Role

Tool use fails in ways a final answer can hide: wrong arguments, invented calls, loops and inconsistent behavior across runs.

  • Arguments and hallucination: the Gorilla authors traced failures to models' inability to generate accurate input arguments and their tendency to hallucinate the wrong usage of an API call.
  • Loops: BFCL V3 documents models listing a directory, trying to write to a file that isn't there, and listing again.
  • Consistency: in the 2024 τ-bench paper, state-of-the-art function-calling agents such as gpt-4o succeeded on fewer than 50% of tasks, and pass^8 was below 25% in the retail domain.
  • Security: NIST's Center for AI Standards and Innovation (CAISI) warns that many agents are vulnerable to agent hijacking, an indirect prompt injection hidden in data such as an email, a file or a website.

Where people fit

The BFCL V3 team concluded that a synthetic dataset alone is not enough and that human labeling is essential. Expert human labelers wrote ground-truth trajectories for each turn, and the dataset went through 11 rounds of data filtering. People and automated checks then validated each ground-truth path for executability, alignment with the user's request and brevity.

Tool Use vs. Function Calling vs. AI Agents

Tool use is the capability, function calling is an API mechanism for it, and an AI agent is a system that plans and takes autonomous actions, often chaining several calls together.

TermWhat it isHow it is tested
Tool useA model's ability to plan, select, call and use external toolsPer-stage benchmarks for planning, selection, calling and response
Function callingTool calls made through tools defined by a JSON schemaCall matching and execution, as in BFCL
AI agentA system that plans and takes autonomous actions in real-world systemsMulti-step and multi-turn tasks scored on end state, plus hijacking tests

Tool Use at Hugo

Hugo's Advanced Reasoning, Agentic Coding and STEM Evals teams evaluate tool use and multi-step agent behavior by running it, not by reading it. Reviewers trained on the client's tools assess tool calls, terminal commands, repository navigation and error recovery across whole trajectories, and every sandbox is verified before an evaluation batch, with environment failures logged separately from model failures. A QA and calibration lead owns the quality standards. Hugo's guide to testing agent reasoning, tool use and task completion covers the evaluation side in more depth.

Tool Use FAQs

What is tool use in large language models?

Tool use in large language models is the ability to call external tools, such as search engines, calculators, code interpreters and APIs, and to use their results in a response. The 2023 Toolformer paper framed the motivation: language models struggle with arithmetic and factual lookup, where much simpler and smaller models excel. A survey of tool learning splits the workflow into four stages: task planning, tool selection, tool calling and response generation. When scoping an evaluation, decide which stages you are grading.

Is tool use the same as function calling?

Tool use and function calling are near synonyms: tool use names the capability, and function calling is the API mechanism through which a model exercises it. OpenAI's documentation says function calling is also known as tool calling, and defines a function as a specific kind of tool described by a JSON schema. The Berkeley Function Calling Leaderboard likewise treats function calling and tool calling as one capability. Use tool use for the capability and function calling for the API mechanism.

How do you evaluate an LLM's tool use?

LLM tool use is evaluated by matching each call against a reference, executing the call, or checking the system state the calls leave behind. The Berkeley Function Calling Leaderboard parses calls into an abstract syntax tree to check function names, required parameters and types, and also executes functions. Its relevance-detection tests expect no call when no provided function fits. τ-bench compares the database state at the end of a conversation with an annotated goal state and adds a pass^k metric for reliability over multiple trials. Ask an evaluation partner how it scores tasks with more than one valid path.

Why do LLMs fail at tool use?

LLMs fail at tool use mainly through inaccurate arguments, hallucinated calls, loops and inconsistent behavior across runs. The Gorilla paper attributed failures to models' inability to generate accurate input arguments and their tendency to hallucinate the wrong usage of an API call. BFCL V3 documents models listing a directory, trying to write to a file that isn't there, and listing again. In the 2024 τ-bench paper, state-of-the-art function-calling agents such as gpt-4o succeeded on fewer than 50% of tasks. Score whole trajectories, not only final answers, so mid-task errors are counted.

How are LLMs trained to use tools?

LLMs learn tool use from demonstrations of correct calls, which can come from the model itself, another model or human labelers. Toolformer was trained in a self-supervised way from a handful of demonstrations per API. ToolLLM built ToolBench from 16,464 real-world RESTful APIs across 49 categories, using ChatGPT to generate instructions and search for valid solution paths. Gorilla fine-tuned a LLaMA-based model and paired it with a document retriever to adapt to documentation changes. The BFCL V3 team concluded that synthetic data alone is not enough and human labeling is essential.

What are the security risks of LLM tool use?

One security risk of LLM tool use that NIST highlights is agent hijacking, an indirect prompt injection in which malicious instructions hidden in data such as an email, file or website push an agent into unintended actions. In NIST CAISI's tests on agents powered by an upgraded Claude 3.5 Sonnet, attacks built in a red-teaming exercise raised the attack success rate from 11% for the strongest baseline attack to 81% for the strongest new attack. Attempting each of five injection tasks 25 times raised the average attack success rate from 57% to 80%. Test tool-using models against attacks built for them, over multiple attempts, and constrain agent access.

When should you use human reviewers for tool-use evaluation?

Human reviewers are needed in tool-use evaluation wherever ground truth must be written or checked, especially for multi-turn trajectories. For BFCL V3, expert human labelers wrote ground-truth trajectories for each turn, and the dataset went through 11 rounds of data filtering. People and automated checks confirmed that each ground-truth path was executable, aligned with the user's request and concise. When outsourcing this work, ask how reviewers are trained on your tools, how disputed trajectories are resolved, and how environment errors are separated from model errors.

Sources

  1. Changle Qu, Sunhao Dai, Xiaochi Wei, Hengyi Cai, Shuaiqiang Wang, Dawei Yin, Jun Xu, Ji-Rong Wen. Tool Learning with Large Language Models: A Survey. Frontiers of Computer Science. Updated November 4, 2024. Accessed November 10, 2026.
  2. OpenAI. Function calling | OpenAI API. Accessed November 10, 2026.
  3. Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Luke Zettlemoyer, Nicola Cancedda, Thomas Scialom. Toolformer: Language Models Can Teach Themselves to Use Tools. Updated February 9, 2023. Accessed November 10, 2026.
  4. Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, Yuan Cao. ReAct: Synergizing Reasoning and Acting in Language Models. Updated March 10, 2023. Accessed November 10, 2026.
  5. Shishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. Gonzalez. Gorilla: Large Language Model Connected with Massive APIs. Updated May 24, 2023. Accessed November 10, 2026.
  6. Yujia Qin, Shihao Liang, Yining Ye, et al. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs. Updated October 3, 2023. Accessed November 10, 2026.
  7. Fanjia Yan, Huanzhi Mao, Charlie Cheng-Jie Ji, Ion Stoica, Joseph E. Gonzalez, Tianjun Zhang, Shishir G. Patil (UC Berkeley). Berkeley Function Calling Leaderboard. Updated August 19, 2024. Accessed November 10, 2026.
  8. Huanzhi Mao, Fanjia Yan, Charlie Cheng-Jie Ji, et al. (UC Berkeley). BFCL V3 • Multi-Turn & Multi-Step Function Calling. Updated December 10, 2024. Accessed November 10, 2026.
  9. UC Berkeley Gorilla project. Berkeley Function Calling Leaderboard (BFCL) V4. Updated April 12, 2026. Accessed November 10, 2026.
  10. Shunyu Yao, Noah Shinn, Pedram Razavi, Karthik Narasimhan. $τ$-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains. Updated June 17, 2024. Accessed November 10, 2026.
  11. NIST, Center for AI Standards and Innovation (CAISI). Technical Blog: Strengthening AI Agent Hijacking Evaluations. Updated December 19, 2025. Accessed November 10, 2026.
  12. NIST, Center for AI Standards and Innovation (CAISI). CAISI Issues Request for Information About Securing AI Agent Systems. Updated January 12, 2026. Accessed November 10, 2026.

Build the Dedicated Team Behind Your AI Operations

Whether you need model evaluators, coding specialists, multilingual reviewers, or multimodal data teams, Hugo can help you build and manage the human operations layer behind better AI.

  • Dedicated Specialists

  • Quality You Can Trust

  • Built to Scale With You

  • Secure, Compliant & Reliable