Structured Output Schema
Overview
Structured Output Schema — definition of the structure that the response from an LLM should conform to. The schema is defined in JSON Schema or another formal description format and is used for validation of the output, as well as for constraining generation (structured decoding).
Usage
- Integration with APIs and databases.
- Function calling.
- Data extraction from text.
- Workflow automation.
Example JSON Schema
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer", "minimum": 0 },
"email": { "type": "string", "format": "email" }
},
"required": ["name", "age"]
}