Multimodal RAG

Multimodal RAG retrieves images, charts, scanned pages and tables as well as text, and passes them to a model that writes the answer. This post compares the three common designs, the models and vector stores each one needs, and how to measure which design works on your documents.

Multimodal RAG designs: Convert to text, Shared embeddings and Embed page images, all feeding a vector store, retrieval and an LLM answer

The post assumes you know the basic RAG loop: embed documents, retrieve the closest ones for a query, and pass them to a language model. That loop comes from the 2020 paper Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Our post LLM monitoring and observability covers operating the system after launch.

Where text-only RAG fails

A text pipeline extracts text from a PDF, splits it into chunks and embeds the chunks. The pipeline works when the page is mostly prose, and it fails on other content:

  • A bar chart stores its values in the bar heights, which text extraction cannot read.
  • A table flattened into one line of text loses which value belongs to which column.
  • A scanned form has no text layer until OCR runs, and its meaning depends on layout.
  • A slide can hold a diagram with three words of text on it.

Text extraction drops or scrambles that content, so the retriever never sees what the user asked about.

The three designs at a glance

Convert to textShared embedding spacePage-image embeddings
What gets embeddedText descriptions, extracted tables, OCR outputText and images in one vector spaceEach page rendered as an image
Vectors per itemOne per chunkOne per image or chunkAbout a thousand per page
Ingestion costA parser or vision-model call per elementOne embedding call per itemA GPU embedding pass per page
Best contentMostly text with some figuresPhotos, product images, scenesScans, slide decks, reports with charts
Main weaknessThe description misses details the question needsWeak on dense small text inside imagesA much larger index, and fewer databases can store it

Design 1: convert everything to text

The simplest design keeps the text pipeline and adds a conversion step. Each non-text element becomes text before indexing, and the rest of the system is ordinary RAG:

  • A vision-language model describes each image or chart, and the system indexes the description.
  • A parser extracts each table into Markdown, HTML or CSV, and the system indexes it with its headers and caption.
  • OCR or a layout-aware parser reads scanned pages.
  • A speech model transcribes audio, with timestamps.

Document parsers do much of this work:

ParserLicense or modelNotes
DoclingMIT code. Bundled models have their own licenses.Started at IBM Research, now hosted by the Linux Foundation's LF AI & Data
UnstructuredApache 2.0 libraryA paid hosted platform is separate
MarkerApache 2.0 code. Model weights use a modified OpenRAIL-M license.The weights are free for research, personal use and small startups. Larger commercial use needs a paid license.
Azure Document Intelligence layout modelPaid cloud APIReturns text, tables, figures and headings, and can output Markdown
Amazon TextractPaid cloud APIExtracts text, handwriting, forms and tables

Strengths. The design needs one index and one text embedding model. Debugging is easy, because you can read exactly what was indexed.

Weaknesses. A description is a summary written before anyone asks a question. A chart description may say "revenue by region" when the user asks for one quarter in one region. The answer is only as good as the converter's output, and every image costs a model call at ingestion. Keep a link from each text chunk back to the original page or image, so the generator can see the original when the text is not enough.

Design 2: retrieve images with a shared embedding space

In this design, one model embeds text and images into the same vector space. A text query then retrieves images directly, which is the simplest way to build RAG over images. CLIP introduced the approach, and the CLIP authors trained the model on 400 million image and text pairs to match each image with its caption.

Current hosted and open models that embed text and images in one space:

  • Cohere embed-v4.0 takes text, images and mixed inputs such as PDF pages. It returns 256 to 1,536 dimensions and accepts up to 128,000 tokens.
  • Voyage voyage-multimodal-3.5 takes interleaved text, images and video, with a 32,000-token context and 256 to 2,048 dimensions.
  • Google Gemini Embedding 2 embeds text, images, video, audio and PDFs, with 128 to 3,072 dimensions.
  • Amazon Nova Multimodal Embeddings on Bedrock takes text, documents, images, video and audio, with 256 to 3,072 dimensions.
  • Jina Embeddings v4 has open weights under the Qwen Research License, which is not an open-source license. It returns one vector per input, or many vectors per input for late interaction, described in Design 3.

Strengths. The design suits photo-like content, such as product images, scenes and object diagrams. Users can search by text or by an example image, and ingestion needs no captioning step.

Weaknesses. General image-text models read dense text inside an image poorly, such as a page of small print or a detailed table. Retrieval returns an image, so the generator must be a vision-capable model. Text-to-image similarity scores have a different range from text-to-text scores, so set the similarity threshold by testing on your own data.

Design 3: embed page images directly

The page-image design skips text extraction: the system renders each page as an image and embeds the image with a vision-language model. The ColPali paper introduced the method in 2024.

ColPali produces many vectors per page instead of one: it splits the page into 1,024 image patches and outputs a 128-dimension vector per patch. At query time, the model splits the question into tokens, which are short pieces of text. Each question token finds its best-matching patch, and the page score is the sum of those best matches. This scoring is called late interaction or MaxSim, and ColPali borrowed it from ColBERT, an earlier text retriever. The paper reports about 257.5 KB per page in float16 (16-bit numbers), so a million pages need about 258 GB.

The model family has grown since the first release. The colpali repository (MIT code) lists these weights:

  • ColPali, built on PaliGemma-3B, whose backbone uses the Gemma license.
  • ColQwen2 and ColQwen2.5, under Apache 2.0.
  • ColSmol, a smaller model, under Apache 2.0.

Nomic's ColNomic Embed Multimodal is another Apache 2.0 multi-vector model.

The ColPali authors also built the ViDoRe benchmark for page retrieval. ViDoRe V2 (2025) followed because top models scored above 90 out of 100 on the first version, which left little room to compare them. ViDoRe V3 (January 2026) covers 10 enterprise domains with about 26,000 pages and 3,099 human-verified queries in 6 languages.

Strengths. The design removes the parsing step, and parsing is the step that fails most often. Layout, tables, charts and figures are all encoded in the embedding, and one ingestion path handles every page type.

Weaknesses. A multi-vector index stores about a thousand vectors per page, so it is far larger than a single-vector index. Embedding pages needs GPU capacity. The retrieved unit is a whole page, which may hold more than the answer needs.

Vector stores for multi-vector retrieval

Late interaction needs a database that stores many vectors per item and scores with MaxSim. Several databases support this natively:

  • Qdrant (v1.10 and later) stores multivectors and scores them with the max_sim comparator.
  • Weaviate (v1.29 and later) supports multi-vector embeddings, and from v1.31 it can also compress multi-vectors with MUVERA, which is described below.
  • Milvus (2.6.4 and later) stores many vectors in one field type, called Array of Structs, and scores the vectors with a MAX_SIM metric.
  • LanceDB supports multivector search with cosine distance only.
  • Elasticsearch (9.0 and later, in preview) stores multi-vectors in rank_vectors fields.
  • Vespa stores multi-vectors in tensor fields and ranks pages with a MaxSim expression.

Two methods cut the storage cost. Token pooling merges similar patch vectors. The colpali repository reports that a pool factor of 3 removes two-thirds of the vectors and keeps about 98% of retrieval quality. MUVERA turns each multi-vector set into one fixed-size vector for a fast first pass, and the exact MaxSim then reranks the top results.

Choosing a design

Your contentStart with
Mostly clean text with some figuresConvert to text, and keep links to the images for the generator
Product or scene images searched by descriptionShared text-image embeddings
Scanned or layout-heavy PDFs, slide decks, reports with chartsPage-image embeddings, compared against a text-conversion baseline
Spreadsheets and database tablesQuery the structured data directly, often without RAG
Audio or videoTranscribe, split by time, and index the text with timestamps

Many systems combine designs. A system can index text conversions for keyword and semantic search, index page images for visual pages, and merge the two result lists. Build the text-conversion version first in every case and use its score as a baseline, which shows whether a more complex design improves retrieval.

The generation step

The generator can be text-only or vision-capable:

  • A text-only generator receives the converted text and captions. It costs less and works with more models, but it sees only what the converter produced.
  • A vision-capable generator receives the retrieved images or pages with the question. It can read the original chart or table, but each image adds input tokens.

Image cost depends on resolution and provider:

  • Anthropic's vision docs count one token per 28-by-28-pixel patch, up to a per-image cap. Anthropic's PDF support page says each PDF page is sent as extracted text plus an image.
  • Gemini's media resolution option sets the number of tokens per image on Gemini 3 models, from 280 tokens at low to 2,240 at ultra-high.
  • OpenAI's vision guide lists a token formula per model family and a detail setting that lowers the cost of each image.

Pass only the top few pages, and crop or shrink images when the answer does not need full resolution. Instruct the model to answer only from the supplied material and to cite the page or image it used. Citations let a person check the answer and make evaluation possible.

Evaluating a multimodal RAG system

Evaluate retrieval and generation separately, as for text RAG.

  1. Build a question set from your real documents. Include questions whose answer is in a chart, a table cell or a figure caption, not only in body text. Record the page or image that holds each answer.
  2. Measure retrieval. For each question, check whether the correct page appears in the top results. Recall@k is the share of questions whose correct page is in the top k results. nDCG@k (normalized discounted cumulative gain) gives more credit when the correct page ranks first than when it ranks fifth. ViDoRe reports nDCG@5 on a scale of 0 to 100.
  3. Measure answers. Score correctness against a reference, faithfulness to the retrieved material, and whether the cited source supports the claim. Ragas, an open-source RAG evaluation library, includes multimodal faithfulness and relevance metrics. If a model scores the answers automatically, check its scores against human review on a sample.
  4. Compare designs on the same set. Run text conversion and page embeddings on your questions.

Public benchmarks such as ViDoRe, M3DocRAG and MMDocIR help you choose which models to test. Choose the final design with your own question set, because benchmark gains do not always apply to your documents.

Common failures in multimodal RAG

  • Silent extraction failures. OCR returns wrong or unreadable text on a low-quality scan, and nobody notices. Sample and review the converted output, and flag pages whose extracted text is unusually short.
  • Charts without numbers. A description such as "line chart showing growth" cannot answer a question about a value. Extract the underlying data where you can, or pass the original image to a vision model.
  • Stale indexes. A document changes and its page images are not re-embedded. Store a document version or hash with each indexed item.
  • Unexpected costs. Captioning every image or embedding every page costs money per item. Estimate the cost on a sample, then multiply by the full corpus before you ingest everything.
  • Personal data in images. Screenshots and scans can hold names, ID numbers and other personal data that text filters miss. Run personal-data detection on images as well as text. Our guide LLM privacy: data flows, duties and controls covers the wider privacy duties.
  • Access control. Retrieval must respect who may see each document. Apply permissions as a filter in the retrieval query, not as an instruction in the prompt.

A build order

  1. Collect 50 to 100 real questions and their source pages before writing code.
  2. Build the text-conversion baseline and score it.
  3. Group the failures by type: charts, tables, scans, layout.
  4. Add the design that targets the largest failure group, such as page-image retrieval for layout-heavy documents.
  5. Add a vision-capable generator only where the text path cannot answer.
  6. Instrument the system, evaluate on a schedule, and keep adding questions.

FAQ

What is multimodal RAG?

Multimodal RAG is retrieval-augmented generation over more than text. The system retrieves images, charts, scanned pages or tables that match a question, and a model writes the answer from them.

Is ColPali better than OCR plus text embeddings?

On visually rich pages, the ViDoRe results favor page-image retrieval. On clean text documents, a text pipeline is cheaper and often scores as well. Run both on your own question set before you choose.

Can I use pgvector for ColPali-style retrieval?

The pgvector extension stores one vector per row and has no built-in MaxSim scoring. Teams store patch vectors as rows and compute MaxSim in SQL or in application code, or use a database from the list above that supports multi-vectors natively.

How large is a page-image index?

The ColPali paper reports about 257.5 KB per page in float16 before compression, so a million pages would need about 258 GB. Token pooling, quantization and MUVERA-style encoding reduce that size.

Do I need a vision model to generate answers?

Only if the answer depends on visual content the converter did not capture, such as a value read from a chart. A text-only generator works when the conversion step extracts the needed text and table data.

How do I handle tables in multimodal RAG?

Extract each table with its headers and caption into Markdown or HTML, and index it as one chunk so rows stay with their columns. For large tables of numbers, load the data into a database and let the model query it.

Need this built?

We build document and vision retrieval pipelines in our Computer vision and NLP and LLM applications services. If text-only search keeps missing answers in your documents, request a quote or email [email protected], and we will plan a multimodal retrieval pipeline for your documents.

Privacy engineering notes by email

When we publish a new guide on data mapping, DSR automation or AI privacy, we send it to this list. Nothing else.