Function calling
Function calling is a model feature that returns a structured request to run a named function with specific arguments, instead of returning prose.
The model does not execute anything; it produces a validated request that your code chooses to run. That separation is the safety boundary, and it is why argument validation belongs in your code rather than in the prompt.
Related terms
- Tool use
- Tool use is a model’s ability to call external functions — searching, running code, querying a database — and incorporate the results into its answer.
- AI agent
- An AI agent is a language model given tools and a goal, which decides for itself which actions to take and in what order until the goal is met.
- Structured output
- Structured output is model output constrained to a machine-readable shape such as JSON, CSV, or a fixed schema, rather than free prose.
More on retrieval and agents
See the full glossary, read the guides, or put it into practice in the prompt builder.