A model that reports high confidence can still be wrong, especially when a document is unusual. Validation is the layer that checks the output against rules the business already trusts. It is what makes extraction safe to connect to a system of record.
A validation layer with required-field checks, cross-field rules, arithmetic reconciliation, confidence thresholds, and a clear human review path.
Step-by-step
-
Separate required from optional fields
List the fields that must be present before a record can post. Missing mandatory data should stop the record immediately, regardless of model confidence. Optional fields can be blank but should be flagged if they are usually present.
Tip: Treat an empty mandatory field as an error, not as an unknown value to guess.
-
Write cross-field rules
Encode relationships the business already knows: due date after invoice date, tax rate within an allowed set, line amounts positive, currency matching the vendor. These rules catch plausible-looking values that are contextually wrong.
Tip: Keep rules in a readable configuration file so finance can review them without reading code.
-
Reconcile totals and totals of totals
Check that line items sum to the subtotal, tax is consistent, and the grand total matches. For multi-page documents, confirm page totals add up. Arithmetic reconciliation is one of the strongest signals available.
Tip: Log the exact difference when reconciliation fails so reviewers can see the size of the gap.
-
Use confidence as a router, not a verdict
Confidence should decide where a record goes, not whether it is correct. Set a high threshold for automatic posting and a lower band for review. Measure how often high-confidence records are later corrected and adjust the threshold from that evidence.
Tip: Track accuracy by field and by vendor. A single global threshold hides weak spots.
-
Compare against an independent source
Where possible, check extracted values against a second source: a purchase order, a vendor master record, or a previous invoice. A mismatch is a reason to review, not necessarily to reject. This is how you catch a correctly read but wrong invoice.
Tip: Use purchase-order matching for amounts, and vendor master matching for identity.
-
Build a review queue that respects the reviewer
Show the original document, the extracted values, the rule that failed, and the proposed correction in one screen. Reviewers should not have to hunt for context. Group similar exceptions so the same fix can be applied in bulk.
Tip: Measure review time per document. If it is close to manual entry time, the queue design needs work.
-
Keep an audit trail of changes
Record the original extracted value, the corrected value, who changed it, and when. This supports audit requirements and gives you training data for improving extraction. Never overwrite the original silently.
Tip: Store the raw model output alongside the validated record for traceability.
Common questions
Is a confidence score enough to trust a value?
No. Confidence measures the model’s certainty, not correctness. Combine it with rule checks and, where possible, an independent source.
What should happen when validation fails?
The record should not post. It goes to a review queue with the failed rule and the source document attached.
How do we improve accuracy over time?
Log corrections, group them by vendor and field, and use the patterns to add templates, rules, or better prompts.