Loading…
Glossary term
Model output constrained to a defined format, such as valid JSON.
Structured output constrains a model to a defined format, typically JSON that matches a schema. Some systems enforce this while generating, by only allowing tokens that keep the output valid. That makes the result safe to parse in code.
A JSON schema and a matching output
{
"schema": {"type": "object", "properties": {"name": {"type": "string"}, "age": {"type": "integer"}}},
"output": {"name": "Ana", "age": 31}
}Software cannot depend on free-form text, so structured output is essential for connecting models to applications.