AI Document Recognition and Processing: OCR, Field Extraction and Human Review
AI document processing is a pipeline in which the system reads a scan, photo or PDF by itself, finds the fields you need — number, date, counterparty, amounts, line items — and passes them to your accounting system or CRM. Text recognition (OCR) pulls the text out of the image, and a language model interprets the document and fills in the fields according to a defined schema. Every value is checked by rules, and doubtful cases go to a person for confirmation. Staff stop retyping documents by hand, while control over the data stays with them.
Open the software development page
What intelligent document processing is
In most companies documents arrive in many forms: invoices and certificates of completion as PDFs, scanned contracts, phone photos of delivery notes, emails with attachments. Someone opens each file, looks for the right lines and copies them into a spreadsheet, an accounting system or a CRM. The work is monotonous, and a mistake in a single figure later surfaces during reconciliation.
Intelligent document processing replaces that manual transfer. The system accepts a file, works out what kind of document it is, extracts the fields, checks them and creates a record in the right system. A person sees the result, fixes the occasional doubtful spot and confirms. It is a special case of an AI agent that works with a document rather than holding a conversation; the general principle is described in the guide on how AI agents work.
How it works: from scan to system record
- Intake. A document enters the system from email, a messenger, a folder, a client portal or a scanner. The original is stored so that you can always go back to it.
- Image preparation. The scan is straightened, skew and noise are removed, and a multi-page file is split into pages. If a PDF already has a text layer, there is no need to recognise it again.
- Text recognition (OCR). The software turns the image into text and remembers where each word sits on the page. The coordinates are needed later to highlight the source of each value.
- Classification. The system determines the document type: invoice, certificate of completion, contract, delivery note, power of attorney. The type defines which fields to look for and where to send the result.
- Field extraction. A language model receives the text and a schema — a list of fields with formats — and fills it in. Tables of line items are parsed row by row.
- Checking and confirmation. Rules compare amounts, dates, tax numbers and bank details with reference lists; values with low confidence and any mismatches go to a person.
- Hand-off. Confirmed data is written to the accounting system or CRM, and the log keeps the history: what was extracted, who corrected what.
Steps can be simplified. If all documents arrive in one format from the same suppliers, classification is hardly needed. If there are many documents of different kinds, you cannot do without it.
OCR, the language model and rules: who does what
A common mistake is expecting a single neural network to do everything on its own. A reliable setup divides the work between three parts, each with its own area of responsibility.
| Part | What it does | Where it fails |
|---|---|---|
| OCR | Turns an image into text with coordinates | Poor scans, small print, stamps over text, handwriting |
| Language model | Understands the document type and fills fields by the schema | May confuse similar fields or invent a value that is not there |
| Rules and reference lists | Check amounts, formats, details, duplicates | Do not understand meaning, only test defined conditions |
| Person | Confirms doubtful values and is accountable for the result | Gets tired on a large flow, so only disputed spots are shown |
Calculations and reconciliations are better kept away from the model: the software itself adds up line items, tax and the total, while the model only reports which values it found. That way an extraction error shows up immediately as a mismatch instead of hiding inside a plausible answer.
Which documents are suitable for automation
Processing pays off fastest for documents that arrive in a steady flow and have a clear structure:
- invoices, certificates of completion, tax invoices and delivery notes from suppliers;
- customer applications and forms filled in from a template;
- receipts and employee expense reports;
- contracts — when you need to pull out the parties, deadlines, amounts and special terms;
- identity documents and certificates — provided that handling such data is lawful and agreed;
- incoming emails with attachments that need sorting by type and owner.
Handwritten text, badly damaged copies and documents with many stamps and signatures over the text are harder. They can be processed too, but the share of manual review is higher. An honest estimate before you start means running several dozen of your real documents, not judging by samples from an advertisement.
Human review: where it is mandatory
Human review (human-in-the-loop) is not a sign of a weak system but part of its design. The question is not whether it is needed but where exactly. A document is usually shown to a person when:
- the model reported low confidence in a field value;
- the rules found a mismatch: line items do not add up to the total, details are missing from the reference list;
- the document affects money or legal obligations: a payment, a signature, a contract change;
- the document is of a new type or comes from a new counterparty;
- recognition returned suspiciously little text — perhaps the photo shows the wrong page.
A convenient review screen matters more than it seems. The employee sees the original and the extracted fields side by side, and clicking a field highlights its place on the scan. A correction takes seconds, and every edit is saved and later used to improve the schema and rules. As the log shows stable quality, review is narrowed down to the difficult cases.
How to measure recognition quality
Quality is assessed on a set of your own documents for which the correct values are known. For each field you look at:
- the share of fully correct values;
- the share of omissions — the field is in the document, but the system did not find it;
- the share of false values — the system confidently entered something that is not in the document; this is the most dangerous error;
- the share of documents that went through without a single correction.
The set is run before launch and after every change — a new model, a schema edit, a new supplier. Errors that staff find during work are added to the set so they do not recur. The general approach to a pilot and its metrics is described in the guide on AI implementation in business.
Where the data goes: integrations
A recognised document is useful only if its data reaches the place where people work with it. Usually that is:
- the accounting system — for example 1C: creating a goods receipt or a counterparty card; exchange options are covered in the guide on 1C integration;
- the CRM — a customer's application or contract is linked to the deal straight away;
- an electronic archive — the original is stored together with the extracted fields and can be searched by them;
- tasks and notifications — the owner gets a message if the document requires a decision.
Document processing almost always becomes part of a wider process: approvals, payments, reconciliations. How to connect steps across systems is explained in the guide on business process automation.
Confidentiality and where documents are processed
Documents contain personal data, bank details and commercial terms, so the question of where processing happens is settled before the model is chosen. The options are a cloud service, a model on your own server, or a combination in which sensitive documents never leave the company's perimeter. The pros and limits of each path are covered in the guide on local or cloud AI agents.
Whatever the option, common rules apply: only those who need documents have access to them; secrets and keys are stored outside the code; every access to a document is logged; retention periods for originals are defined in advance.
How we approach document processing at JEEKSSHIRE 24
Text recognition is part of our own product. JEEKSSHIRE 24 Legal works with PDF and DOCX and recognises text from an image or screenshot right in the browser, so a document does not have to leave the user's computer. The AI lawyer in Legal analyses a document and points to the relevant section, while the decision stays with the person.
We bring the same principles to client projects: first we run your real documents, agree which fields are needed and with what accuracy, then build a first version with human review, a log and a set of test examples. How this work is organised is described on the AI agent development page.
All our areas of work, including apps, web platforms and AI agents, are gathered on the page about custom software development.
Frequently asked questions
How is OCR different from AI document processing?
OCR only turns an image into text. AI document processing goes further: it identifies the document type, extracts the required fields, checks them with rules and passes them to the accounting system.
Can handwritten text be recognised?
Yes, but accuracy is noticeably lower than for printed text and depends on the handwriting and scan quality. Handwriting calls for more human review.
Does the model need training on our documents?
Usually not. The model is given a field schema and examples, and rules and reference lists catch errors. Fine-tuning is considered only if documents are very specific and simple methods do not help.
What happens to documents the system could not parse?
They go into a queue for an employee together with the original and whatever was extracted. Such cases are reviewed, and the schema or rules are extended if needed.
Can documents be processed without sending them to an external service?
Yes, recognition and the model can be deployed on your own server or in your own cloud. Setup costs more, but documents never leave the company's perimeter.
What determines timelines and cost?
The number of document types, their quality, the required accuracy and how many systems receive the data. A first working version usually appears within a few weeks, and we give an estimate after analysing the task and running a trial on your documents. The cost of language model requests is accounted for separately.