Updated Aug 20, 2026

Structured Output

Forcing a model to return data in a guaranteed format such as JSON, so software can consume it reliably.

Share

What it means

Prose is fine for humans and useless for programs. Structured output constrains a model to emit data conforming to a schema you supply, so the result parses every time.

The early approach — asking politely for JSON — failed often enough to be unusable at scale, wrapping output in explanations or emitting subtly invalid syntax. Modern implementations enforce the schema during generation itself, restricting which tokens are even permitted at each step so malformed output is impossible rather than merely unlikely.

This is also the mechanism behind tool use: an agent calls a function by emitting a structured call matching the tool's signature. Reliable structured output is therefore a prerequisite for agents, not just a convenience for data extraction.

Why it matters

This is what lets a language model sit inside a software pipeline instead of only in a chat window. It converts a probabilistic text generator into a component with a contract.

In practice

Use the vendor's schema-enforced mode rather than asking for JSON in the prompt, and still validate what comes back. A guaranteed shape is not a guaranteed value — the fields will be present and correctly typed, and their contents can still be wrong.

Where this shows up

Tools and models in our catalog.

Related terms