# Best AI model for extracting data from documents

> Choose an AI model for extracting invoice and document data: the required model tier and a test to identify usable options.

Source: Giallo Studio (giallostudio.it) · Page: https://giallostudio.it/en/blog/best-ai-model-for-document-extraction · Published: 2026-09-04 · Updated: 2026-10-10

The **extracting data from documents** is the most requested AI project by SMEs and the one that seems the simplest. In part it is: on well formatted documents any modern model is doing well.

Difficulty, and risk, lie elsewhere: in bad documents and in the way the model reacts when a data is not there.

<div class="key-points">
  <p class="kp-title">In summary</p>
  <ul>
    <li>On the clean documents just the <strong>the Economic Belt</strong>.</li>
    <li>The difficulty lies in <strong>Badly Done Documents</strong>.</li>
    <li>The decisive property is <strong>declare when the data is not there</strong>.</li>
    <li>An invented value produces an error that <strong>no one will discover</strong>.</li>
    <li>The right setting is almost always a <strong>two levels</strong>.</li>
    <li>High volumes require <strong>Sample Controls</strong> systematics.</li>
  </ul>
</div>

## Why is extracting data from documents more varied than it looks?

‘Extracting eight fields from an invoice’ describes two different jobs, and confusing them is the origin of much of the projects they disappoint.

**On a well formatted invoice** is pure recognition: the data is there, it must be found and reported. An economic model does it well and quickly.

**On a crooked scan**, with a stamp above the number and a description that ends in the middle of an amount, the task changes nature: one must distinguish between an absent data, an ambiguous one and an unreadable one, and decide what to report.

<div class="callout"><strong>The practical consequence</strong> A test done on ten clean documents says nothing useful. Proof that counts uses the worst documents you have —the ones that even a person has to look at twice.</div>

## Which test separates a good extraction model from a dangerous one?

There is a single test that distinguishes a usable model from a dangerous one, and it takes two minutes: give the model a document **which lacks the required field** and ask her.

| What the Model Does | Verdict |
|---|---|
| Declare that the data is not present | Suitable, the case can level up |
| Returns an empty field | Acceptable, the case is interceptable |
| Returns a plausible value | Not suitable, at any price |

The last line describes how an extraction project fails without anyone noticing. On high volumes that wrong data gets into business systems, propagates into records and reports, and is discovered months later — when reconstructing what happened costs more than the entire project.

And it's a particularly insidious mistake because a plausible value **pass the automatic controls**: has the right format, stays in the expected range, does not trigger anything.

## Why does a two-level setup work best for data extraction?

Since documents are naturally divided into ordinary and problematic, the setting that works best uses two models. A structured format must be verified in both type and meaning: [extraction of JEV-typed data](https://giallostudio.it/en/blog/jev-ai-typed-data-extraction) it delves into missing values and field controls, without replacing reading the document.

The economic model receives all the documents. For each produces the extracted fields **and** an indication of how safe it is. Ordinary documents close there; those on which it declares uncertainty rise to a more capable model, and what even that solves does not reach a person.

<ul class="checklist">
  <li>Define a <strong>explicit threshold</strong> for level crossing</li>
  <li>Ask the model for <strong>quote where he found</strong> each field</li>
  <li>Add <strong>Coherence checks</strong> on extracted values</li>
  <li>Predict a <strong>queue</strong> for cases that no one closes</li>
  <li>Check documents by sample <strong>automatically closed</strong></li>
  <li>Monitor the <strong>percentages over time</strong>, not just at the beginning</li>
</ul>

The second point is worth double in the extraction: if the model indicates where in the document the amount was found, the verification takes two seconds. The setting detail is in [Mixed Model Strategy](https://giallostudio.it/en/blog/mixed-ai-model-strategy).

## Which model tier do you need for data extraction, and what does it cost?

<div class="compare">
  <div class="compare-yes"><h4>Economic belt</h4><ul>
    <li>Structured and well formatted documents</li>
    <li>Predictable and always present fields</li>
    <li>Known and repetitive formats</li>
    <li>High Volumes</li>
  </ul></div>
  <div><h4>We need to go up</h4><ul>
    <li>Low quality scans</li>
    <li>Non-standard or variable formats</li>
    <li>Fields that may be missing</li>
    <li>Multilingual documents or manuscripts</li>
  </ul></div>
</div>

Economically, the numbers are favorable: at the light band, one hundred thousand documents per month with 1,500 input tokens and 200 outputs cost in the order of a few tens of dollars. It is the kind of project that the economic belt makes possible.

The voice that really weighs is another: the **review time**. If five percent of documents are to be reviewed by hand, out of a hundred thousand are five thousand revisions per month. At one minute each is over eighty hours: much more than API spending.

<div class="callout"><strong>Where to Optimize</strong> Reducing the percentage of documents to be reviewed is worth much more than choosing the model with the lowest list. And it reduces it by improving the instructions and quality of the input documents, rather than changing the model.</div>

## What mistakes should you avoid when extracting data from documents?

<ul class="checklist">
  <li><strong>Testing only on clean documents.</strong></li>
  <li><strong>Not testing a document without the required field.</strong></li>
  <li><strong>Not asking where it found the data.</strong></li>
  <li><strong>Using a single model</strong> for heterogeneous documents.</li>
  <li><strong>Not planning for spot checks</strong> on high volumes.</li>
  <li><strong>Optimizing the price list</strong> instead of human review.</li>
</ul>

## How does document data extraction work in a real-world case?

It is worth following a realistic case, because it shows where the problems really focus.

**The starting point.** A company receives 8,000 supplier invoices per month, from about four hundred different suppliers. Eight fields to extract. Today the work is done by two people.

**First week: One hundred papers with total revision.** Every outcome is checked. It turns out that ninety-two per cent of documents are extracted correctly, but also that errors cluster around approximately twenty suppliers with particular formats — they are not distributed randomly.

**Second week: a thousand documents with threshold.** You introduce the confidence indication and you set the threshold. Seven percent of the documents go up to the second level, two percent go to one person. Percentages are manageable.

**Week Three: Full Volume.** Weekly sample of twenty documents, automatic consistency checks on amounts, percentage monitoring.

| Voice | Monthly Value |
|---|---|
| Documents drawn up | 8.000 |
| Automatically closed | ~91% |
| Switched to the second level | ~7% |
| Getting to a person | ~2% |
| Estimated API expenditure | a few tens of dollars |
| Residual human time | ~160 documents |

The last line is the real result: from eight thousand documents to look at to one hundred and sixty. And API spending is irrelevant compared to time freed.

<div class="callout"><strong>The detail that made the difference</strong> Find out that the mistakes focused on twenty suppliers. Adding specific instructions for those formats has reduced errors more than any model change — and is an hour of work, not a project.</div>

## Why do consistency checks help in data extraction?

On structured data you can do automatic verifications that do not require AI and that intercept most of the residual errors.

<ul class="checklist">
  <li>The <strong>taxable plus VAT</strong> must give the total</li>
  <li>The <strong>date</strong> must be plausible and consistent with the period</li>
  <li>The <strong>supplier</strong> must exist in the registry</li>
  <li>The <strong>amount</strong> must be within a reasonable range for that supplier</li>
  <li>The <strong>document number</strong> It doesn't have to be there already</li>
</ul>

They are trivial controls to implement and capture just the most dangerous category of error: the plausible but wrong value. An invented amount passes the format control but almost never the arithmetic one.

It's why a well-done extraction project doesn't just rely on the model: it combines AI to read and deterministic rules to verify. Each does the part where it's strong.

## How do you write instructions for data extraction?

In extraction the quality of the result depends on the instructions at least as much as on the model. Four tricks are worth more than a sash jump.

**Describe each field accurately.** "Date" is ambiguous: document date, date of receipt, expiration date? A misdescribed field produces errors that look like model tantrums and are inaccurate instructions instead.

**State what to do when the data is missing.** It must be said explicitly: if you do not find the field, write that it is not present. Without this instruction many models try to be useful and fill the void.

**Give an example of a difficult document.** A single example of a boundary case, with the correct answer, improves behavior across the entire category.

**Ask for the location of the data.** Knowing that the amount was read in the row ‘Total document’ makes the verification immediate and immediately reveals when the model has reconstructed.

<div class="callout"><strong>Attention to the weight of the instructions</strong> Every word in the prompt pays for every single call. Out of 8,000 documents per month, a thousand instruction tokens are 8 million monthly input tokens. The instructions must be precise, not long: they are two different things.</div>

## When is data extraction the wrong problem to solve?

A final consideration that saves entire projects: sometimes the document should not be read at all.

If a provider sends the same invoice in PDF each month and that provider also has an electronic track, reading the PDF with AI is the most complicated way to get a data that already exists in structured form. The same applies to documents generated by a system that could be accessed directly.

<ul class="checklist">
  <li>Check if the data already exists in <strong>structured form</strong> Somewhere</li>
  <li>Ask the main suppliers if they can send a <strong>Path</strong></li>
  <li>Restrict AI extraction to documents that <strong>come only as images</strong></li>
</ul>

In practice almost always there remains a substantial share of documents why AI mining is the only way — that's why these projects make sense. But reducing that quota at the origin is more effective than any downstream optimization.

## How do you introduce document data extraction in your company?

The prudent path does not start from the full volume. Three stages, and the first two are the cheapest insurance of the project.

**One hundred papers with total revision.** Every outcome controlled by a person. It serves to measure real accuracy and to find out where errors are concentrated —which in practice are never randomly distributed, but grouped on a few suppliers or a few formats.

**A thousand documents with threshold.** The indication of confidence is introduced, the threshold of passage to the second level is calibrated and how many cases arrive at a person.

**Full volume with continuous controls.** Weekly sample, automatic consistency checks, percentage monitoring.

<div class="callout"><strong>The discovery that is worth more than a change of model</strong> In the first phase it almost always emerges that errors focus on an identifiable subset. Adding specific instructions for those formats reduces errors more than any sash jump, and is one hour of work.</div>

It always joins the AI of the **deterministic controls**: taxable plus VAT equals total, plausible date, supplier present in the registry, document number not duplicated. They are trivial to implement and capture just the most dangerous category of error —the plausible but wrong value, which passes the format controls. Everyone does the part where he is strong: AI reads, rules verify.

On the economic side, remember that at these rates the biggest item is not the API but the review time. Reducing the percentage of documents to be reviewed is worth more than choosing the model with the lowest list, according to the calculation of [cost per task or price per token](https://giallostudio.it/en/blog/price-per-million-tokens-explained). The two-level setting is described in [Mixed Model Strategy](https://giallostudio.it/en/blog/mixed-ai-model-strategy), and the criterion for choosing the starting band in [when an economic model is enough](https://giallostudio.it/en/blog/when-cheap-ai-model-is-enough).

A final verification that saves entire projects: check if the data already exists in structured form somewhere. Reading a PDF with AI is the most complicated way to get information that an electronic path would provide ready.

If you want to automate the extraction from your documents in a secure and verifiable way, [Giallo Studio](https://giallostudio.it/en/business-process-automation) helps SMEs and teams to build concrete, measurable and sustainable automations.


To complete the reasoning. The method for building the test bench is in [how to read AI benchmarks](https://giallostudio.it/en/blog/how-to-read-ai-benchmarks). The calculation of cost per completed task, which is the number on which you really decide, is in [when it is best to change the AI model](https://giallostudio.it/en/blog/when-to-switch-ai-models). To understand when it is advisable to question the configuration, the criterion is in [because vendor benchmarks are not comparable](https://giallostudio.it/en/blog/vendor-benchmarks-not-comparable).

## Conclusion

For extraction from documents the economic belt is sufficient on ordinary cases, which are the majority. The difficulty lies in the bad documents, and you deal with it with a second level instead of paying the high end on everything.

But the property that decides if the project is safe is only one: **the model must state when the data is not**. An invented plausible value passes the controls, enters the company data and is never discovered.

If you want to automate the extraction from your documents in a secure and verifiable way, [Giallo Studio](https://giallostudio.it/en/ai-agents) designs tailored AI solutions for SMEs.

## Frequently asked questions

### Which model does it take to extract data from documents?

For well-formatted documents, a low-cost model is sufficient. Difficulty arises with poorly prepared documents, where missing, ambiguous and unreadable data must be distinguished: a second level is worthwhile there.

### What is the most important property of the model?

That it states when data is unreadable or absent, rather than producing a plausible value. This is more important than average accuracy, because fabricated errors are never discovered.

### How do you try a model for extraction?

With ten real documents, at least three of them poorly prepared, plus one document missing the required field. The last is the test that separates usable models from dangerous ones.

### Is it better to use one model or two?

Almost always two: a low-cost model handling ordinary documents and a more capable one handling those the first flags as problematic.

### Is it necessary to check the results if the volumes are high?

Yes, through sampling and systematic checks. At high volumes, nobody looks at individual outcomes, and one error every twenty cases turns into thousands of incorrect data items without anyone noticing.

### How much does an extraction project cost?

With low-cost models, the order of magnitude is a few hundred dollars a month even for hundreds of thousands of documents. The largest cost item is almost always human review time.
