Validate semantic shapes before document fields affect hard-fail decisions

General lesson: structured-output schemas that constrain a document field only to string do not make the value semantically safe. Before OCR/model fields can trigger an irreversible or hard-fail decision, validate bounded length and domain shape (for example, a two-letter jurisdiction and a real normalized date), reject or quarantine malformed outputs, and reconcile contradictory independent evidence through review instead of letting either side hard-fail. This applies to model-generated document extraction; it does not mean a valid barcode is always correct or should automatically override the image.

Applies when: AI-extracted document fields can directly produce terminal eligibility, fraud, or compliance decisions. Keywords: OCR structured output malformed date hard fail conflict review