OCR 三個誤讀詞的信心分數均高於 0.95,第二個引擎全部檢出
Every misread word had OCR confidence above 0.95. A second engine caught all three.
作者以自家 OCR 服務測試一份 42 頁業績電話會議逐字稿,發現 scan-ctc@2 三個誤讀詞的信心分數均高於 0.95,scan-vlm-ctc@2 把三者全數標記為讀取不一致。在 15 頁有文字層的頁面中,5,213 個詞有 6 個被標記,當中包括全部三個錯誤,人工覆核範圍約佔文字的 0.12%。作者尚未端到端測試只覆核標記詞的流程,而文中第 2、3 節的比較以一份英文文件為基礎。
If you feed PDFs to an agent or a RAG pipeline, the question you need answered for every word is whether it could be wrong. OCR confidence does not answer it. On our test pages it was highest exactly where the text was wrong. What did answer it: two OCR engines that fail in opposite ways, and a list of the words where they disagree.
We measured this on our own OCR service (ocr-software.com) with a public 42-page earnings call transcript (Schaeffler Q3 2026, original PDF, retrieved 13 November 2026; the text is theirs, so we quote single words only) and 300 further public pages. 15 pages of the transcript are plain text with a real text layer as ground truth, 27 are slides. Every number below has a run behind it.
1. Confidence measures the pixels
On the 15 text pages our CTC pipeline (scan-ctc@2) misread three of 5,211 words:
| Page | Text | Read as | Confidence |
|---|---|---|---|
| 28 | AI |
Al |
0.996 |
| 31 | quarter |
guarter |
0.994 |
| 35 | frequently |
freguently |
0.951 |
The lowest confidence on those pages was 0.917. A filter at 0.9 flags none of the three.
The engine is behaving as designed. A CTC recognizer (Graves et al., ICML 2006) reads a text line as a sequence of characters from pixels and knows nothing about the sentence. In this font a capital I and a lowercase l are the same vertical stroke, and q and g differ by a few pixels. The recognizer picks one and is sure of it, because the pixels fit. Its confidence says how well the pixels match a character. That "Al" makes no sense in an earnings call is outside what it can see. Calibration does not fix this either: Guo et al. (ICML 2017) found modern neural networks poorly calibrated in general, and even a perfectly calibrated score would still be honest about the pixels and silent about the meaning.
Spacing fails the same way. Quarter labels printed as "Q1 26" came out as Q126 at confidence 0.99998. Every character is right, the space is gone, and the result is a different number. Over the whole document, with 1,661 numbers, the CTC pipeline lost 71, read 52 wrong without any flag and 28 wrong with a flag (identical in three API runs).
A language model used as OCR fails at the opposite end. It read 300 public pages (100 each from arXiv-style papers, German parliament papers and US government pages). On the arXiv-style pages it inserted 102 pieces of text that are not on the page, on 17 of 100 pages, and 3 pages ran into a loop or were cut off. The median word probability was 0.9926 on pages with inserted text and 0.9957 on pages without. Invented text is fluent text, and a language model gives fluent text a high probability. (Details.)
So both engine types are most confident where they are wrong, for opposite reasons. The CTC engine has no context, the language model trusts its context over the page.
2. Let the two failure modes check each other
Our scan-vlm-ctc@2 pipeline uses exactly that. A language model writes the text, then a CTC engine reads every word again from the pixels and gives it a box. The CTC engine cannot continue text that is not on the page. The language model knows that "AI" belongs in an earnings call. Where the two readings differ, the word comes back with verified: false.
On the same 15 text pages, 6 of 5,213 words came back verified: false, on pages 28, 31 and 35. All three misreads are among them. On page 28 the language model wrote AI and the CTC engine Al. A reviewer checks 6 words, 0.12 % of the text, and has covered every error on those pages. Three errors are too few to give a recall rate; they show that the flag fires at the right places.
On slides the list gets long. On 21 of 42 pages the language model's output was incomplete (model_output_incomplete); the service filled those words in from the CTC engine and flagged them. Even so, over the whole document the pipeline still read 16 to 17 numbers wrong with no flag and lost 37 to 40 (three runs). Numbers on slides are where we are weakest, see section 3.
You can test the idea with any two engines. The cheap version is a diff:
import difflib
def disagreements(a_words, b_words):
sm = difflib.SequenceMatcher(None, a_words, b_words, autojunk=False)
for tag, i1, i2, j1, j2 in sm.get_opcodes():
if tag != "equal":
yield a_words[i1:i2], b_words[j1:j2]
Run two engines on 100 of your own pages and read only the disagreements. That is your review list, and its length tells you how much checking your documents need.
3. Agents read numbers better, and fail in whole rows
Next, a language model with tools in place of the OCR. Claude Opus 5.5 (three runs) and Claude Sonnet 5.5 (four runs) got the 42 pages as images, no OCR tool, no text layer, and one prompt: write out the text of every page in full. Each run started with an empty context.
| Seconds per run | Tokens per run | |
|---|---|---|
| Claude Sonnet 5.5, 4 runs | 282 to 318 | 102,822 to 111,087 |
| Claude Opus 5.5, 3 runs (in parallel) | 420 to 810 | 52,966 to 160,567 |
scan-ctc@2, 3 API jobs |
17.9 to 24.7 | n/a |
scan-vlm-ctc@2, 3 API jobs |
89 to 97 | n/a |
On words all four systems are close on the slide pages: 1.1 to 3.1 % of the words wrong across all single runs (Opus 1.8 to 3.1 %, Sonnet 1.1 to 2.3 %, our two pipelines 2.6 % and 2.1 %; word order not counted, see section 5). On numbers the agents beat both our pipelines:
| Run | Numbers missing (of 1,661) | Numbers wrong, no flag |
|---|---|---|
| Sonnet 5.5, run 1 | 48 | 6 |
| Sonnet 5.5, run 2 | 1 | 0 |
| Sonnet 5.5, run 3 | 4 | 7 |
| Sonnet 5.5, run 4 | 0 | 5 |
| Opus 5.5, run 1 | 0 | 4 |
| Opus 5.5, run 2 | 6 | 14 |
| Opus 5.5, run 3 | 9 | 6 |
scan-ctc@2, 3 runs |
71 | 52 |
scan-vlm-ctc@2, 3 runs |
37 to 40 | 16 to 17 |
The shape of the errors matters more than the totals. Of 47 distinct numbers missing across the four Sonnet runs, 44 are missing in run 1 alone: whole rows of numbers on two slides. In Opus run 2 the output file was rebuilt from partial results after a tool error, according to the run's own log, and that run has the most wrong numbers (14). CTC errors are single characters at the same place every time. Agent errors are rows and pages, and they land somewhere else on each run.
A missing row is hard to catch. No word in the output is wrong; the row is simply absent. No agent run marked a single word as uncertain. Sonnet run 1 did write in its final message that some pages had small print, and a pipeline that passes only the text to the next step throws that sentence away.
Our pipelines repeat. scan-ctc@2 returned the same words and the same confidences on all 42 pages in all three runs, scan-vlm-ctc@2 on 41 of 42 (page 42, an organisation chart, came back with 411 words in one run and 412 in another). An agent that passed your test today can drop a table tomorrow. A pipeline that repeats its errors lets you find each one once and fix it.
4. Batch size inside the recognizer changes the bytes
Temperature 0 does not give identical output. Thinking Machines showed this in Defeating Nondeterminism in LLM Inference (Sept 2025): 1,000 completions of one prompt at temperature 0 gave 80 distinct outputs, because the kernels are not batch-invariant and server load changes the arithmetic.
OCR has the same effect. We sent 300 public pages through the CTC engine and compared the output files byte for byte:
| Set-up | Same bytes as the reference, of 300 pages |
|---|---|
| 3 processes, page batch 8 | 300 |
| 3 processes, page batch 16 | 300 |
| 3 processes, recognition batch 8 | 3 (297 differ) |
| 3 processes, recognition batch 4 | 2 (298 differ) |
The number of pages pooled per call does not matter once the detector gets one page at a time and every text line is padded to a fixed width and recognized in fixed batches of 16. The batch size inside the recognizer does matter: mostly the last digits of the confidence change, sometimes a letter. We fixed that value; changing it creates a new pipeline version. Under load through the public API, 3,840 pages of scan-ctc@2 came back bit-identical to the single-page result. (Full test.)
The language-model path does not repeat this well yet. On our test GPU, 20 of 20 pages repeated identically one after another, 3 of 100 differed in words at 32 parallel requests and 16 of 200 at 64. Through the public API under heavier load, a test on 13 November found 54 to 62 % of pages differing. We suspect the same batch-invariance cause and are investigating.
5. A text layer held 56 % of the words
Many RAG pipelines skip OCR when a PDF already has text. Most pages of the Schaeffler PDF carry a text layer. Of the 15,272 words on the 42 pages, 6,706 (44 %) exist only inside images: slide text, charts, tables. A pipeline that takes the text layer gets 8,566 words and none of the image words, and reports no error. On the 15 text pages the text layer is excellent (0.58 % word error rate, mostly line breaks and hyphenation), so a spot check on a few pages passes.
On the ground truth: our first reference for the image text took its word order from the systems under test, which favoured one of them. We replaced it with the text layer of the slide deck Schaeffler published with the call, checked against the page images. The two references differ in 6 of 6,706 words and in no number. Slides have no fixed reading order, so the rates here count missing or invented words without order, plus wrong or lost numbers.
Still open
We have not yet run the full loop "OCR, then check only the flagged words" end to end, and the comparison in sections 2 and 3 rests on one English document. Our next measurements: more documents, and the known number errors on slides (superscripts, spaces inside labels, a decimal), which are tracked as bugs and measured again with every release.
If you build on PDFs
- Keep page, box, confidence and source engine for every word. A flagged word without a box cannot be checked.
- Count how many wrong words sit above your confidence threshold on your own pages before you rely on it.
- Run two engines that fail differently and review where they disagree.
- If you need to replay a result, pin the batch shapes and test for identical bytes.
- Run OCR on pages that have a text layer too.
You can try a page without a key at ocr-software.com/app. The API is in the API guide. For agents there are MCP tools (pip install ocr-software-mcp, including uncertain_words for the flagged words) on the MCP page; for RAG pipelines there is a LangChain document loader and a Haystack converter, and a Python client. All integrations: ocr-software.com/integrations. The full study behind sections 1 to 3: Agentic OCR: can AI agents read documents?.
來源:DEV Community · dev.to