Guide-linked quiz · Medium Level
Constrained Decoding Quiz
Review token-level constraints, incremental parsing, structured output limits and the distinction between valid format and correct content.
Question 1 of 8
What does constrained decoding fundamentally do at each generation step?
Preview every question8 questions
Answers and explanations appear as you take the quiz.
- What does constrained decoding fundamentally do at each generation step?
- Masks out tokens that would violate the required structure before sampling
- Retrains the model on structured examples
- Lowers the temperature to zero
- Adds more training data to the prompt
- What can happen if a requested JSON Schema uses a feature unsupported by a structured-output implementation?
- The model silently gains new training data
- The request can be rejected with an error
- All outputs become valid SQL
- The schema is automatically converted to natural language
- What technical challenge makes constrained decoding tricky to implement?
- Models cannot output text at all without it
- It requires a GPU with more than 100GB of memory
- Subword tokens don't cleanly align with grammar symbols
- Grammars cannot be written for JSON
- Which of these is a real format used to specify constraints for decoding?
- A spreadsheet of weights
- A list of GPU temperatures
- A random seed value
- A JSON Schema or context-free grammar
- At what point in the pipeline is the constraint mask typically applied?
- To the logits, before the softmax/sampling step
- Before tokenization of the prompt
- After the text is already printed to the user
- Only during model training
- Compared to simply asking a model in the prompt to 'output valid JSON', constrained decoding offers what advantage?
- It uses less electricity
- It provides a hard guarantee rather than relying on the model's cooperation
- It makes the model more creative
- It removes the need for a tokenizer
- What does PICARD do with a candidate token that would make a partial SQL query unparsable?
- Accepts it and repairs the query after generation
- Retrains the language model immediately
- Rejects that token during incremental parsing before it is emitted
- Deletes the user’s database schema
- What does a schema-conforming output guarantee by itself?
- Every value is true in the external world
- The model used the right source documents
- No refusal or incomplete response can occur
- The output matches the supported structure, not that its values are factually correct
Keep testing yourself
More quizzes picked for your level.