OCRs.ai

Blog/·Updated

AI quality control for OCR should never invent a word

Language models can fix OCR errors — or quietly fabricate account numbers and names. The safe design constrains AI to choose among what the page actually shows.

AI quality control for OCR is safe only when the model can choose between readings of the page and never generate new ones. A language model asked to “clean up” OCR will produce fluent text — including plausible account numbers, names and dates that were never on the page. For regulated documents, a confident fabrication is worse than a visible error.

The industry's rush to put language models on top of OCR has mostly been framed as an accuracy upgrade. It is, but it also changes what failure looks like. A classic OCR engine fails noisily: garbled characters, obvious gaps. A generative model fails silently. Its mistakes read exactly like correct text.

Why do language models hallucinate during OCR cleanup?

Because correction and invention are the same operation to a generative model. Given a smudged digit, it predicts the most likely replacement. Given a surname it has not seen before, it drifts towards a common one. The model is optimising for plausible text, and a plausible invoice number is still the wrong invoice number.

Prompting the model to “be careful” does not change this. The protection has to be structural: the system must be able to check every word the model returns against evidence from the page.

What does constrained AI quality control look like?

Start with more than one independent reading of each page. Different OCR engines make different mistakes, so where they disagree you have a precise list of the places that need judgement.

Let the model resolve those disagreements — and nothing else. It chooses between the readings using context: which spelling fits the line, which number fits the column. It is not free to write text of its own.

Then verify the output mechanically. Every word the model returns must exist in at least one engine's reading. If a single invented word appears, the whole correction is rejected and the page falls back to the primary engine's text. The model can make the result better; it is never allowed to make it up.

How should disagreements be handled?

Record them. The places where engines disagreed are the highest-value signal a review team can receive, because they show exactly where attention should go. A pipeline that hides uncertainty behind a clean-looking transcript takes that signal away.

Why does this matter even more for retrieval?

Retrieval systems treat indexed text as ground truth. A fabricated clause in a contract becomes a “fact” that will be quoted back with full confidence, and nobody downstream can tell it was never on the page. Honest quality control protects the reviewer, the vector store, and every answer built on top of them.

This is how quality control works in OCRs.ai: two engines, AI resolving only where they disagree, and a validator that rejects any correction containing a word neither engine saw.

FAQ

Questions this post answers

See layout OCR with AI quality control on your own files

Prepaid and self-serve. Your first top-up includes $5 in bonus credit.