Agents & tools · Glossary term
What is Structured Output?
Model output constrained or validated against a machine-readable schema so application code can consume fields without parsing free-form prose.
Why does Structured Output matter?
It reduces format ambiguity at the model-to-software boundary and enables field-level validation and retries.
Structured Output in practice
Require an incident triage result with an allowed severity enum, evidence array, and nullable escalation reason, then reject any response that fails the schema.
What is the common confusion about Structured Output?
Schema-valid output can still contain incorrect values. Structure is not factual verification.
Learn Structured Output in the course
Start with
- Structured Outputs: JSON, Schema Validation, Constrained Decoding
Your LLM returns a string. Your application needs JSON. That gap has crashed more production systems than any model hallucination.
Lessons that name Structured Output in a title or section
- Structured Outputs & Constrained Decoding
Ask an LLM for JSON. Get JSON most of the time. In production, "most" is the problem. Constrained decoding turns "most" into "always" by editing the logits before sampling.
- Structured Output — JSON Schema, Pydantic, Zod, Constrained Decoding
"Ask the model nicely to return JSON" fails 5 to 15 percent of the time, even on frontier models. Structured outputs close that gap with constrained decoding: the model is literally prevented from…
- Dialogue State Tracking
"I want a cheap restaurant in the north... actually make it moderate... and add Italian." Three turns, three state updates. DST keeps the slot-value dict in sync so the booking works.
- Function Calling & Tool Use
LLMs cannot do anything. They generate text. That is the entire capability. They cannot check the weather, query a database, send an email, run code, or read a file.
Taught in Phase 11: LLM Engineering.
Also covered in Phase 05: NLP: Foundations to Advanced and Phase 13: Tools & Protocols.
Related terms
- Function CallingA provider or application interface through which a model emits a structured request naming a tool and its arguments.
- Tool ContractThe complete agreement for a tool boundary: purpose, typed inputs, outputs, validation, permissions, side effects, errors, timeouts,…
- Verification GateA control point that blocks progress until defined evidence satisfies a correctness or quality criterion.
- Exact Match (EM)A metric that counts an output as correct only when its normalized representation exactly equals an accepted reference answer.
- Prompt EngineeringDesigning model-facing instructions, examples, constraints, and output requirements to improve behavior on a defined task.
- Stop SequenceAn application-specified token or text pattern that causes generation to stop when the decoding system encounters it.
More terms in Agents & tools
- Agent
- Agent Harness
- Agent Memory
- Agent State
- Agent Skill
- Approval Gate
- Checkpoint
- Compensating Action
- Delegation
- Durable Execution
- Function Calling
- Human-in-the-Loop (HITL)
- MCP (Model Context Protocol)
- Multi Round-Trip Request (MRTR)
- Orchestration
- Planning
- ReAct
- Sandbox
- Skill Bundle
- Skill Catalog
- Skill Discovery
- Skill Invocation
- Stateless MCP
- Swarm
- Termination Condition
- Tool Contract
This entry comes from glossary/terms.md on GitHub. Browse all 250 glossary terms.