Dev.to
7/17/2026

The original title is: "Structured Output Gives You Syntax. It Doesn't Give You Semantics"
Original: Structured Output Gives You Syntax. It Doesn't Give You Semantics
Short summary
Structured output guarantees syntactic validity but not semantic correctness — a JSON schema can enforce types but cannot verify that values are true, safe, or grounded in real system state. This creates a new class of production bugs where hallucinated but well-formed data passes validation silently. The author argues teams must treat LLM output like untrusted client input, adding domain-level validation beyond schema enforcement, especially for function calling where wrong arguments execute rather than just sit in a database.
- •Schema-constrained decoding guarantees shape, not truth — well-formed lies replace malformed JSON
- •Function calling raises stakes: wrong-but-valid arguments execute instead of just being stored
- •Teams need domain-level semantic validation, treating LLM output as untrusted input at API boundaries
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



