Most companies have people who spend all day copying data from PDFs into the accounting system: invoice number, tax ID, total, VAT, line items. Nearby, a lawyer is reading a supply agreement for the fortieth time to find the clause on penalties and payment terms. And a sales manager is sorting through an inbox where requests arrive as an email, an attachment, or a photo of a paper form.
This is routine work where AI already performs reliably. Below we look at how AI document processing works: which tasks it handles, how it differs from traditional OCR, where a human is essential, how to measure accuracy on your own documents, and how to run a pilot without a big budget.
What AI document processing handles
The approach known as IDP (intelligent document processing) covers four typical classes of tasks. Almost every mid-sized company has at least two of them.
Extracting data from invoices, delivery notes, and receipts
The model receives a scan or PDF and returns structured fields: supplier, tax ID and VAT number, document number and date, total, VAT rate, line items with quantity and price. That data then goes into the accounting system as a draft, and the accountant reviews and posts it instead of typing it in.
AI invoice processing is especially useful when there are many suppliers and each has its own layout. Template-based solutions break on every new format, but a language model works by meaning: it doesn't care which corner of the page the total is in.
Matching documents against each other
An invoice is matched against a purchase order, a completion certificate against the contract, a delivery note against the invoice. The model extracts the data, and regular code does the comparison: do the totals, quantities, prices, and company details match? Discrepancies go into an employee's queue with the mismatch highlighted.
AI contract review against a checklist
The lawyer defines a list of checks: payment term no longer than N days, penalties no higher than a set level, a confidentiality clause is present, jurisdiction is in the right place, no unilateral right to change the price. The model works through the contract and, for each checklist item, returns an answer, a quote from the text, and the clause number.
The decision to sign stays with the lawyer. The model's job is to take over the first read and show where to look, especially when contracts arrive on the other party's paper rather than your template.
Parsing inbound requests and emails
An email or attachment becomes a record in the CRM: who's writing, what they need, which items and quantities, urgency, which sales rep to route it to. This also covers free-form requests and photos of filled-in paper forms. A mistake here is usually cheap (the request just gets passed to another rep), so it's a good candidate for a first project.
How a language model differs from traditional OCR
OCR (optical character recognition) solves one problem: turning an image into text. To get fields out of that text, templates and rules are added on top: "the total is to the right of the word Total." As long as there's one format, it works. A new supplier with a different layout, and you need a new template.
A language model works one level up: it reads text the way a person does and understands that "Amount due," "Total incl. VAT," and "Balance payable" are the same field. Modern multimodal models accept images directly, too. In practice, AI document recognition is usually built as a hybrid: OCR provides accurate text and coordinates, and the LLM maps it to fields.
| OCR with templates | OCR + language model | |
|---|---|---|
| New document format | Needs a new template | Usually works without changes |
| Free-form text | Poor | Good: emails, contracts, requests |
| Predictability | High on familiar forms | Needs validation and error control |
| Processing cost | Low | Higher: model fees or your own servers |
Where a human belongs in the loop
The main risk with a language model is a confident mistake: it can read an "8" as a "3" or fill in a plausible tax ID that isn't in the document. So document workflow automation isn't built as "the model does everything on its own," but as a pipeline with checkpoints.
- Checks in code. Tax ID checksum, line items add up to the total, VAT calculated at the right rate, date within a reasonable range, supplier exists in the master data.
- A confidence threshold. A document where the model is unsure or checks fail goes to a manual queue.
- Confirmation for significant actions. Payment, signing, sending to the counterparty: only after an employee approves.
- Spot checks. Even in the flow that passes automatically, a share of documents is regularly checked by hand to catch degradation.
AI doesn't replace the accountant or the lawyer. It takes manual data entry and first reads out of their day.
A convenient review interface matters more than it seems: the employee sees the scan and the extracted fields side by side, with uncertain spots highlighted, and fixes them in one click. If review is awkward, people start skipping it, and the point of control is lost.
Accuracy: how to measure it on your own documents
Accuracy figures from sales decks are nearly useless: they come from someone else's documents. A clean scan from a large supplier and a phone photo of a crumpled delivery note with a stamp over the total are different problems. Measure quality only on your own documents, like this:
- Collect a sample. 200–500 real documents of the type you're automating, with the same scans, photos, and layouts that arrive in day-to-day work.
- Label the ground truth. For each document, an employee fills in the correct field values by hand. It's the most tedious and most important part.
- Measure field by field. Accuracy for tax ID, total, date, and line items is calculated separately: an error in the total and an error in a product name have very different costs.
- Isolate the automatic flow. Calculate what share of documents passes all checks without a human, and how many errors slip through in that share.
- Repeat after changes. A new model version, different instructions, new suppliers: a run on the same sample shows whether things got better or worse.
Integration with your accounting system, CRM, and e-invoicing
Extracting data from documents doesn't achieve much on its own if the result is then copied over by hand. The value appears when the loop is closed: a document arrives, gets recognized, checked, and ends up in the right system.
- Where documents come from: a mailbox, e-invoicing, a scanner, uploads in a customer portal, a messaging app.
- Where the result goes: the accounting system or ERP, the CRM, a register spreadsheet.
- Which master data is needed for matching: suppliers, product catalog, contracts, orders.
- What happens when an integration fails, and who finds out.
- How the link between the source file and the created record is preserved, so any document can be opened and checked.
E-invoicing is a special case. Documents that arrive through an e-invoicing network in a structured format already contain machine-readable data and don't need recognition. AI is useful here for unstructured attachments and for matching against the contract.
Technically, this is regular service development: queues, file storage, a review interface, connectors to systems, an audit log. That's exactly what we do as a digital agency building web services: we map the processes, design the architecture and integrations, migrate data, and train staff. You can see examples of our projects in our portfolio.
Security and data protection
Invoices, contracts, and requests almost always contain trade secrets, and often personal data too: signatories' names, phone numbers, ID details in contracts with individuals. So the first question is where a document goes when the model processes it.
- A cloud model from a major provider. A fast start, but if the provider processes data outside your jurisdiction, it's an international transfer of personal data, which under GDPR requires appropriate safeguards and a data processing agreement.
- A cloud provider with regional data residency. Data is processed in your region, which removes the transfer question, but you still need a contract with the provider and an assessment of its security measures.
- A model inside your own infrastructure. An open-source model (Llama, Mistral) on company servers or a private cloud: documents never leave your perimeter, but you need GPU servers and time for setup.
In short, data protection law such as GDPR requires a lawful basis for processing, data minimization, and appropriate security measures from whoever controls the data. A practical technique is pseudonymization: before sending a document to the model, names and ID numbers are replaced with placeholders.
The pilot: test the idea in a set timeframe
Don't start document automation with a project to cover "all of document management." A pilot is limited in time, usually a few weeks, and in scope: one document type, one process, one team.
- Choose the document. One you have a lot of and process by hand in the same way every time: incoming invoices, delivery notes, requests to a shared inbox.
- Baseline. How many documents per month, how many minutes each one takes, how many errors are found later.
- Metric and threshold. For example, the share of documents processed without corrections and the acceptable number of missed errors. The values at which you scale and at which you stop are fixed before you start.
- A prototype on an off-the-shelf model. A field schema, instructions, code checks, and a simple review interface. No training of your own model.
- Running on the live flow. The model suggests, employees confirm. This collects real errors without any risk to your books.
- Decision. Compare against the baseline and threshold. Then either integrate and scale, or stop.
"It doesn't pay off, we're stopping" is a perfectly normal pilot outcome too. Finding that out in a few weeks is cheaper than after six months of development.
If, after documents, you want to give employees or customers an assistant that answers from policies and a knowledge base, many of the principles are the same: limited sources, validation, and a human in the loop.
FAQ
Can we remove humans from document processing entirely?
For part of the flow, yes: standard documents from regular suppliers, with high model confidence and successful matching, can be posted without manual review. But an exception queue and spot checks always remain: a person needs to see new formats, uncertain documents, and the model's mistakes.
How accurate is AI at recognizing documents?
There's no universal number: it depends on scan quality, the variety of formats, and which fields are extracted. The only reliable way to know is to run the model on 200–500 of your real documents with reference values and measure the result for each field separately.
Do we need to train our own model on our documents?
As a rule, no. For data extraction and contract review, an off-the-shelf language model with a clear field schema, instructions, and a few examples is enough. Fine-tuning makes sense when there are very many documents, they're highly specific, and off-the-shelf models consistently make mistakes in the same places.
Can we process documents that contain personal data?
Yes, if you comply with data protection law such as GDPR: have a lawful basis for processing, minimize the data, protect it, and handle international transfers properly. The simplest options are models running in your own infrastructure or with a provider that offers suitable data residency, or pseudonymizing data before it's sent. Agree the setup with a lawyer.
How long does a document automation pilot take?
A pilot is usually limited to a few weeks and one document type. That's enough to build a test set, check quality on your own data, and see whether a full rollout will pay off. The exact timeline depends on document volume and whether an integration is needed during the pilot.




