Document testing

Testing AI document processing: an acceptance template

Reading time
6 minutes
Published
Written by
modernagents editorial teammodernagents is an AI automation agency for SMEs.
Illustration: documents under a magnifying glass lead to a list of extracted fields

Reading an invoice amount correctly does not establish a working document process. The file must belong to the correct transaction, pass the agreed checks and reach the destination exactly once. Before accepting the system, you should check the document's entire route through the process.

Key takeaways

  • This template contains proposed tests and criteria, not measured performance of a product.
  • Agree thresholds before evaluating results; a possible starting point is no undetected critical error in the agreed sample, all defined failure routes demonstrated and a documented manual fallback.
  • Zero observed errors still does not prove error-free operation; a small test set is a starting point, not a statistical guarantee of future performance.
  • Measure field errors, undetected errors and remaining work separately, and report precision and recall for each critical field.

This template helps process owners evaluate a trial. It contains proposed tests and criteria, not measured performance of a product. Adapt it to the consequences of an error in your business.

01 / 08

Which expected values and boundaries come before the test?

Specify document types, required fields, permitted actions and the authoritative destination. Structured invoice data should be validated through the intended data route; running OCR over the visual PDF is not automatically useful. Scans need a separate assessment of recognition and its errors.

Create an approved sample covering ordinary and difficult cases. Authorized real documents may be needed later; anonymized or synthetic examples can provide a starting point. Record their origin and modifications. Establish correct expected values independently of the system being tested.

A small test set is a starting point, not a statistical guarantee of future performance. Extend it when new suppliers, formats or failures appear.

02 / 08

Reusable test matrix for AI document processing: twelve acceptance cases

Worksheet

Download the editable CSV test sheet

test_idevidence_statusCaseExpected behaviourAcceptance question
D01proposed_test_not_runLegible standard documentRequired fields remain linked to the originalDo values match their source?
D02proposed_test_not_runPoor scanUncertain or missing values go to reviewDoes the system flag a gap instead of inventing a value?
D03proposed_test_not_runSeveral pagesRelated pages remain togetherAre line items or attachments missing?
D04proposed_test_not_runForeign currencyAmount and currency remain separateIs EUR silently assumed?
D05proposed_test_not_runCredit noteDocument type and sign are handled correctlyDoes it become a payable by mistake?
D06proposed_test_not_runConflicting totalsTransaction remains a visible exceptionCan it slip through to export?
D07proposed_test_not_runUnknown supplierAssignment receives domain reviewIs an incorrect match accepted?
D08proposed_test_not_runChanged bank detailsSeparate verification is requiredCan model confidence authorize the change?
D09proposed_test_not_runRepeated documentSecond arrival is detected or held for reviewIs a duplicate destination record created?
D10proposed_test_not_runWrong clientProcessing stops before cross-client assignmentIs client separation preserved?
D11proposed_test_not_runDestination unavailableFailure and owner are visibleCan processing resume without duplicate import?
D12proposed_test_not_runChange after approvalMaterial changes require another reviewDoes approval cover the current version?

Columns to fill in, in the file: test_input_reference, actual_result, pass_fail, review_minutes, reviewer, tested_at, issue_reference.

Add a test filename, expected value, actual result, reviewer, date and issue reference to every row.

The test matrix lists twelve cases, each with the expected behaviour and an acceptance question:

Case Expected behaviour Acceptance question
Legible standard document Required fields remain linked to the original Do values match their source?
Poor scan Uncertain or missing values go to review Does the system flag a gap instead of inventing a value?
Several pages Related pages remain together Are line items or attachments missing?
Foreign currency Amount and currency remain separate Is EUR silently assumed?
Credit note Document type and sign are handled correctly Does it become a payable by mistake?
Conflicting totals Transaction remains a visible exception Can it slip through to export?
Unknown supplier Assignment receives domain review Is an incorrect match accepted?
Changed bank details Separate verification is required Can model confidence authorize the change?
Repeated document Second arrival is detected or held for review Is a duplicate destination record created?
Wrong client Processing stops before cross-client assignment Is client separation preserved?
Destination unavailable Failure and owner are visible Can processing resume without duplicate import?
Change after approval Material changes require another review Does approval cover the current version?

Download the editable CSV test sheet (CSV). Actual results, review time and reviewer fields are blank until you run the tests.

03 / 08

How should AI document processing be measured?

Three measures instead of one score

Three measures describe a trial of AI document processing better than one score:

Field errors: Compare each field with its expected value. Separate missing, wrong and invented values. A correct total does not cancel out an incorrect bank account.

Undetected errors: Establish whether an incorrect critical field passed the agreed control. Correctly referring a difficult case for review is different from incorrectly approving it.

Remaining work: Measure review, correction, questions, retries and routine administration. Compare the same document types with the previous process. Processing speed is not the same as time released for your team.

For example, 20 synthetic documents with five evaluated fields each contain 100 field values. Three incorrect values mean 3% in that particular set. This does not mean “97% of all invoices work”, and says little about document types not yet encountered.

Measure precision and completeness separately

Precision and recall. Google Document AI describes evaluation against labelled test documents using precision and recall. Precision asks what share of returned values is correct. Recall asks what share of expected values was correctly found. A system can return few wrong values while still omitting information the workflow needs. Google evaluation guidance, checked on 26 September 2026.

Per critical field. Report each critical field separately. Invoice number, amount, currency and supplier have different consequences when wrong. For line items, also count missing and duplicate rows. Decide beforehand whether differences such as whitespace are acceptable; do not change the matching rule afterwards to make results look better.

Synthetic example. In a synthetic example, 100 documents contain a purchase reference. The system returns 90 references, of which 85 are correct. Precision is 85/90, approximately 94.4 percent, while recall is 85/100, or 85 percent. Both describe only this field and this test set. The five incorrect outputs and 15 references not correctly recovered call for different improvements.

04 / 08

How do you calibrate confidence using observed errors?

What a confidence score means. A model score of 0.95 does not guarantee that 95 percent of your business cases are correct. Microsoft describes confidence as estimated certainty for particular predictions and explains how to assess it. Microsoft accuracy and confidence guidance.

Count errors per range. Group outputs into confidence ranges and count actual mistakes in each. Evaluate critical fields separately. A legible document assigned to the wrong company may have high recognition confidence and still be operationally wrong. Review routing should therefore combine confidence, deterministic rules and business context.

Thresholds per field. A threshold chosen to maximise a general score may not match your priorities. If a missed payment reference merely requires review while a wrong bank detail has greater consequences, the same automatic acceptance rule is inappropriate for both. Define the permitted action at field and transaction level.

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

AI document processing →

05 / 08

How are changes to model, rules or mapping tested?

Record versions. Record model version, prompt, rules, mapping and destination configuration. When one changes, compare the new variant on the same frozen test set. Add newly discovered failures without replacing the original comparison. This reveals regressions as well as improvements.

Separate preparation and approval. Separate test preparation and approval where practical. The person changing a mapping should not be the sole authority deciding whether an ambiguous expected value should be revised afterwards. Keep disputed cases visible and let the responsible specialist decide.

Acceptance note. End with an acceptance note covering scope, cases actually executed, known limitations, permitted automation and the next review. This is more useful than a general statement that the AI works because it tells operators exactly what the evidence allows them to do.

06 / 08

When should the trial proceed?

Agree thresholds before evaluating results. A possible starting point is no undetected critical error in the agreed sample, all defined failure routes demonstrated, and a documented manual fallback. The responsible domain owner must decide other acceptable error rates based on consequences and effort.

Zero observed errors still does not prove error-free operation. Introduce the workflow gradually, sample outputs and rerun critical tests after changes to recognition, rules or interfaces. Record unresolved issues with owners and dates instead of applying a blanket “passed” label.

07 / 08

What should the supplier hand over?

A supplier handover for AI document processing should contain:

  • the sample
  • expected values
  • results
  • unresolved deviations
  • approval rules
  • recovery instructions
  • where originals, logs and configuration reside
  • who owns operation

See AI document processing for the service scope. BMD users should begin with existing product capabilities. The approval guide explains what makes human review meaningful.

08 / 08

Further worksheets and guidance

Worksheet

Download the acceptance worksheet

CaseExpected
Same document twiceOne destination record
Wrong clientNo automatic approval
Unclear amountSource excerpt and review

Columns to fill in, in the file: Observed, Owner.

Download the acceptance worksheet (CSV)

These guides and service pages cover the decisions next to acceptance testing of AI document processing:

ShareEmail

Related reading

AI document processing

Got a workflow like this?

Tell me about it. Honest take and a rough price, usually within a day.

Robert Van Ysendyck · Founder & Managing Director