AI engineering glossary · Prompt context engineering

What is schema-constrained generation?

Schema-constrained generation (also called Structured Outputs): Producing model output that is forced to obey a supplied schema, such as a JSON Schema listing required fields, types and allowed values. Enforcement usually happens during decoding, so invalid tokens cannot be chosen, giving reliable parsing.

Level: advancedTopic: Prompt context engineering

Schema-constrained generation: an example

Provide a schema where 'status' must be one of 'paid', 'pending' or 'failed'; the model cannot output any other value.

Related terms

More Prompt context engineering terms

Where you learn it

Schema-constrained generation is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.