Fundamentals
Function Calling
Quick Answer
A feature allowing LLMs to request function execution by returning structured outputs.
Function calling enables LLMs to return structured requests for function execution rather than just generating text. The model analyzes the prompt and decides which function to call with what parameters. The system executes the function and returns results to the model for further processing. This enables agent-like behavior where models can call APIs, database queries, or external tools. Function calling is essential for building AI assistants that can take actions. Most modern APIs (OpenAI, Anthropic) support function calling with different schema formats. It removes the fragile step of parsing model output.
Last verified: 2026-04-08