Skip to main content

AI coding · Advanced

Structured Output

Also called: JSON mode, Schema output, Constrained decoding

Require the model to return a agreed JSON/Schema so programs can parse it directly instead of scraping free-form text.

In detail

Free text is for humans; programs need stable fields. Structured output makes the model follow a JSON Schema or tool format while decoding, which cuts down on missing braces and renamed fields.

Common product uses: extract filters from a user sentence, build form defaults, pack page diagnostics into fixed fields. It often appears with Tool calling: the model picks a tool, and the arguments are structured too.

A schema does not guarantee truth. Fields can still be hallucinations—validate and fall back.

Developer info
Term ID
ai-structured-output
DOM selectors
No DOM cues. This concept isn't detected directly on a page.
Priority
1 · when several match at the same level, the higher priority wins
Version
v1 · updated Oct 5, 2026