AI article

Structured Output Doesn't Validate LLMs. It Resamples Them

Community description: Grammar-constrained JSON output doesn't check a model's answer — it rewrites its probability distribution token by token, and that has real correctnes

Dev.to | Nov 6, 2026 | AI Explore

Automated excerpt

The model generates, the schema checks, malformed output gets rejected or retried. When a model generates text under a JSON schema or a grammar (this is how most "guaranteed valid JSON" and typed function-calling implementations work, whether via grammar libraries, FSM-based token maskers, or vendor-side constrained sampling), the decoder doesn't let the model choose freely at each step. You're not getting a reasoning model with structured output bolted on.

Selected automatically from source text; not independently written or fact-checked. Read the original for full context.

Read the original article

Read next

AI briefing: recent picks

More stories to explore