← Glossary / 47 of 100

n. / Models and tokens

Structured output

Definition

Structured output is a model reply that follows a fixed format, usually JSON that matches a schema, so your code can read it without guessing. Many providers can enforce the schema while the model generates.

In more detail

Free text is hard to parse reliably. A schema gives you named fields, types and allowed values, and turns most formatting failures into a validation error you can count. Truncation, refusals and a schema that is too loose are the remaining failure modes to watch in traces.

Example

A triage step must return {"priority": "low" | "high", "reason": string}. Your code parses it directly and routes the ticket without reading prose.

Definitions are the start.

Open a real trace and watch these terms move.