noun · AI technique
Structured output
also called JSON mode
Asking the AI to fill in a form instead of writing an essay, so other programs can read the answer without guessing.
A way of making a model's reply follow a fixed format, usually JSON matching a schema, so software can parse it reliably.
The request includes a schema describing the exact fields and types wanted. Depending on the API, the model is guided or constrained while generating, so the output parses into the shape your code expects.
Real-life example
You build a tool that pulls the date, amount and vendor out of receipts. Asked for free text, the model sometimes adds a friendly sentence that breaks your parser. Asked for output that matches a schema, you get the same three fields every time, which your code can use directly.
Where the analogy breaks
-
A valid format does not mean correct content. The field can be present and still hold the wrong amount or a made-up value.
-
The reply can still be cut off. If it hits the output limit mid-object, the result is not valid, so leave room for it.
-
Simpler schemas tend to work better. Deeply nested or very large ones are harder to follow and slower, so keep them small and clear.