Skip to content

Tool Use & Function Calling

Let the model pick an API and fill its arguments

Agents & tool useIntermediate#35
inTextAction

What this capability means

Takes a user request and a list of available tools — names, descriptions, argument schemas — and outputs a structured call such as get_weather with city set to Shanghai. The model executes nothing itself; it selects a tool and assembles arguments, while the actual call is made by external code whose result is fed back for further reasoning.

How it is done

Fine-tuning on many examples of when to call, which tool to use and what arguments look like teaches the model to emit a call when it needs external information or action; at inference the tool definitions go into the prompt and the output is constrained to a valid structure. With many tools, retrieval first narrows the candidates, and a multi-turn loop that feeds results back handles complex tasks.

Representative products

10

LangChain

LangChain

Chain models, tools and retrieval together

3Caps
Tool Open source
2022

OpenAI

GPT-4o

A natively multimodal general model, with text, image and audio through one door

4Caps
Model Closed
TextImageAudioTextAudio
2024

Anthropic

Claude

A general chat model known for long context and safety alignment

4Caps
Model Closed
TextImageText
2023

Google DeepMind

Gemini

A natively multimodal general model built for very long context

4Caps
Model Closed
TextImageAudioVideoText
2023

Alibaba (Qwen)

Qwen

An open-weight family spanning many sizes, with multimodal versions

4Caps
Model Open weights
TextImageText
2023

MiniMax

MiniMax-M

An open-weight reasoning model with hybrid attention and a million-token context

4Caps
Model Open weights
TextText
2025

Cohere

Command R

A commercial model built for retrieval augmentation and tool use

4Caps
Model Open weights
TextText
2024

Mistral AI

Mistral Large

The flagship commercial model from a European open-weights lab

4Caps
Model Closed
TextText
2024

Zhipu AI

GLM

A Chinese general model that began with autoregressive blank-infilling pretraining

4Caps
Model Closed
TextText
2023

Meta AI (FAIR)

Llama

The model family that made the open-weight route mainstream

4Caps
Model Open weights
TextText
2023

Organizations involved

Typical uses

  • Fetching live data such as weather, prices or stock
  • Performing business actions such as orders and messages
  • Calling calculators, search and code executors
  • Chaining several APIs for a composite task

How it is evaluated

Function-selection accuracy
Share of requests where the right tool was chosen
Exact argument match
Share with arguments exactly matching the reference
End-to-end task success
Whether the task completes once tools actually run

Limits and hard parts

  • Slightly complex argument shapes — nested objects, arrays, optional fields — are easily filled wrongly
  • As the tool list grows, wrong selections rise sharply, and similar-purpose tools are the most confusable
  • Recovery after a failed call is unreliable, and the model often loops on the error instead of adapting

Concepts behind it

AI Engineering, Safety & Ethics

Agents & Tool UseIntermediate

Let a model do more than answer: search, call APIs, run code — and decide the next step from what came back

4Linked
Figures 1 · Data 1

NLP & Large Language Models

Prompting & AlignmentExpert

Making a model helpful, honest and harmless is harder than simply making it bigger

4Linked
Figures 1 · Data 1

NLP & Large Language Models

Transformer ArchitectureIntermediate

Replacing word-by-word relay with a room where everyone speaks at once, so long-range dependencies are one hop away

4Linked
Figures 2 · Data 2