Function Calling
Function calling is an LLM capability where the model — given a schema of available functions — emits a structured invocation (function name and JSON arguments) instead of free-form text, letting downstream code execute the call deterministically.
AIDOLS Research Team · Editorial standards
Full definition
Function calling was popularized by OpenAI in June 2023 and is now standard across Anthropic, Google, and open models. The model is fine-tuned to recognize when a user request maps to a tool, fill arguments from the conversation, and return a parseable structure. It is the substrate beneath tool use, agents, and structured-output applications. Pitfalls: hallucinated arguments, schema drift, and mishandling of parallel calls.
Why it matters
Function calling is the contract between probabilistic LLMs and deterministic enterprise systems. Done well, it lets LLMs participate safely in databases, payments, and workflows. Done poorly, it is a common cause of agent failures in production.
Example
A finance copilot exposes get_transaction(id) and refund_transaction(id, amount). The LLM resolves "refund the duplicate charge from yesterday" into two function calls; the application enforces the actual authorization.
Next steps
Related terms
- Tool Use (LLM)LLM tool use is the pattern in which a language model acts through external functions, APIs, databases or code execution: the model requests a tool, the host application runs it and returns the result, and the model continues, turning a text generator into a controller that can act. Function calling is the structured-output mechanism most tool use is built on.
- Agentic WorkflowAn agentic workflow is a multi-step AI process where a model plans, takes actions through tools, observes results, and iterates toward a goal — replacing single-shot prompting with a loop that reasons, acts, and self-corrects.
- AI Agent / Agentic AIAn AI agent is an LLM-driven system that, given a goal, plans a sequence of steps, calls tools or APIs, observes the results, and iterates until the goal is reached — going beyond single-turn chat to multi-step autonomous action.
- AI GuardrailsAI guardrails are the layered controls — input filters, output classifiers, policy engines, schema validation, and structured generation — that constrain an AI system to safe, on-policy, and on-task behavior.
More deployment & operations terms
- Multi-Agent SystemA multi-agent system orchestrates multiple specialized AI agents — often LLM-powered, with distinct roles, tools, and prompts — that communicate, coordinate, and divide labor to solve a problem larger or more diverse than any single agent could handle reliably.
- Dense Passage Retrieval (DPR)Dense Passage Retrieval (DPR) is a retrieval method that embeds queries and passages into the same vector space using two BERT encoders (a dual encoder) trained with contrastive loss on (question, positive-passage) pairs.
- Embedding ModelAn embedding model is a neural network that maps text, images, or other inputs into fixed-dimensional vectors where semantic similarity corresponds to geometric closeness (cosine or dot-product distance).
Source & further reading
Primary source: OpenAI — "Function calling and other API updates" (2023).
Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/en/glossary/function-calling/.