Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

Structured output

Also: structured outputs

In plain words

An answer in a set format, such as named fields. Software can check the format, but the facts still need review.

The fuller definition

Structured output follows a defined format or schema, such as JSON with specified fields and allowed values. Some APIs constrain generation to a supported schema.

How it fits together
  1. Schema

    Required fields

  2. Generation

    Produce matching output

  3. Validation

    Check shape and meaning

A simplified relationship, not a screenshot or a complete design.

A concrete example

An extraction result contains source_id, date, and uncertainty fields in a predictable shape.

The distinction that matters

A valid structure can still contain a wrong date or invented source. Validate content as well as syntax.

Related terms

Where it is taught

Give AI a brief it can actually follow

Source and further reading

Anthropic · Context engineering

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC