Contents
AI document processing means automatically extracting data from scans, photos and PDFs: details from invoices, terms from contracts, answers from forms. Multimodal language models understand the whole document rather than just recognising characters, so they handle varied formats without a template for each. A reliable system extracts data to a strict schema, checks it with rules and sends uncertain cases to a person.
Here is how AI differs from classic OCR, how to get structured output, how to check accuracy and how to build processing into a workflow.
How does AI differ from classic OCR?
Classic OCR turns an image into text but does not understand what that text means: which part is the invoice number and which is the supplier's tax ID. Every document type needed its own templates and rules. Language models understand a document's structure and meaning and extract the right fields even from unfamiliar formats.
| Criterion | Classic OCR with templates | Multimodal model |
|---|---|---|
| A new document format | Needs a new template | Usually works straight away |
| Understanding meaning | No | Yes: finds fields by context |
| Tables and complex layouts | Often wrong | Handles them better |
| Cost per page | Lower | Higher, but falling |
| Predictability | High | Results need checking |
They are often combined: OCR provides text and coordinates; the model provides understanding and structure.
How do you get structured output?
For results to load straight into an accounting system, the model must return data to a strict schema: predefined fields, types and formats. Modern APIs support structured output that guarantees the response matches the schema.
{
"document_type": "invoice",
"invoice_number": "string",
"invoice_date": "YYYY-MM-DD",
"supplier": { "name": "string", "tax_id": "string", "vat_number": "string" },
"total_amount": "number",
"vat_amount": "number",
"items": [
{ "name": "string", "quantity": "number", "unit_price": "number", "amount": "number" }
],
"confidence_notes": "string"
}
Extraction tips:
- Describe every field: what it is and how it appears in the document.
- Ask the model to leave a field empty when there is no value rather than guess.
- Process multi-page documents as a whole, not page by page.
- Keep the source document and the model's response for error analysis.
On general principles, see how to integrate an LLM into a product.
Photo: Unsplash
How do you check extraction accuracy?
Accuracy is checked in two ways: automatic rules for every document and regular evaluation on a reference set. Rules catch obvious errors; the reference set shows real per-field accuracy.
- arithmetic — line items and VAT add up to the total;
- formats — tax IDs, bank codes and dates pass checksum and format checks;
- reference data — the supplier exists in the counterparty database, the currency is valid;
- duplicates — an invoice with that number and supplier has not been loaded yet;
- reference set — hundreds of labelled documents used to measure accuracy after every change.
More on evaluation in LLM evaluation.
How do you build processing into a workflow?
Build it so a person reviews only questionable documents while the rest pass automatically. At first every document is reviewed; then, as accuracy statistics accumulate, the automatic flow expands.
- documents arrive by email, interface upload or scanner;
- the model extracts data and rules check it;
- error-free documents go into the accounting system automatically;
- uncertain ones go to a review queue with the fields highlighted;
- operators' corrections are stored and used for improvement.
On integrating with back-office systems, see 1C and CRM integration, and on agents running multi-step processes, AI agents in business processes.
How do you calculate the effect?
Calculate it from staff time, processing speed and error counts before and after. The biggest savings usually come from processes with hundreds of similar documents a month: incoming invoices, applications, forms.
- current manual processing time per document;
- the share of documents that pass without corrections;
- an operator's review time for an uncertain document;
- model call costs and system maintenance.
More in business process automation ROI and AI feature cost.
In short
- AI understands the whole document and extracts fields without per-format templates.
- Require structured output from the model to a strict schema.
- Check results with rules and regular evaluation on a reference set.
- Send uncertain documents to a person and the rest automatically into accounting.
- Measure impact by time, accuracy and cost against manual processing.
FAQ
Can AI handle handwriting?
Modern models read neat handwriting reasonably well, but accuracy is noticeably lower than for printed documents. Plan for mandatory human review of handwritten fields.
Can documents containing personal data be processed?
Yes, but consider where the data is processed: sending it to an external service requires a legal basis and, for Russian citizens' data, compliance with localisation rules. The alternative is models deployed on your own servers.
How much does processing one document cost?
Usually from a fraction of a cent to a few cents per page depending on the model and volume. The main costs are development, integration and review setup, not the model calls themselves.



