Back to Table
FcFunction Call2
Function Call
LLMs that take action
reactiveRow 2: Compositionsintermediate2 hoursRequires: Pr, Lg
Overview
Function calling enables LLMs to interact with external systems by generating structured function calls based on natural language input.
What is it?
The ability for LLMs to generate structured outputs that trigger real-world actions.
Why it matters
Function calling transforms LLMs from text generators into action-takers. It's the foundation of AI agents.
How it works
You define available functions with schemas. The LLM decides when to call them and generates the arguments. Your code executes the actual function.
Real-World Examples
API Integration
LLM calling weather, search, or database APIs
Tool Use
AI using calculators, code interpreters, browsers
Structured Output
Generating JSON, SQL, or other formats
Tools & Libraries
OpenAI Functionsservice
Native function calling in GPT models
LangChain Toolslibrary
Standardized tool interface
Claude Tool Useservice
Anthropic's function calling