33
structured output
Force JSON or a schema. Prose from a model is a suggestion. A schema is a contract.
What is structured output?
Structured output means the model must fill a schema: JSON, a typed object, a tool call. Invalid shape is a failed generation, not a vibe to parse by eye.
Why does structured output matter when vibe coding?
Agents that emit JSON you then exec are how tools work. If you let the model write a paragraph and you regex it, you will eat a fence. Schema first, like types-as-spec for the prompt.
How do you do structured output?
For any machine-consumed answer, give a JSON schema. Reject extra keys. Parse, do not read.
How do you ask a model for structured output?
Reply with JSON only, matching this schema. No markdown, no preamble. Extra keys are an error.
What goes wrong with structured output?
“JSON-ish” with a code fence and a note. That is prose. Fail the parse and retry.