Skip to content
Velaris

Technique

What is Structured Output?

Also known as: JSON mode, constrained decoding

Structured output is making a model return data in a guaranteed shape — typically JSON matching a schema — so downstream code can parse it reliably instead of scraping prose.

Asking a model nicely for JSON works most of the time, which is the problem: the one run in fifty that adds a preamble or a trailing comma breaks the parser. Structured output makes the shape a constraint rather than a request. Providers implement it by restricting decoding to tokens that keep the output valid against a supplied JSON Schema, so an extraction task returning an invoice id, an amount and a due date is guaranteed to have those fields with those types — or to fail loudly instead of drifting silently.

Note what it does and doesn't buy you: the shape is guaranteed, the contents aren't — a schema can't stop a model from putting a hallucinated amount in a correctly typed field. Structured output is what makes agents composable. Every hand-off inside a multi-step Velaris agent — a plan into steps, a tool result into the next node's input, a proposed action into the approval prompt you actually read — depends on one step's output being parseable by the next rather than re-interpreted as text.

Related terms

See it in action

Velaris puts structured output to work inside a real AI Operating System.

Get early access