Constrained decoding
Restricting token generation so outputs follow a grammar, schema, or allowed vocabulary.
What Constrained decoding does not show
It prevents some formatting failures, not semantic errors inside the permitted structure.
Terms this definition uses
Related terms in Models and generation
How a model produces text, what its training and decoding controls change, and what none of them can prove about a source.
Autoregressive model · Transformer · Attention · Self-attention · Parameter · Inference · Pretraining · Fine-tuning · Supervised fine-tuning · Instruction tuning · RLHF · Preference optimization · Knowledge distillation · Quantization · Mixture of experts · Multimodal model · Vision-language model · Small language model · Tokenizer · Temperature · Top-p sampling · Deterministic decoding · System prompt · Developer message · Tool call · Function calling · Structured output · Chain of thought · Reasoning trace · Context caching · Context compaction · Model routing · Model drift · Model version
Questions about Constrained decoding
What is Constrained decoding?
Restricting token generation so outputs follow a grammar, schema, or allowed vocabulary.
What does Constrained decoding not show or guarantee?
It prevents some formatting failures, not semantic errors inside the permitted structure.
Which area of the glossary does Constrained decoding belong to?
Models and generation: How a model produces text, what its training and decoding controls change, and what none of them can prove about a source.
← Structured output · Chain of thought →
See it in the full glossary · 731 terms across 19 areas.