arXiv cs.CLPaper
Stay Within Your Bounds: Distance-Guided Decoding for Guaranteed Context-Free Grammar Compliance
Grammar-constrained decoding matters for structured outputs: JSON, SQL, code. This approach solves a real problem that existing prefix-feasibility methods don't: guaranteed acceptance even under tokenizer mismatch. If you're shipping agents that need bulletproof JSON or SQL generation, this is worth testing against your current setup.