47How does constrained / structured decoding force an LLM to emit valid JSON or grammar?▼mediumOpenAIAnthropicMicrosoft2 replies◆ premiumPrompting for JSON works until it doesn't, and at scale the tail breaks your parser. Constrained decoding makes malformed output literally impossible to sample. The signal is knowing exactly where in the loop the constraint takes hold. Here is the answer.Open full answer →
98Why does constrained decoding break on token boundaries, and how do you handle the edge cases?▼expertOpenAIMicrosoftHugging Face2 replies◆ premiumGrammar-constrained decoding seems like a solved problem until tokenization stops lining up with the grammar. The signal is the token-vs-character boundary mismatch and how prefix automata and token healing address it.Open full answer →