Document testing

Testing AI document processing: an acceptance template

Reading time
9 minutes
Updated
Published
Written by
modernagents editorial teammodernagents is an AI automation agency from Austria for SMEs, based in the Vienna region.
AI-generated image: Document scanner with an indigo lid and test sheet on a black rubber mat

Suppose a vendor has shown you the demo, and now you want to test the AI document processing before it handles real documents in your business. In a demo like this, amount, supplier and IBAN often sit neatly in their fields. But how do you tell whether the system also copes with your poor scans, credit notes and invoices that were sent twice?

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, for example your accounting software. Before accepting the system, you should check this entire route.

An example: an accounting office in Zwolle with 15 employees books many incoming invoices for its clients every month. Jeroen runs the bookkeeping team. A vendor wants to introduce AI document processing that reads invoices and passes them to the accounting software. Before the system works with real documents, Jeroen runs a trial with documents from the office's everyday work. This template helps process owners like him evaluate a trial. It contains proposed tests and criteria, not measured performance of a product. Adapt the cases to the consequences an error has in your business.

Key takeaways

  • In the test, check a document's entire route into the destination system, not just the extracted field.
  • Decide when the trial counts as passed before you look at the results.
  • If no error occurs in the test, that still does not prove the system works without errors.
  • Evaluate field errors, undetected errors and remaining work separately, with precision and recall for each critical field.

01 / 08

Which expected values and boundaries come before the test?

Before the first test document runs through, Jeroen writes down what should come out. Specify which document types you test, which fields are required, which actions the system may take and which destination system is authoritative. Structured invoice data should be validated through the intended data route. Running additional text recognition (OCR) over the visual PDF is not automatically useful. Scans, on the other hand, need a separate test of recognition and its errors.

Put together an approved sample of ordinary and difficult cases. At Jeroen's office, for example, these are the usual invoice from an office-supplies supplier, a crooked scan of a tradesman's receipt and a credit note. Real documents you are authorised to use may be needed later, but you can start with anonymised or invented examples. Record where each test document comes from and how it was modified. Have the correct expected values set independently of the system being tested, at Jeroen's office for example by a colleague who checks each document by hand.

A small test set is a starting point and 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.

Jeroen runs each of the twelve cases with its own test document. Add to every row: test file, expected value, actual result, reviewer, date and issue reference.

For each case, the table says how the system should behave and which question you ask at acceptance:

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?

With the credit note, for example, Jeroen sees straight away whether the system turns it into an invoice to be paid. And if the same document arrives a second time, he sees whether two entries are created in the accounting software.

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

At the end of the trial, management wants to know how good the system is. A single score answers that badly, while three measures describe a trial of AI document processing better:

  1. Field errors. Compare each field with its expected value. Record missing, wrong and invented values separately. A correct total does not cancel out an incorrect bank account.
  2. Undetected errors. Check in particular whether an incorrect critical value gets through the agreed control. A system that correctly refers a difficult case to Jeroen for review has to be judged differently from one that incorrectly approves the same case.
  3. Remaining work time. Measure the time for review, correction, questions, retries and routine administration. Compare the same document types with the previous process. How fast the system processes is not yet the time your team gains.

Suppose Jeroen tests 20 invented documents with five evaluated fields each. Then there are 100 field values to judge. Three incorrect values mean 3% in that particular set. This does not mean "97% of all invoices work", and it says little about document types not yet encountered.

Measure precision and completeness separately

Jeroen has to tell two kinds of error apart, namely a wrong value that the system returns and a value that is there but that it does not find. Google Document AI describes evaluation against labelled test documents using precision and recall. Precision asks what share of returned values is correct, and recall what share of expected values was correctly found. A system can return few wrong values while still missing many values you need. Google evaluation guidance, checked on 26 September 2026.

So evaluate and report each critical field separately. Invoice number, amount, currency and supplier have different consequences when they are wrong. For line items, meaning the individual lines of an invoice, also count missing and duplicate rows. Decide beforehand whether differences such as whitespace are acceptable, and do not change this matching rule afterwards to make a result look better.

Suppose 100 documents in Jeroen's test set contain a purchase reference, and the system returns 90 references, of which 85 are correct. Precision is then 85/90, approximately 94.4 percent, and recall is 85/100, or 85 percent. Both numbers describe only this field and this test set. The five incorrect outputs and the 15 references that were not correctly found call for different improvements.

04 / 08

How do you calibrate confidence using observed errors?

In this example, the system shows a number next to the extracted values, the confidence score. Jeroen wonders whether he can simply trust a value of 0.95. But such a model score 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.

Group the outputs into several confidence ranges, and count the mistakes that actually occurred in each. Also evaluate critical fields separately. A legible document assigned to the wrong client may have high recognition confidence and still be wrong for the business. Whether a document goes to a person for review should therefore depend on confidence, fixed rules and business context together.

A threshold chosen to maximise an overall score may not match your priorities. If a missed payment reference merely triggers a review at Jeroen's office while a wrong bank detail has more serious consequences, the same automatic acceptance rule is inappropriate for both. Define for every field and every transaction which action is permitted.

Got a workflow like this?

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

05 / 08

How are changes to model, rules or mapping tested?

Suppose the vendor switches to a new model version a few months after launch. So record from the start the model version, prompt, rules, mapping, meaning how fields are assigned to the destination system, and the configuration of the destination system. When one of these parts changes, compare the new variant on the same frozen test set. Newly discovered failures are added, but they do not replace the original comparison. This shows you improvements as well as regressions.

Separate, as far as practical, who prepares the tests and who approves. The person who changed the mapping should not decide alone whether an ambiguous expected value is revised afterwards. Keep disputed cases explicitly open, and let the responsible specialist decide, in this example Jeroen.

At the end comes a short acceptance note that names the tested scope, the cases actually executed, known limitations, the permitted automation and the next review. This is more useful than a general "the AI works", because your business can read from it exactly what the evidence allows it to do.

06 / 08

When should the trial proceed?

Agree the thresholds before you evaluate. One possible starting point has three parts: no critical error goes undetected in the agreed sample, all defined failure routes have been demonstrated, and there is a documented fallback on which your team continues by hand. Which other error rates are acceptable is decided by the responsible domain owner based on risk, consequences and effort.

Zero observed errors still does not prove error-free operation. Introduce the workflow gradually and in a controlled way, check samples, and rerun critical tests after changes to recognition, rules or interfaces. Record open issues with owners and dates instead of declaring the acceptance "passed" across the board.

You can start on this this week. Set aside one document of your own for every row of the test matrix, and write the correct expected value next to it.

07 / 08

What should the supplier hand over?

When the supplier hands over the system, Jeroen should have these records in hand:

  • 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