structured output

Model output that must match a given schema, usually JSON Schema, either by asking in the prompt or by a provider feature that constrains decoding.

In more detail

Provider structured outputs constrain decoding to the schema, so they guarantee the shape, not the content: a value can still be wrong, and a reply cut off by max tokens or refused falls outside the guarantee. Validate every reply in code, check the stop reason first, and repair with the exact validation errors.

Related terms

Taught in

References

Certification courses