Structured Output
Also known as: JSON mode, Constrained decoding
Force the model's output to match a schema: JSON, regex, or a context-free grammar.
Constraining an LLM to produce output that conforms to a specific schema (JSON, regex, grammar). Implemented via prompt-and-pray, retry loops, or constrained decoding that masks invalid tokens at sample time.
In practice
Foundational for any LLM-as-API integration. Expect questions on outlines/llguidance, OpenAI JSON mode, and failure modes.
How it compares
Function calling is a specific case of structured output (schema = tool signature); structured output is the general idea.
Related topics
Related terms
Prompt Engineering
Crafting the input text so the model produces the behavior you want.
AI Agents
LLMs that loop: plan → call tools → observe results → repeat until done.
Model Context Protocol (MCP)
An open protocol (from Anthropic) for letting LLMs call tools and read resources from any compatible server.
Chain-of-Thought (CoT)
Ask the model to think step by step before answering. It boosts accuracy on reasoning tasks.
In-Context Learning (ICL)
Show the model a few examples in the prompt and it learns the pattern, no fine-tuning needed.
Function Calling
The model emits structured JSON specifying a tool call instead of free text; the host executes it.