Practice
Learn
← Quit
0 / 0 correct
LLMs & AI
Hard
1 of 40
How do structured-output features (JSON mode, grammar-constrained decoding) guarantee valid JSON?
A
At each step, tokens that would violate the schema/grammar are masked out before sampling
B
The model is asked nicely in the prompt
C
The server retries until it parses
D
They post-process the text with regex