Hello worldHello world

How to validate data extracted from documents with AI

Written by

Nacho Seoane

Published on

29 Nov 2026
A document connected to a check and a record with two accepted fields and one awaiting review.

Written by

Nacho Seoane

Published on

29 Nov 2026

Share

To validate data extracted with AI, check its structure, compare fields against the document and your business rules, and separate accepted cases from those requiring review. Well-formed output or a high confidence score is not enough to authorize a write to your ERP or CRM.

This guide is for an operations manager who wants to stop manually copying orders, requests or records and needs to evaluate an automation proposal. It includes a field matrix, an acceptance worksheet and a fictional example. It does not describe an implementation or results from an Apogeo client.

TL;DR — What to require before connecting extraction

  • Define what each field means. Delivery date and document date can share a format while having different meanings.
  • Keep the source of each value. A reviewer should be able to compare the proposal with the relevant page or passage.
  • Check rules outside the model. Types, catalogues, calculations and duplicates should not rely solely on another AI response.
  • Separate confidence from authorization. A score helps direct review; it does not grant permission to register an order.
  • Allow information to be missing. Identify absent fields instead of filling an assumption as though it were a fact.
  • Measure incorrect acceptances too. Processing many documents automatically is of little use if errors go straight into your system.
  • Agree who resolves exceptions. Specify the owner, available information and conditions for retrying or closing a case.

What you are buying when you commission this automation

You are buying a complete journey from a document to a usable record. Recognizing text, interpreting fields, validating them and writing to another application are separate steps. A demonstration showing attractive JSON proves only part of that journey.

An order may contain separate billing and delivery addresses, old product references, differently written units or a later amendment. The supplier must explain which value takes precedence and when someone needs to be consulted. Those decisions belong to your business process.

An autonomous agent is not always necessary either. A fixed sequence with an extraction step may solve the problem. If you are choosing an approach, see AI agent or automation. This guide focuses on accepting or rejecting extracted data before using it.

Three checks that do not replace each other

Check structure, evidence and business consistency separately. The first question is whether the result can be read; the second is whether it matches the document; the third is whether your system can use it.

OpenAI warns that structured outputs can still contain mistakes, even when they follow the requested format. Requesting a date does not establish that the right date was selected.

CheckQuestion it answersExample checkWhen it fails
StructureIs it in the expected format?Numeric quantity and interpretable dateReject the output or request a correction
EvidenceWhere did this value come from?Show the page and delivery-date textReview the document
ConsistencyDoes it make sense for this process?Product exists in the catalogue and unit is allowedAsk the responsible person
DuplicateHas this order already been registered?Sender identifier plus order numberStop creation and compare
AuthorizationIs this action permitted?Approved case and limited write permissionKeep it pending

This table is a proposed Apogeo control framework, not a certification or a universal checklist. Adapt checks to the consequences of incorrect data.

A field matrix: from example to acceptance criteria

Require every important field to have a rule and a destination when it fails. An overall percentage can hide a system that recognizes names accurately but confuses the quantity that triggers an order.

The following matrix uses a fictional order. Implement its rules with the sources and permissions your company actually has; it does not assume that all ERPs provide the same integrations.

FieldEvidence to preserveProposed checkException
Sending companyExtracted name and document regionMatches an authorized entityTwo possible matches
Order numberLiteral valueNot already registered for that senderResent or corrected version
Product referenceOriginal text and normalized valueExists in the current catalogueUnknown reference
Quantity and unitBoth values, kept togetherUnit is compatible with the productBox confused with individual unit
Delivery dateOriginal label and valueRequested date rather than issue dateMultiple dates or ambiguous format
Amount and currencyOriginal amount and explicit currencyCalculation matches lines and known adjustmentsMissing currency or unexplained difference

Keep the original value alongside its normalized version: “1.250” may mean different things in different documents. Do not apply an irreversible conversion without an agreed rule. If information is absent, record it as missing; if there are two candidates, record the ambiguity.

For resubmissions and corrections, agree whether to create a version, update the record or request approval. The CRM and ERP synchronization guide develops that decision after extraction has been validated.

How to use a confidence score

Treat it as a signal to evaluate with your documents. Do not adopt a universal threshold or directly compare scores from different products as though they measured exactly the same thing.

Microsoft documents estimated confidence for results and notes that not every field returns a score. A missing score does not imply certainty. AWS recommends considering both confidence and the sensitivity of the use case.

Our recommendation is to test the decision rule by document type and critical field. High confidence combined with a nonexistent product reference should still fail the catalogue check. A readable document with two conflicting delivery dates still needs a decision.

Do not confuse a supplier's score with asking the model “how confident are you in your answer?” If the system uses that second signal, require a separate evaluation and do not present it as a validated probability.

A measurement example that makes risk visible

Measure how much is automated and how many errors escape the controls. The denominator matters: field accuracy, fully correct documents and correctly accepted records are different measures.

This is an invented example, manually reviewed in full: 200 orders are tested. The system accepts 140 and sends 60 for review. Of the 140 accepted orders, 136 are correct and four contain an error in a critical field.

  • Initial automation: 140 ÷ 200 = 70%.
  • Correct acceptances: 136 ÷ 140 = approximately 97.1%.
  • Critical errors that would have passed: 4 ÷ 140 = approximately 2.9%.

The 70% figure does not establish that the workflow is acceptable. The company needs to assess the consequences of those four errors and adjust its controls or scope. It does not demonstrate time savings either: review, correction and maintenance time are still missing.

Use a representative set that was not used to tune the system. Include common formats, difficult documents, absent fields, resubmissions and corrections. Sample size depends on variety and risk; 200 is the size of this example, not a universal statistical recommendation. To estimate the whole workload, use the guide to measuring an agent's actual time savings.

A reusable worksheet for comparing suppliers

Complete this worksheet before accepting the connection to the destination system. It is an original working resource: it requires you to describe operating conditions and how they will be checked, without promising a particular accuracy level.

  1. Document and version: which types are included and excluded.
  2. Critical fields: meaning, format and consequences of an error in each.
  3. Visible source: the page or passage accompanying each proposal.
  4. Independent rules: catalogue, calculations, required fields and duplicates.
  5. Missing or ambiguous data: agreed representation and handling.
  6. Acceptance criteria: conditions for passing, reviewing or rejecting.
  7. Human review: owner, interface and method of correcting the result.
  8. Acceptance test: reserved documents, verified answers and metric denominators.
  9. Destination record: permissions, retry identification and confirmation of the result.
  10. Monitoring: errors found later, format changes and the next evaluation date.

The review history should let you reconstruct what was proposed, what was corrected and what was ultimately sent. Define access and retention for your needs; this worksheet does not replace a privacy or compliance assessment applicable to the project.

Frequently asked questions

These questions help define the deliverable before hiring a supplier. The final criteria depend on the document, the process and the consequences of an error.

Is valid JSON enough?

No. A correct format makes the response processable, but it can still contain the wrong field or an invented value. You need evidence and business-rule checks.

What confidence threshold should I ask for?

One evaluated with your documents and the risk associated with each field. No number in this guide automatically authorizes a write. Document what happens when a score is missing too.

Can we register everything and correct it later?

Only if you have assessed and explicitly accepted the consequences of that design. If registration triggers shipments, bookings or other actions, reversing it may be difficult. A review queue before registration helps limit that risk.

How do we review a field absent from the document?

Keep it marked as missing and request the necessary information. If another authorized source can supply it, record that source and distinguish added information from extracted data.

Must every document be reviewed forever?

That depends on the evaluation and the consequences of an error. Some fields or situations may continue to require review. Changes to formats or suppliers require behavior to be checked again.

What should the quote include?

Extraction, validations, a review interface, integration and monitoring. Also clarify what your team supplies: samples, a catalogue, rules, access and people to resolve exceptions. Do not compare quotes solely on cost per page.

Final recommendation

Start with one document type, defined fields and a limited write action. Accept the solution based on what it demonstrates on reserved documents and how it handles errors, not just a demonstration with favorable examples.

At Apogeo, we approach AI agents connected to your business through the process you need to solve. To evaluate document extraction, tell us about the workflow and destination system. The initial scope should make the data, checks and person authorizing the next step clear.

In summary

  • Define field meanings. Format does not resolve interpretation.
  • Show the source. Make each value easy to compare with the document.
  • Separate checks. Structure, evidence and rules answer different questions.
  • Treat confidence as a signal. Evaluate it for your use case.
  • Measure errors that pass. Look beyond the automation percentage.
  • Resolve exceptions. Assign an owner and preserve corrections.
  • Connect after checking. Limit permissions and verify the final record.

Sources consulted

The sources support the limitations of structured formats and the use of confidence scores. The matrix, worksheet, protocol and numerical example are Apogeo editorial proposals. Sources checked on 29 November 2026.

Related Posts

Take a look at these

A task card connected in blue to a laptop and a server as alternative places to run it.
AI & automation
25 Nov

Local or cloud AI: what should your business choose?

Compare where an assistant runs, which data leaves and who maintains it. Includes a decision matrix and a worksheet for requesting a supplier trial.

A conversation connected in blue to a context card and a card for the person accepting the handoff.
AI & automation
21 Nov

How to hand an AI conversation over to a person

Define when an AI assistant should hand off, what context to preserve and how to verify that a person has actually accepted responsibility for the case.

A task card with one confirmed step and another paused step, connected to a verification record by a blue path.
AI & automation
18 Nov

What should happen when an AI agent fails?

Specify recovery for interrupted agent tasks: verifiable states, bounded retries and a worksheet for resolving uncertain operations without duplication.

Ready to Scale Your Brand?

Start growing with a website that evolves with you.