Before you accept an AI invoice total, check the page

An invoice assistant returns CAD 4,800.00 with high confidence. The number really is on the invoice. That is precisely why it is easy to miss the error: the assistant read the right digits and assigned them the wrong job.

Consider fictional invoice INV-217. In revision 2, page 1 says “Subtotal: CAD 4,800.00.” Page 2 says “Invoice total: CAD 5,424.00.” A third candidate, CAD 5,200.00, is the invoice total on revision 1. One candidate has the wrong meaning, another comes from the wrong file, and only one answers the question for the current revision. A number and a confidence score cannot tell you which mistake you are about to make.

A magnifier frames the TOTAL line beneath SUBTOTAL on an invoice, with a sheet marked OLDER COPY behind it.
AI-generated illustration: check the total against the current invoice, not its subtotal or a superseded copy.

Make the evidence part of the result

When the intake workflow receives a PDF, store the exact bytes as an immutable revision and record its SHA-256 digest. In this example, the intake system, not the extraction model, decides that revision 2 supersedes revision 1. A digest identifies the bytes; it does not tell you which revision is current or whether the invoice is genuine. Keep that distinction in the data model.

For each proposed invoice total, keep the intake record and revision digest, page number, evidence region, field role, and normalized amount and currency. For money, use a decimal or integer minor units; in this case, 542400 cents and CAD. Have the review screen render the crop from the stored PDF rather than accept an image generated by the assistant. Expand the crop beyond the number when necessary so the reviewer can see the label and currency. A rectangle around “5,424.00” alone does not establish whether it is the total, a deposit or a balance due.

Microsoft’s Document Intelligence v4.0 REST schema describes field content, confidence, bounding regions and spans. A region identifies a page and polygon; a span locates text within the result’s concatenated content. Microsoft’s response guide also distinguishes extracted fields from inferred ones that lack source content. Those outputs help locate evidence. They do not establish revision authority or prove that the nearby label supports the proposed role. A confidence score can help order the review queue; it cannot substitute for either check.

Check again when someone accepts it

Show the proposed value beside the page crop. Route missing, ambiguous or conflicting evidence to manual review instead of guessing. If a reviewer corrects the value, capture the replacement evidence and the reason, rather than quietly replacing the number. When they accept the extraction, write the acceptance only if the reviewed revision is still active, using an atomic conditional update. If a replacement PDF arrived while the screen was open, require a fresh review. Record who accepted the amount, which revision they saw and when. Acceptance here means only that the amount was transcribed correctly; it does not approve the invoice or authorize a payment.

Four tests I would run before launch

  • Right digits, wrong role: Return CAD 4,800.00 from page 1 of revision 2. A visible subtotal label must not pass as an invoice total.
  • Right role, wrong revision: Return CAD 5,200.00 with a valid total crop from revision 1. It must not pass for revision 2.
  • Incomplete evidence: Return 5,424.00 with a crop that contains only the number and no verified label or currency reference. It must go to review, even at high confidence.
  • Replacement during review: Open the correct revision 2 crop, make revision 3 active, then try to accept. The stale review must not be saved as current.

A reviewer should be able to answer one question without reopening a mailbox: “Which page of which file shows that this is the invoice total?” If the system cannot show that, the number is still a proposal.

Next step

Need this reviewed in a real system?

Use the article as a starting point, then bring the actual decision, constraints, and failure paths into an architecture review.

Join the discussion

Sign in to comment. Signed-in comments appear immediately.

Join the discussion