Gradient LabSign up free

Trending › OCR model

Mistral OCR 4: from a wall of text to blocks you can cite

Mistral OCR 4 doesn’t just return text: every block comes with a box on the page, a type (title, table, equation, signature) and a confidence score. That is what lets a RAG system point to exactly where an answer came from.

Watch it move. This is an animated lesson on Gradient Lab.

Start the animated lesson

Step by step

Concept

Plain OCR loses the page

Classic OCR returns one long string. You get the words, but you lose what was a heading, which numbers belonged to which table row, and where on the page anything was. For search and RAG, that structure matters.

A page with a title, paragraph and table becomes one undivided slab.

Key idea

Blocks with boxes and types

OCR 4 splits the page into blocks. Each one has a bounding box (its position on the page), a type such as title, table, equation or signature, and the content as Markdown. Reports describe 13 block labels.

Each coloured tile is a typed block with its own coordinates.

Build

Confidence says when to check

Every block also carries a confidence score. Low-confidence blocks, like a smudged number in a scanned invoice, can be routed to a person instead of flowing straight into a database. It’s the same trade-off as a precision and recall threshold.

Tall bars: confident blocks. The short coral one goes to human review.

Insight

Why RAG cares

When a chatbot answers from a 200-page report, users want to see the source. If each stored chunk keeps its page number and box, the app can highlight the exact paragraph or table cell behind an answer. That is why Mistral pitches OCR 4 as the ingestion step for enterprise search and RAG.

Question → retrieved chunk → highlighted box on the original page.

Insight

The launch numbers

Mistral reports support for 170 languages, a top OlmOCRBench score of 85.20, and a 72% average win rate when human annotators compared it with other systems. It can run in a single container for companies that must keep documents on their own servers. These are vendor figures; a point release, OCR 4.1, followed in the summer.

Win rate: in a blind side-by-side, how often reviewers preferred OCR 4.

Quick check: What does a bounding box let a RAG app do?

Pseudocode

# old OCR
text = ocr(page)                 # one long string

# structured OCR
for block in ocr4(page):
    block.type        # "title", "table", "equation", "signature", ...
    block.bbox        # where it sits on the page: x0, y0, x1, y1
    block.confidence  # how sure the model is
    block.markdown    # the content

# in RAG: store bbox with each chunk, so answers can highlight the source
if block.confidence < 0.8: send_to_human(block)

Go deeper

Sources

  1. MarkTechPost: Mistral OCR 4 brings citation-ready structured output
  2. AIwire (HPCwire): Mistral unveils OCR 4
  3. Kompozy: Mistral releases OCR 4