Visual document retrieval

Also known as: ColPali · OCR-free document retrieval

On this page 7

Visual document retrieval is a retrieval approach in which documents are indexed and searched as rendered page images rather than as extracted text, so that a query is matched against the full visual content of each page, including layout, tables, charts, figures and typography. In Multimodal AI, it is the retrieval stage that lets systems find evidence in slide decks, scanned reports, invoices and technical manuals without first running optical character recognition (OCR) or a layout parser.

The best-known model family is ColPali, which combines a vision-language model with late-interaction scoring in the style of ColBERT. The approach is also called OCR-free document retrieval, because the page screenshot itself becomes the unit of indexing, and it usually serves as the first step of a multimodal RAG pipeline.

How visual document retrieval works

Visual document retrieval works by turning each page into an image, encoding that image into one or many vectors, and comparing those vectors with an encoded text query. The classic text pipeline of PDF parsing, OCR, chunking and text embedding is replaced by a single vision encoder pass over the page screenshot.

In the ColPali design, a page image is split into a grid of image patches, typically around 1,000 patches per page. A vision-language model processes the patches and a light projection layer maps each patch to a compact vector of about 128 dimensions. The result is a multi-vector representation: one embedding per patch instead of one embedding per page.

At query time, every query token is also embedded. The MaxSim operator finds, for each query token, the most similar page patch and sums these maxima into the page score. This late interaction lets a query word such as “revenue” align with the exact region of a bar chart or table cell that carries the answer, which single-vector models tend to blur.

The table below summarizes the main stages of a typical indexing and search pipeline.

StageWhat happensTypical output
RenderingEach PDF or slide page is rasterizedOne image per page
Patch encodingVision-language model encodes image patchesAbout 1,000 vectors per page
ProjectionVectors are reduced to a compact size128-dimensional patch embeddings
Query encodingText query is tokenized and embeddedOne vector per query token
ScoringMaxSim compares query tokens with patchesRanked list of pages
Stages of a visual document retrieval pipeline

Model variants and design choices

Visual document retrieval models differ mainly in how many vectors they store per page and which backbone encodes the image. These choices set the balance between retrieval quality, index size and latency.

The following table compares the common design families.

FamilyRepresentationStrengthMain cost
ColPali-style modelsMulti-vector, one per patchHighest accuracy on dense pagesLarge index, heavier scoring
Single-vector visual embeddersOne vector per pageSimple vector database useLoses fine detail in tables
CLIP-style encodersOne vector per imageFast, general image searchWeak on text-heavy pages
Hybrid visual and textPage image plus OCR textRobust across document typesTwo pipelines to maintain
Common model families for visual document retrieval

Practitioners reduce the cost of multi-vector indexes with token pooling, which merges similar patch vectors, and with binary or scalar quantization of embeddings. A common production pattern is a two-stage search: a cheap single-vector index retrieves a few hundred candidates, and MaxSim reranks them.

Comparison with text-based document retrieval

Visual document retrieval differs from text-based retrieval in that it preserves layout and visual evidence that extraction pipelines often lose. Text retrieval remains cheaper and easier to audit, so the two approaches are frequently combined rather than treated as rivals.

AspectVisual document retrievalOCR and text retrieval
Charts and figuresMatched directly from pixelsUsually lost or reduced to captions
Complex tablesLayout kept intactOften broken by parsing errors
Indexing pipelineRender and encode in one stepParse, OCR, chunk and embed
Storage per pageHigh for multi-vector modelsLow with single-vector chunks
Exact keyword searchLimitedStrong with BM25 or hybrid search
ExplainabilityPatch heatmaps show matched regionsMatched text spans are visible
Visual versus text-based retrieval of documents

Related concepts sit close by. Cross-modal retrieval is the broader task of matching items across modalities, while document understanding covers extracting structured answers from a page once it has been found. Visual document retrieval focuses only on finding the right pages quickly.

Evaluation and practical deployment

Visual document retrieval is evaluated with ranking metrics such as nDCG@5 and recall@k on benchmarks built from real document collections. The ViDoRe benchmark, introduced with ColPali, groups tasks such as academic figures, government reports, energy documents and industrial manuals.

Deployment choices depend on corpus size and document style. The decision table below gives typical recommendations.

SituationRecommended setupReason
Slide decks and infographicsMulti-vector visual modelMeaning lives in layout and graphics
Clean born-digital textText embeddings plus BM25Cheaper with similar accuracy
Millions of pagesTwo-stage search with poolingKeeps index and latency manageable
Scanned forms with handwritingVisual model plus OCR fallbackCovers both layout and exact values
Choosing a retrieval setup by document collection

After retrieval, the selected page images are usually passed to a multimodal large language model, which reads them and generates the answer. Because the generator sees the original page, citation to a specific page is straightforward.

Limitations and common mistakes

Visual document retrieval has real constraints that teams should plan for before replacing an existing text pipeline. The most important is storage and compute cost, since multi-vector indexes can be tens of times larger than single-vector ones.

  • Low rendering resolution hides small print, footnotes and numbers in dense tables.
  • Exact identifiers such as part numbers or contract IDs are matched less reliably than with keyword search.
  • Multilingual coverage depends on the backbone model and can be uneven for less common scripts.
  • Cross-page context is weak, because each page is scored on its own.
  • Treating benchmark scores as universal leads to surprises; domain evaluation on a sample of real queries is essential.

Stripped to the essentials

Most search tools first turn a document into plain text. Then they search that text. Charts, tables and page layout often get lost on the way.

Visual document retrieval looks at the page itself. It treats every page like a photo. A model learns which parts of the photo match the words in a question. So a question about sales growth can point straight to the right chart.

Think of a person flipping through a printed report. They spot the right page by its picture, its table or its heading. The system does the same thing at machine speed.

Where it is applied

An engineering firm keeps about 40,000 pages of maintenance manuals as scanned PDFs. Many pages show wiring diagrams, torque tables and exploded part drawings. The old text search often failed, because OCR scrambled the tables and ignored the diagrams.

The team rendered every page at about 150 dots per inch, indexed it with a ColPali-style model and added a two-stage search to keep query times under one second. A technician can now ask for the torque setting of a specific pump flange, and the system returns the page with the matching table among the top three results.

A multimodal language model then reads the retrieved page and states the value with a page reference. Technicians spend far less time searching, and engineers can check every answer against the original page.