Automation & agents · Analysis
Valid JSON can still encode the wrong decision
Separate structural validation from business checks before accepting a model’s decision as product input.

An extractor returns the expected object for a deposit receipt, including a date and amount. The amount parses as a number but belongs to the fee line, and the currency differs from the invoice. Correct formatting has hidden a critical semantic mismatch.
Know what the schema establishes
Structured Outputs can constrain a response to a supported schema. A numeric field still only tells the application its type and position. It does not independently establish that the number came from the right part of the receipt.
Source · OpenAI · Structured Outputs
Compare against separate evidence
Validate currency and precision against the invoice, and require a reference to the original line. When totals disagree, preserve both candidate values and route the item to review. Do not backfill missing values from a guess.
Write a negative acceptance case
Use a receipt with a fee and a transfer amount that share a format. Confirm that the chosen field is matched to the invoice before it can lead to financial effects. Evaluate the controls where the error can actually matter.
Source · NIST · AI Risk Management Framework
What to take away
A reliable pipeline checks structure first and checks meaning against the real task before changing records.