
Schema Is Not Truth
[Intro] (warm Rhodes chord, soft vinyl crackle) (it's valid... but is it true?) [Verse 1] Invoice comes in, you turn it to a record, downstream system reads it, pays out by the dollar. The braces all closed, every type lining up neat, so you sign it off clean and you call it complete. But "well-formed" ain't "right", and that gap's where it bites — a number in the slot that's a number, but a lie. [Pre-Chorus] (build) So pump the brakes before you ship it on through — the shape can be perfect and the value untrue. [Chorus] (drop) Schema is not truth — it guarantees the shape, not the proof. (oh-oh) Schema is not truth — valid JSON can still be wrong on you. (validate!) [Verse 2] Lock the structure down with constrained decoding, grammar from your schema while the tokens are loading. No parse-and-retry, no regex to recover — it's right by construction, that's the cover. But the grammar only checks you put a number in the spot; whether it's the sum of the lines? It cannot. [Verse - Rap] (half-time, crisp) Two first-class moves, let me name 'em precise: `output_config.format` returns JSON nice, schema-valid response, no tool, no parse, and it rides every thinking mode, that's the part — plus `strict: true` on a tool, inputs conform tight, `passengers: 2`, never "two", never "2" in quotes — right. That old fake-tool trick? Legacy, let it go: `tool_choice` forced calls break thinking, returns an error, no. Make every field required so it can't get dropped, mark optional ones nullable so it won't fabricate a prop — required stops omission, null stops the guess, that's the pattern for the missing, nothing more, nothing less. But syntax ain't semantics — say it twice, it's the crux: the grammar guards the shape, but the meaning needs a check. Does the total match the lines? Is the date in the past? That's validation against truth, and it's a separate task. [Chorus] (drop) Schema is not truth — it guarantees the shape, not the proof. (oh-oh) Schema is not truth — valid JSON can still be wrong on you. (validate!) [Bridge] (half-time, sparse) Tick the schema box and walk? That's the trap they set — "guaranteed structured output" and you think the truth's been met. But a failed semantic check means flag it for review, not retry the model — the shape was fine, the content's the issue. Code enforces meaning. A schema enforces frame. And a prompt only suggests — never bet the night on the same. [Final Chorus] (full drop, gang vocals) Schema is not truth — it guarantees the shape, not the proof! (hey!) Schema is not truth — get the shape from the grammar, the truth from a separate move. (validate!) [Outro — call to action] (spoken over the final fade) Want the deep version? Get *The CCA-F Study Guide* on Leanpub — leanpub.com/cca-f (...schema is not truth)

