AI document processing: automating invoices, contracts and forms without losing control
Invoices, delivery notes, contracts, application forms: a large share of office work consists of reading a document and typing its contents into a system. Language models have made this kind of extraction far more flexible than classic template-based OCR. At the same time, structured e-invoices are making part of the problem disappear. This article explains how the pieces fit together.
From OCR templates to language models
Classic systems worked with a template per supplier: the invoice number is at this position, the total at that one. Every new layout needed a new template.
Modern document processing usually has four stages:
- Capture: the document arrives by email, upload or scan.
- Reading: text and layout are recognised (OCR), or the file is passed directly to a multimodal model that can read images and PDFs.
- Extraction: a language model returns the required fields in a fixed structure, such as supplier, invoice number, date, line items, tax amounts and IBAN.
- Validation and posting: rules check the result before anything is written to the accounting or ERP system.
The model handles variation in layout and wording. The rules make the process dependable.
Validation is where reliability comes from
A language model can misread a digit or fill a missing field with a plausible value. For financial documents this is unacceptable without checks. Useful rules include:
- Arithmetic: line items add up to the net total; net plus tax equals gross.
- Master data: the supplier exists; the IBAN matches the one on file. A changed IBAN is a classic fraud pattern and should always trigger a manual check.
- Duplicates: the same invoice number from the same supplier has not been posted before.
- Purchase order matching: quantities and prices agree with the order and the goods receipt.
- Plausibility: dates are not in the future; amounts are within the usual range for this supplier.
- Evidence: each extracted value is linked to the place in the document where it was found, so that a reviewer can verify it at a glance.
Documents that pass all checks can be posted automatically. Everything else goes to a review queue with the open questions highlighted.
E-invoicing changes the starting point
A structured e-invoice is a data file, not a picture of a document. Its content can be read by software directly, without OCR and without a language model. The European standard EN 16931 defines the data model; formats such as XRechnung, ZUGFeRD and Factur-X implement it.
Germany is introducing mandatory e-invoicing for domestic transactions between businesses in stages:
- Since 1 January 2025, businesses must be able to receive e-invoices.
- The obligation to issue e-invoices applies from 1 January 2027 for businesses with a prior-year turnover above EUR 800,000, and from 1 January 2028 generally.
- A plain PDF is not an e-invoice in the legal sense, because it is not a structured format. Hybrid formats such as ZUGFeRD combine a PDF with an embedded structured file.
Other EU member states have comparable programmes, and the EU's "VAT in the Digital Age" package provides for structured e-invoicing in cross-border trade between businesses in the coming years.
What this means for a project: structured invoices should be parsed directly, and AI extraction should be reserved for what remains unstructured, such as PDF invoices from abroad, receipts, delivery notes, contracts and correspondence. A good intake pipeline recognises the type of each incoming file and chooses the right path.
Beyond invoices
- Contracts: extracting parties, terms, notice periods and renewal dates into a contract register, with reminders before deadlines.
- Applications and forms: transferring data from applications, registrations or claims into the case system and checking for missing information.
- Delivery notes and certificates: matching against orders and filing in the right project.
- Incoming mail: classifying by topic and urgency, and routing to the responsible team.
In each case the same principle applies: the model proposes, rules verify, a person decides on exceptions.
Measuring accuracy
Before going live, the system should be tested on a representative set of real documents, typically a few hundred, with manually verified results. The useful figures are:
- Field-level accuracy: the share of correctly extracted values per field. Totals and IBANs need a far higher standard than a free-text description.
- Straight-through rate: the share of documents posted without human intervention.
- Error escape rate: errors that passed all checks and were only found later. This is the number that matters most, and it must be close to zero for payment-relevant fields.
These figures are tracked continuously after launch, because suppliers change their layouts and models are updated. The method is described in more detail in How to evaluate an AI application before launch.
Data protection and retention
Invoices and contracts contain personal and confidential data. The data flow should be designed deliberately: which service receives which document, where it is processed, and how long it is stored. Statutory retention rules for accounting records continue to apply; for e-invoices, the structured original file must be kept, not only a printed or converted version. See also AI projects and data protection.
Conclusion
Document automation is reliable when the language model is one component in a controlled process: structured data is parsed directly, unstructured documents are extracted by AI, rules verify every value, and people handle the exceptions.
uurstudios builds document pipelines with extraction, validation rules, review queues and integration into accounting and ERP systems. Requirements can be shared through the contact form.
Tax and accounting notes in this article are general information, not tax or legal advice. Consult a tax adviser for a binding assessment.
Sources
- European Commission: eInvoicing and the European standard EN 16931
- German Federal Ministry of Finance: FAQ on the mandatory e-invoice (in German)
- IHK Köln: BMF letter on e-invoicing of 15 October 2025 (in German)
Status: November 2026.