Skip to main content

6 min read

Stacks of PDFs, One Workflow: How AI Reads Documents So You Don't Have To

Stacks of PDFs, One Workflow: How AI Reads Documents So You Don't Have To

Document processing is a recurring challenge in almost every sector. Think of a financial analyst in the middle of an acquisition process who has to comb through hundreds of pages of financial statements and contracts. Often from dozens of parties, each with its own layout. Or a logistics coordinator who processes incoming freight documents every day: waybills, packing lists, customs forms.

The information they contain is crucial, but it doesn't come out on its own. So it gets read, retyped, and checked. Manually, every single time.

This work isn't complicated. But it takes a lot of time, scales poorly, and the risk of errors is higher than you'd like, especially at moments when precision really matters.

An AI solution that automatically reads PDF documents, extracts the relevant data, and prepares it for further processing can make all the difference. In this blog I'll explain how such a solution works, what technical choices are involved, and what you can expect from it in practice.

What is Intelligent Document Processing?

Intelligent Document Processing, or IDP, isn't a new technology. Traditional IDP systems work with OCR (optical character recognition) and fixed templates. They recognize text at predetermined positions on a document. For high volumes with a fixed layout, that works fine.

But as soon as the layout varies, a supplier changes their invoice layout, or documents come in from different countries, it gets more difficult.

What makes our solution different is the combination of IDP with a Large Language Model (LLM), the technology behind tools like ChatGPT. An LLM understands context. It doesn't matter where an amount appears on the page, what language a document is written in, or how the structure differs from year to year. The AI reads the document the way an experienced employee would and extracts the right information from it.

That flexibility does require good instructions, though. The quality of the output depends on how clearly you specify which fields you want extracted, what formats are expected, and when something should be checked by a human. That preparation is the real work. The technology then carries it out reliably.

The diagram below shows a general IDP workflow, as described by Gartner:

How we built it

For the infrastructure, we chose Microsoft Azure. The main reason is practical: all data stays on servers in Western Europe. For organizations with strict privacy or compliance requirements, that's important.

Azure also offers everything you need in one place: storage, AI processing, database, and the logic that connects it all.

The workflow itself is simple. A user uploads a PDF. The AI receives the document, along with instructions about what information is needed. The model extracts the requested values and converts them to JSON, a format that's easy to read for both systems and people.

The system then automatically checks whether the values are correct and fall within expected ranges. Whatever is correct goes straight to the database. Whatever is questionable is presented to an employee, who approves or corrects it with a quick check.

What further increases accuracy is that, after the initial extraction, the model performs a reflection pass. It receives its own output back as input and reviews it again, field by field, to spot and correct inconsistencies and missed values. That may sound like a detail, but in practice it really makes a difference, especially with complex or irregularly formatted documents.

The results

We validated the solution in a pilot test with seven documents in four languages: English, Dutch, German, and French. With seven documents you can't draw statistically hard conclusions, and that's not the point of a pilot like this. What you can establish: does the approach work, are the results usable, and where's the friction? The answer to all three questions was positive.

How accurately the model performs in production varies by situation. That depends on the quality of the documents, the complexity of the fields being extracted, and how well the instructions are tuned to the model. That tuning, configuring the solution to your specific document types, is therefore a standard part of how we approach these kinds of projects.

To illustrate what the model can handle: we also tested documents with missing fields, amounts in unusual currency notations, or tables spanning multiple pages. In most cases, the model correctly indicated that a value was missing or uncertain, rather than making something up. That behavior is at least as valuable as a high score on the easy cases.

We also tested several LLM models side by side, ranging from smarter to more compact, and fully processed within the EU. Depending on what an organization considers important, there's a suitable choice to be made.

What this means in practice

So what does this actually mean for an organization? It means employees no longer have to do a large part of the manual reading work. Documents come in, the workflow runs, and the data is ready in the database. Only the uncertain cases are presented to an employee for a quick check.

That has a few practical benefits. The work scales with volume: ten documents or a thousand, the workflow does the same thing. You save a lot of time, and the risk of typos or missed values drops significantly.

What also helps: the solution isn't tied to one document type or one sector. As long as you can describe what information you want to extract from a document, the AI can work with it. That makes it applicable to far more situations than just the example we started with.

Want to know what this could mean for your organization?

Document processing is one of those processes you only really notice when it goes wrong or takes too much time. An automated solution is then not a luxury, but a logical step.

At E-mergo, we build these kinds of AI solutions as custom work, tailored to your document types, systems, and compliance requirements. An initial conversation is usually enough to determine whether there's something worthwhile to build and what a project could roughly look like.

Get in touch

Stay up to date

Don't want to miss a blog post? Sign up for our newsletter. That way you'll receive all the latest content directly in your mailbox every month. You can sign up using the button below.

Sign up here

Written by Tom de Bruijne
BI Consultant