Document processing stack: from scan to database row

Invoices, delivery notes and contracts arrive in batches: some as PDFs, some as phone photos, some as crooked scans. A single model cannot cover this well, because there are really three jobs: read the text off an image, understand what the document says, and later find the right document among thousands. A different class of model is best at each job, so a chain of parts costs less and makes fewer mistakes than one large model doing everything.

Updated 22 Sep 2026Find a model in 4 questions

Step 1. Turn the image into text

To a computer a scan is just a grid of dots. A document recognition model turns it into text and, more importantly, keeps the layout: what is a header, what is a table, what is a signature. Drop this part and the next model has to guess from fragments, so numbers drift between table rows. On faded stamps and creased paper, recognition quality sets the ceiling for everything downstream.

What does the work

Documents and OCR2025

SmolDocling и Granite-Docling

IBM and Hugging Face · USA

Tiny models for the open Docling document converter: they turn a page into markup with tables, formulas and code. Run on an ordinary laptop.

  • Converting PDFs and scans to Markdown for search and RAG
  • Recognising tables in reports
  • Processing invoices and contracts on an ordinary PC
Sizes
256M – 258M
Hardware
from: Laptop
Commercial use allowedDetails
Documents and OCRRUGGUF2025–2026

dots.ocr

rednote hilab (Xiaohongshu) · China

A multilingual document parsing model: text, tables, formulas and reading order in one pass. dots.mocr also turns charts and diagrams into vector SVG.

  • Recognising invoices, contracts and delivery notes
  • Converting tables into an editable format
  • Converting charts and diagrams into vector format
Sizes
about 3B
Hardware
from: Laptop
Commercial use allowedDetails
Documents and OCRRUGGUF2025–2026

PaddleOCR-VL

Baidu (PaddlePaddle) · China

A compact document parsing model from the popular PaddleOCR toolkit. Per the model card it supports 109 languages, including Russian; version 1.6 leads the OmniDocBench benchmark.

  • Recognising invoices, contracts and delivery notes, including in Russian
  • Recognising tables, formulas and stamps
  • Converting scans to Markdown and JSON
Sizes
0.9B
Hardware
from: Laptop
Commercial use allowedDetails

Step 2. Pull out the fields you need

Text on its own is still not data. Here a language model reads the recognised document and sorts it into fields: counterparty, number, date, total, tax rate, line items. It also recognises the type of document from its content rather than from a word in the title. Without this part, staff keep typing details by hand and the gain from recognition is lost on re-keying.

What does the work

TextRUOllama2023–2026

Qwen

Alibaba · China

A family of language models with strong Russian language support, from small versions for a laptop to a flagship on par with commercial APIs.

  • Chatbot and knowledge-base assistant
  • Replies to emails and customer requests
  • Document parsing and classification
Sizes
0,6B – 2,4T-A95B
Hardware
from: Laptop
Commercial use with conditionsDetails
TextRUOllama2023–2026

Mistral

Mistral AI · France

European models focused on speed. Mixtral was one of the first open mixture-of-experts models; there are versions for images (Pixtral, Medium 3.5), Lean proofs and moderation (Shieldstral).

  • Fast chat responses
  • Data extraction from text
  • Translation and multilingual work
Sizes
3B – 675B
Hardware
from: Laptop
Commercial use with conditionsDetails
TextOllama2024–2026

Gemma

Google · USA

Compact Google models that run well on a single computer; larger versions understand images. Includes CodeGemma for code, FunctionGemma 270M for function calling and the fast DiffusionGemma.

  • Offline assistant on a laptop
  • Reading photos of documents and receipts
  • Customer request classification
Sizes
270M – 31B
Hardware
from: Laptop
Commercial use allowedDetails

Step 3. Rebuild tables and check the schema

A dedicated table and field extraction model backs up the previous step: it stitches multi-line tables back together and pulls values against a fixed list of fields. That is a cheap way to catch a mismatch before the document reaches your accounting system. Without it, the error shows up later during reconciliation, when fixing it costs more and takes an accountant.

What does the work

Documents and OCRNot maintained2022–2023

Table Transformer

Microsoft · USA

Small models that find tables on PDF and scanned pages and restore their structure: rows, columns, headers. The text inside is read by a separate OCR.

  • Finding tables in reports, statements and invoices
  • Restoring rows and columns for export to Excel
  • Preparing tabular data for analysis and RAG
Sizes
29M
Hardware
from: Laptop
Commercial use allowedDetails
Text analysisOllama2024–2026

NuExtract

NuMind · France

Models for template-based data extraction: give it a document or scan and a JSON field template, get a filled-in JSON back. NuExtract3 (4B) also converts scans to Markdown.

  • Extracting company details, amounts and dates from invoices and contracts into JSON
  • Parsing receipts, waybills and forms against a set template
  • Converting scans to Markdown for search
Sizes
0.5B – 8B
Hardware
from: Laptop
Commercial use allowedDetails

Step 4. Make the archive searchable

An embedding model turns every document into a numeric fingerprint of its meaning, so search starts matching the intent of a question instead of exact words. Someone asks about a gravel delivery last spring and gets the right paperwork even if it is worded differently inside. Without this step the archive stays a folder people scroll through by file name.

What does the work

Search and RAGRUOllamaNot maintained2024

BGE-M3

BAAI · China

A model for meaning-based search in about a hundred languages. The core of RAG: the bot finds the right part of a document before answering.

  • Search across a document base
  • RAG for a chatbot
  • Finding similar requests and duplicates
Sizes
568M
Hardware
from: Laptop
Commercial use allowedDetails
Search and RAGRUNot maintained2022–2024

E5 / multilingual-e5

Microsoft · USA

Proven models for semantic search. The multilingual versions work well with Russian and are still a reliable base for RAG.

  • Search across a knowledge base and documents
  • Finding answers for a chatbot (RAG)
  • Finding similar requests and duplicates
Sizes
33M – 7B
Hardware
from: Laptop
Commercial use allowedDetails
Search and RAGRUGGUF2023–2026

Jina Embeddings

Jina AI · Germany

Strong multilingual embeddings with long context; v5-omni understands text, images and audio. Recent versions are open for non-commercial use only.

  • Search across documents in many languages
  • Search across images and scans
  • Classification and clustering
Sizes
33M – 3.8B
Hardware
from: Laptop
Commercial use with conditionsDetails

What to check before you start

What usually breaks is the input, not the models: angled photos, copies of copies, stamps over digits. Before rolling out, collect a hundred of your worst real documents and run the chain on those rather than on clean sample PDFs. Plan for disputed cases separately: you need a mode where a document goes to a human instead of quietly landing in the database. Personal data, retention periods and what processing is allowed are described here in general terms only; a lawyer should review your specific case.

Other stacks

Need a model for your task?

An open model can run on your own server: data stays in-house, there is no per-request fee, and the model can be fine-tuned on your documents.

  1. SelectThe model and size for your task and hardware budget
  2. DeployOn your server or in a closed network, with an API
  3. Fine-tuneOn your data, or connect a knowledge base
  4. IntegrateInto your CRM, ERP, bot, website or team chat
Discuss deployment