In "Structured Outputs from LLMs" I argued that constrained decoding solves syntax, not semantics: a schema can guarantee a total is a number, not that it is the right number. The article also recommended schema choices it hadn't measured: an explanation-first notes field, an OTHER value in closed enums, required-but-nullable fields, and business-rule validation after the schema. This experiment measures them.
The documents are 120 invoices rendered from real orders in the Kestrel Outfitters data from my Agentic AI book series, so every field has a known right answer. They come in four layouts (a clean table, a forwarded email, a noisy scan, prose), and most carry one deliberate trap: an order value printed bigger than the amount due, a pre-discount total, a JPY or CAD partner invoice, no due date, a credit note, a date like 09/10/2025 on a UK invoice, or the amount due only in words.
Seven conditions extract the same invoices: instructions only, tool use, strict tool use and structured outputs with a first-draft schema, then structured outputs with a designed schema, the designed schema without its notes field, and the designed schema plus business-rule checks with one retry. Every record is graded field by field against the truth, alongside whether it matched its schema. Claude Haiku 5.5 and Sonnet 5.5 produced 1,680 records for USD 4.87.
The models read every value trap correctly. Across the 1,620 records that came back there was not one wrong total, subtotal, date or invoice number. Every error came from the request. A closed USD, GBP or EUR enum made structured outputs record a ¥114,184 invoice as USD 114,184, schema-valid and wrong, on all 30 such records. The tool conditions declined to call the tool at all, and an optional due date was dropped four times though it was printed.
The designed schema, with descriptions, OTHER in the enum and a required-but-nullable due date, took structured outputs from 88% to 100% of records fully right on both models. The business rules caught none of the forced-USD records, because their arithmetic still added up. Two claims couldn't be tested on documents this clean: the notes field had no errors left to fix, and the validated condition never needed to retry.