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