Lesson 8 of 10
Structured Output
Structured output turns an AI response into predictable fields that people and software can check.
Active reading
Understand the idea
Define field names, allowed values and what to do when information is missing. JSON is useful for software; tables and labeled sections can be better for humans.
Example
Return JSON with keys: summary, risk_level, evidence, missing_information. Use null when evidence is missing.
Practice
Apply this lesson to one real task you already have, then write down how you would verify the result.
Common mistake
Asking for JSON but not defining the schema or allowed values.
Key takeaway
A format is reliable only when the contract is explicit enough to validate.