A field guide · Vision-language models

Searching With Pixels

Multimodal retrieval and visual RAG: how to find the right image, page or video frame among millions, and how to hand that evidence to a vision-language model so that its answer can be checked.

Multimodal retrievalVisual RAGEmbedding models

Three ways to score a match

Every retriever needs a scoring function s(q, d) that says how well candidate d answers query q. There are three basic designs. They differ in one question: when do the query and the candidate first meet inside the network?

Bi-encoders: meet at the very end

A bi-encoder (also called a dual encoder) has two encoders. One maps the query to a vector. The other maps the candidate to a vector. The score is a dot product or cosine similarity between the two vectors.

s(q, d) = ⟨ f(q), g(d) ⟩ / ( ‖f(q)‖ · ‖g(d)‖ )f encodes the query, g encodes the candidate. The two never see each other until this final product.

The key property is that g(d) does not depend on the query. So every candidate can be encoded once, offline, and stored. At query time the system encodes only the query and then searches the stored vectors. Approximate nearest-neighbour (ANN) indexes such as HNSW graphs or the inverted-file and product-quantization indexes in Faiss make that search sublinear in the corpus size. CLIP is a bi-encoder. So is DPR, the dense passage retriever that made this design standard for text search.

The price is expressiveness. All the information about a page must fit into one vector before the system knows what will be asked. A query about a footnote and a query about the main chart must both be answered by the same vector.

Cross-encoders: meet at the very start

A cross-encoder feeds the query and the candidate into one network together. Every query token can attend to every candidate token, in every layer. A small head reads out a relevance score.

s(q, d) = h( Transformer( [ q ; d ] ) )The query and candidate are concatenated, so attention can compare them at every layer.

This is the most accurate design, because the network can look for exactly what the query asks. It is also the most expensive. Nothing can be precomputed, because every representation depends on the query. Scoring a corpus of N candidates costs N full forward passes per query. With a VLM as the network and a thousand visual tokens per page, that is a forward pass over a thousand tokens for every page you want to score. Cross-encoders are therefore used only as rerankers on a short list.

Late interaction: meet in the middle

Late interaction keeps one vector per token instead of one vector per item. The query becomes vectors q1, …, qn. The candidate becomes vectors d1, …, dm. Both sets are computed independently, so the candidate side can still be precomputed. The score is computed by a cheap operator called MaxSim, introduced by ColBERT for text.

s(q, d) = ∑i=1..n maxj=1..m ⟨ qi, dj ⟩For each query token, find the best-matching candidate vector. Add up those best matches.

Read the formula as a sentence. Each query token goes looking for its best match anywhere in the candidate. The candidate scores well if every part of the query finds a good match somewhere. On a page image, the candidate vectors are patch vectors. So the query token "2023" can match the patch where the axis label 2023 is printed, while "Asia" matches the legend. A single pooled vector cannot keep those two locations apart. MaxSim can.

Late interaction sits between the other two designs. It precomputes like a bi-encoder, but it stores m vectors per candidate instead of one. Its matching is token-level, but it does not let tokens attend to each other across the query and the candidate. FILIP brought this idea to image-text pretraining in 2021. ColPali made it the standard for document pages in 2024.

Figure 2Where the query and the candidate first meet

Figure 2. The three scoring designs on one query and one image. The cost counters assume a corpus of N candidates. Only the bi-encoder and late interaction can encode candidates once, offline. Late interaction pays for that with one stored vector per patch.

Cascades: use all three

Real systems chain these designs. A bi-encoder (or a text index such as BM25 over extracted text) retrieves the top few hundred candidates from millions. A late-interaction model or a cross-encoder reorders that short list. The generator reads the top handful. ALBEF (2021) and BLIP (2022) already did this for image-text retrieval: a contrastive similarity picks the top k images, and an image-text matching head, which is a cross-encoder, reranks them.

A cascade works only if the first stage keeps the right answer somewhere in its short list. The reranker cannot recover a page that was never retrieved. This is why first-stage retrievers are judged by recall at a generous cutoff, while rerankers are judged by precision at the top.

Table 1 · Retriever families compared along the aspects introduced so far
FamilyWhen query and candidate meetCandidate encodingPer-query cost over N candidatesStored per candidateMatch granularityANN-indexableTypical roleExamples
Sparse text (BM25 over OCR)At the end, via shared wordsOffline, needs OCR or parsingInverted-index lookup, very cheapTerm weights, a few KBExact wordsYes (inverted index)First stage, hybrid partnerBM25
Bi-encoderAt the end, one dot productOffline, onceOne query encode + N dot products (sublinear with ANN)One vectorWhole itemYesFirst stageCLIP, SigLIP, DSE, GME, VLM2Vec
Late interactionAfter encoding, token by token (MaxSim)Offline, onceOne query encode + MaxSim over short list or a multi-vector indexOne vector per token or patchToken to patchPartly (needs PLAID-style engines or MUVERA)First stage on small corpora, or second stageColBERT, FILIP, ColPali, ColQwen2
Cross-encoderFrom the first layerCannot precomputeN full forward passesNothing (raw item only)Full attentionNoReranker on top-kBLIP ITM head, MonoQwen2-VL, jina-reranker-m0, Qwen3-VL-Reranker
HybridSeveral scores fusedMixedSum of the partsSum of the partsMixedPer componentRobust first stageBM25 + dense, dense + multi-vector

How to read this table. Move down the rows from bi-encoder to cross-encoder and two things change together. Matching gets finer, so accuracy tends to go up. Precomputation gets harder, so query cost goes up. Late interaction is the only row that keeps precomputation while matching at token level, and it pays in storage. That trade-off drives most of the design decisions later in the post.

How retrieval is measured

Before comparing retrievers we need a way to grade a ranked list. Retrieval papers use a small set of metrics. Each one answers a different question, and the choice matters when reading benchmark tables.

Recall@k asks: is a correct candidate anywhere in the top k? It is the right metric for a first stage, because a later stage can still promote the correct item. Image-text benchmarks such as Flickr30K and COCO report Recall@1, @5 and @10 in both directions: text to image and image to text.

Precision@1 (or accuracy at rank one) asks: is the top result correct? MMEB, the embedding benchmark we meet later, uses it. It matters when the system acts on one result, for example when it shows a single image.

MRR, mean reciprocal rank, averages 1/rank of the first correct result. A correct result at rank 1 gives 1. At rank 4 it gives 0.25.

nDCG@k, normalized discounted cumulative gain, is the default for document retrieval and the main metric of the ViDoRe benchmarks. It handles several relevant candidates and graded relevance. It is built in three steps.

DCG@k = ∑r=1..k ( 2relr − 1 ) / log2( r + 1 )
nDCG@k = DCG@k / IDCG@krelr is the graded relevance of the item at rank r. IDCG is the DCG of the ideal ordering, so nDCG lies between 0 and 1.

The logarithm in the denominator is the discount. A relevant page at rank 1 counts fully. At rank 3 it counts half, because log2(4) = 2. Dividing by the ideal DCG makes scores comparable across queries that have different numbers of relevant pages. With binary relevance and exactly one relevant page, nDCG@5 reduces to 1/log2(1 + rank) if the page is in the top five, and 0 otherwise.

Contrastive dual encoders as retrievers

The first strong image-text retrievers were trained for a different purpose. CLIP (2021) and ALIGN (2021) were trained to align images with their captions so that the image encoder would transfer to many tasks. CLIP used 400 million image-text pairs. ALIGN used over a billion noisy alt-text pairs. Retrieval came for free, because the training objective is a retrieval objective. Post 04, Teaching Language Models to See, covers this pretraining in depth. Here we look at it only as a retriever.

The contrastive loss is a retrieval loss

Take a batch of B image-caption pairs. Encode every image into a unit vector vi and every caption into a unit vector ti. Now treat each caption as a query and the B images in the batch as the corpus. The correct image is the one from the same pair. The other B − 1 images are negatives. A softmax over the similarities turns this into a classification problem: pick the right image.

ℒt→v = − (1/B) ∑i log [ exp( ⟨ti, vi⟩ / τ ) / ∑j exp( ⟨ti, vj⟩ / τ ) ]The InfoNCE loss. CLIP adds the mirror term ℒv→t, where each image picks its caption, and averages the two. τ is a learned temperature.

This loss rewards exactly what a retriever needs: the matching pair must outscore every non-matching pair in the batch. Three consequences follow from its shape.

SigLIP (2023) replaced the softmax with an independent sigmoid on every pair. Each pair becomes a binary decision: match or not. This removes the need to normalize across the whole batch and made very large batches cheaper. SigLIP 2 (2025) added multilingual data, captioning-style decoder losses and dense features. SigLIP-family encoders now sit inside many VLMs and many retrievers.

What a contrastive retriever gets right and wrong

On natural photos with short captions, contrastive dual encoders are strong and cheap. One image becomes one vector, and an index of a billion vectors fits on a few machines. For "a photo of a red bus at night", this is hard to beat.

Their weaknesses follow from the training data and the loss.

Several lines of work keep the dual-encoder shape but fix the text side. LiT locks a pretrained image encoder and trains only the text tower. Nomic Embed Vision goes the other way: it trains a vision encoder into the existing space of the Nomic Embed text model, so text-to-text and text-to-image search share one index. Jina-CLIP trains a CLIP model that is also a good text-to-text retriever, and jina-clip-v2 extends this to many languages.

The modality gap and mixed-modality search

Plot the image vectors and the text vectors of a trained CLIP model, and you find something surprising. The two modalities do not mix. Images occupy one region of the sphere. Captions occupy another. Matching pairs are close in the sense that matters for ranking, but the two clouds sit apart. Liang and colleagues named this the modality gap in 2022.

They traced it to two causes. First, a randomly initialized deep network maps all inputs into a narrow cone. The image encoder and the text encoder each start in their own cone, so the modalities begin far apart. Second, the contrastive loss with a small temperature does not pull the cones together. It only needs pairs to be closer to each other than to negatives, and it can satisfy that without closing the gap. Schrodi and colleagues later found that only a few embedding dimensions carry the gap and linked it to an information imbalance: a caption describes only part of what an image shows.

Figure 3Contrastive training aligns pairs but leaves a gap

Figure 3. A two-dimensional cartoon of the modality gap. Real embeddings have hundreds of dimensions, so this shows the shape of the argument, not measured positions. Within one modality the ranking is fine. Across modalities, the shared offset favours candidates on the query's own side.

Why the gap often does not matter, and when it does

Here is a small derivation that explains a lot of practical behaviour. Write every image vector as an image-side component plus a shared offset: v = v′ + g. Score a text query t against it with a dot product.

⟨ t, v ⟩ = ⟨ t, v′ ⟩ + ⟨ t, g ⟩The second term is the same for every image, so it cannot change the order of the images. (With normalized vectors this holds only approximately, but the intuition carries.)

So when a text query searches a pool that contains only images, the gap shifts every score by about the same amount. The ranking survives. This is why CLIP retrieves images well despite the gap.

Now put text candidates into the same pool. Text candidates do not carry the offset g. The term ⟨t, g⟩ now differs between the two kinds of candidate, and it is usually negative, because the query sits on the text side. A mediocre text candidate can beat the correct image. This is modality bias. It appears whenever one index holds several modalities, such as captions, page images and photos together.

The UniIR paper measured this directly on its M-BEIR benchmark. Without instructions that name the modality to return, multi-task retrievers often returned the wrong kind of candidate. A CLIP model with score fusion did so for 58.8 percent of queries. A BLIP model with feature fusion did so for 50.9 percent. With instruction tuning, the CLIP model's error rate fell to 2.7 percent and the BLIP model's to 15.2 percent.

Later models attack the gap from the training side. jina-embeddings-v4 reports the average cosine similarity of matching image-text pairs: 0.15 on Flickr30K for OpenAI CLIP, 0.38 for jina-clip-v2, and 0.71 for jina-embeddings-v4. The shift comes from encoding both modalities with one VLM backbone, which is the subject of the next section. E5-V reports that a simple prompt, "summarize in one word", largely removes the gap in a VLM's raw embeddings.

Turning a VLM into an embedder

CLIP-style models have a small text encoder and see one modality per tower. Many real queries need more. "Find a dress like this one but in blue" combines an image and an edit. "Which Wikipedia article describes this building?" maps an image to a long text. "Find the slide that explains this chart" maps a text to a dense page. Universal multimodal retrieval asks one model to handle all of these.

Before VLMs were used as encoders, these tasks had separate solutions. Composed image retrieval, where the query is a reference image plus a text edit, has its own benchmarks, such as CIRR and FashionIQ. Pic2Word handles it zero-shot by mapping the reference image to a pseudo-word that a CLIP text encoder can combine with the edit. MagicLens trains on pairs of images that appear on the same web page, with instructions describing how they relate. VISTA adds visual tokens to a strong text embedder, so one model can embed text, images and both together. UniIR trained CLIP and BLIP models jointly on many such tasks.

A VLM already reads interleaved images and text with a large language model. The idea of a VLM embedder is to reuse that reader as the encoder of a bi-encoder. The query side and the candidate side run through the same VLM. Each produces one vector, and the vectors are compared by cosine similarity.

Which vector to use

A decoder-only language model produces one hidden state per token. To get one vector per input, you have to pool. Most VLM embedders take the hidden state of the last token: VLM2Vec, GME and E5-V all do. The reason is causal attention. Only the last token has attended to the whole input, so it is the natural summary. VisRAG uses a position-weighted mean instead, which gives later tokens more weight for the same reason. Some models replace causal attention with bidirectional attention during retrieval training. NVIDIA's llama-nemoretriever-colembed does this, so every token can see the whole input.

E5-V showed that the prompt matters as much as the pooling. It wraps each input in a prompt that asks for a one-word summary, for example "<image> Summary above image in one word:". The last token must then compress the meaning into the space of a single next word. Text and images land in a shared region because both are being squeezed into the same vocabulary space.

Figure 4How a VLM becomes a bi-encoder

Figure 4. The common recipe behind VLM2Vec, GME, mmE5, jina-embeddings-v4 and Qwen3-VL-Embedding. The same VLM encodes queries and candidates. The last-token state (or a pooled state) is the embedding. Training is contrastive, with in-batch and mined hard negatives. The final step shows the two ways to spend more storage for more accuracy: a longer vector, or one vector per token.

Instructions tell the embedder what kind of match to make

The same image should map to different vectors depending on the task. For a "find the same product" task, the colour of a dress matters. For a "find the article about this landmark" task, it does not. VLM embedders handle this by prefixing the query with a task instruction, such as "Find a Wikipedia passage that answers this question about the image". UniIR introduced instruction-guided retrieval for multimodal search. VLM2Vec made it the default for VLM embedders.

VLM2Vec also introduced MMEB, the Massive Multimodal Embedding Benchmark. MMEB recasts 36 datasets as ranking problems in four meta-tasks: classification (10 datasets), visual question answering (10), retrieval (12) and visual grounding (4). Twenty datasets are used for training and sixteen are held out. The metric is Precision@1 over 1,000 candidates. Trained on that data with LoRA, a LLaVA-1.6 backbone scored 62.9 on average, against 44.7 for the best zero-shot baseline. An interesting side result: adding instructions hurt plain CLIP, lowering its average by 29.4 percent, while it helped the VLM embedder. A model needs a language model behind it to follow instructions.

The lines of work since then

Most VLM embedders since 2024 share the recipe in Figure 4. They differ in where they find their training signal.

MMEB has since grown into MMEB-V2, which adds visual document retrieval, video retrieval, temporal grounding, video classification and video question answering. VLM2Vec-V2 is the matching model. The benchmark change reflects the field's direction: one embedder for photos, pages and clips.

Retrieving document pages without OCR

Return to the annual-report archive. The standard way to search it, until 2024, was to turn every page into text first. A typical pipeline runs a layout detector, an OCR engine on each text block, a table extractor, and sometimes a captioning model for figures. It then splits the text into chunks and embeds each chunk with a text retriever. The ColPali paper timed such a pipeline at 7.22 seconds per page to index.

This pipeline has two problems. It is slow and has many parts that can break. And it throws information away before the retriever ever sees it. A bar chart becomes a list of axis labels. A table loses its row and column structure. A page whose meaning is carried by layout, such as a form or an infographic, becomes a jumble of words. OHRBench, a benchmark of 8,561 document page images from seven domains, studied this directly. It separated OCR errors into semantic noise (wrong characters and words) and formatting noise (lost structure). Its conclusion: none of the OCR solutions it tested was good enough to build a high-quality RAG knowledge base. Post 10, How VLMs Read Documents, covers OCR and document parsing in depth.

ColPali: late interaction over page patches

ColPali (Faysse and colleagues, 2024) skips the text step. It feeds the page image straight into PaliGemma-3B, a VLM with a SigLIP vision encoder and a Gemma-2B language model. It keeps the output vector of every image patch, projects each one to 128 dimensions, and scores queries with ColBERT's MaxSim. A page becomes 1,024 patch vectors plus a few instruction-token vectors, 1,030 in total.

The language model matters here. The patch vectors that come out of PaliGemma's language model have passed through layers trained to answer questions about images. So a patch over the word "hourly" can match the query token "hour", even though no OCR ran. The ColPali paper shows exactly this in its similarity maps.

Figure 5MaxSim over a page, one query token at a time

Figure 5. Late interaction on a page image. Each query token takes its maximum similarity over all patches, and the page score is the sum. The heat values are illustrative, chosen to show the mechanism. The blank-patch stage reflects a real observation in the ColPali paper: some empty patches score high, which the authors compare to register tokens.

The results changed the field's default. On the ViDoRe benchmark introduced with it, ColPali averaged 81.3 nDCG@5. The best text pipelines in the same table averaged 65.5 (OCR plus BM25), 66.1 (OCR plus BGE-M3) and 67.0 (OCR and figure captions plus BGE-M3). Indexing took 0.39 seconds per page instead of 7.22. Two ablations show where the gain comes from. A single-vector version of the same model, BiPali, scored 58.8. The original SigLIP encoder, used as a single-vector retriever, scored 51.4. So most of the jump came from late interaction on top of a VLM's language-model outputs, not from the vision encoder alone.

Single-vector page embedders

Late interaction is not the only way to skip OCR. DSE, Document Screenshot Embedding (Ma and colleagues, 2024), uses a single vector per page. It encodes a screenshot with Phi-3-vision, which splits the page into a grid of 336-pixel crops plus a global view, and takes the end-of-sequence hidden state. On a corpus of about 1.3 million Wikipedia page screenshots, DSE beat BM25 by 17 points in top-1 accuracy. On slide retrieval, it beat OCR-based text retrieval by over 15 points of nDCG@10.

DSE also measured the resolution trade-off cleanly. Going from a 1×1 grid of crops to 4×4 raised top-10 accuracy on Natural Questions from 62.0 to 73.7 percent. It also cut encoding speed from 12.2 to 4.3 pages per second. The authors recommend 2×2 or 3×3 as the balance point. Resolution is a retrieval hyperparameter, not just a reading one.

VisRAG (Yu and colleagues, 2024) built a single-vector retriever on MiniCPM-V 2.0 with position-weighted mean pooling. It trained on about 122,000 pairs from document VQA datasets plus about 239,000 synthetic queries written by GPT-4o over textbooks, papers and manuals. Its retriever beat a text retriever trained under the same conditions on OCR output (77.91 against 74.78 average MRR@10 in-domain, and 71.49 against 63.33 out of domain). The gap is larger out of domain.

OCR text versus page images, side by side

Figure 6 makes the comparison concrete. Pick a query and see what each pipeline has to work with.

Figure 6What an OCR pipeline keeps, and what a page-image retriever sees
Query

Figure 6. Three drawn pages and three queries. For text questions both pipelines find the page. For a question answered only by bar heights, the OCR text holds axis labels but no values, so the text retriever has little to match. For a table, OCR keeps the numbers but scrambles which number belongs to which row. Adding VLM captions to the OCR text helps the chart case partly. Scores are illustrative; the pattern follows the ColPali, VisRAG and OHRBench findings.

The ColPali family and its successors

ColPali spawned a family of late-interaction document retrievers. ColQwen2 swaps PaliGemma for Qwen2-VL-2B, which accepts pages at their native aspect ratio and caps a page at 768 patch vectors. ColSmol and ModernVBERT push toward smaller models. NVIDIA's llama-nemoretriever-colembed (1B and 3B, on the Eagle2 VLM) switches to bidirectional attention and reported 91.0 nDCG@5 on ViDoRe V1 and 63.5 on ViDoRe V2 in mid-2025, first on both leaderboards at the time. Nomic reports 62.7 on ViDoRe V2 for ColNomic Embed Multimodal 7B.

Notice the two scales. Scores in the 90s on V1 and in the 60s on V2 are not a regression. ViDoRe V1 saturated: top models passed 90 nDCG@5, so it stopped separating systems. ViDoRe V2 rebuilt the queries to be harder, as the evaluation section explains. Retrieval-augmented systems for documents have also moved beyond single-page lookup. M3DocRAG retrieves pages across many PDFs with ColPali and answers with a multi-image VLM. VDocRAG pretrains its retriever to compress page images into dense tokens. ViDoRAG uses several agents that search and reason iteratively.

Table 2 · Retrieval models along the survey checklist (what each paper reports)
ModelBackbone and sizeRepresentationPooling / scoringTraining data and negativesModalitiesLanguagesHeadline evaluation
CLIP (2021)Separate ViT/ResNet and text Transformer1 vectorPooled image feature and [EOS] text feature; cosine400M web pairs; in-batch negatives (batch 32,768)Image, short textEnglishZero-shot Flickr30K and COCO retrieval
SigLIP 2 (2025)Separate ViT and text towers, up to 1B scale1 vectorPairwise sigmoid lossWebLI; adds decoder and self-distillation lossesImage, textMultilingualZero-shot retrieval, dense features
E5-V (2024)LLaVA-NeXT-8B1 vectorLast token after "in one word" promptAbout 273K text-only NLI pairsImage, text, composedEnglishFlickr30K, COCO, composed image retrieval
VLM2Vec (2024)Phi-3.5-V; LLaVA-1.61 vectorLast token; instruction prefix662K pairs from 20 MMEB datasets; in-batch + hard negatives; GradCacheImage, text, composedEnglishMMEB: 62.9 average (LLaVA-1.6)
GME (2024)Qwen2-VL 2B and 7B1 vectorLast tokenAbout 8M pairs incl. 1.1M synthesized fused-modal; ANCE-style hard negativesText, image, page screenshots, fusedNot reported in detailUMRB (47 datasets), MTEB, ViDoRe
MM-Embed (2024)LLaVA-1.6-Mistral-7B, extending NV-Embed-v11 vectorBi-encoder; optional MLLM rerankerM-BEIR; modality-aware hard negatives; continued text trainingText, image, composedEnglishM-BEIR state of the art at release; MTEB retrieval
jina-embeddings-v4 (2025)Qwen2.5-VL-3B; 3.8B total1 vector (2,048, Matryoshka to 128) or 128-d per tokenPooled single vector or late interaction; three LoRA adaptersText pairs, image-text, visually rich documentsText, image, pagesMultilingual (up to 20 languages in Jina-VDR)ViDoRe, Jina-VDR, MTEB
Qwen3-VL-Embedding (2026)Qwen3-VL 2B and 8B1 vector, MatryoshkaStaged contrastive training, distilled from the rerankerNot fully reported in abstractText, image, document image, video30+ languagesMMEB-V2: 77.8 (8B)
ColPali (2024)PaliGemma-3B (SigLIP-So400m + Gemma-2B)1,030 vectors × 128-d per pageMaxSim late interaction118,695 query-page pairs; 37% synthetic queries by Claude 3 SonnetText query, page imageEnglish training; French eval setsViDoRe V1: 81.3 average nDCG@5
ColQwen2 (2024)Qwen2-VL-2BUp to 768 vectors × 128-dMaxSimAbout 127K query-page pairs (ColPali set)Text query, page imageEnglish trainingViDoRe leaderboards
DSE (2024)Phi-3-vision, 4B1 vectorEOS token1.3M Wikipedia screenshots; NQ triplets with hard negatives; SlideVQAText query, screenshotEnglish+17 top-1 over BM25 on Wiki-SS
VisRAG-Ret (2024)MiniCPM-V 2.0, 3.4B1 vectorPosition-weighted meanAbout 362K pairs (122K VQA + 239K GPT-4o synthetic)Text query, page imageEnglish77.91 MRR@10 in-domain
llama-nemoretriever-colembed (2025)Eagle2, 1B and 3B; bidirectional attentionMulti-vectorMaxSimTwo-stage training (details in paper)Text query, page imageViDoRe V2 includes multilingual setsViDoRe V1 91.0, V2 63.5 (3B)

How to read this table. Read down the "Representation" column first. It splits the field into single-vector models, which fit standard vector databases, and multi-vector models, which store hundreds of vectors per page. Then read "Training data and negatives". Almost every recent gain is attributed to data: synthetic queries, balanced modalities and harder negatives, not to architecture. Scores from different benchmarks are not comparable across rows.

What multi-vector indexes cost, and how to shrink them

Late interaction moved the cost from query time to storage. It is worth computing that cost before choosing it. The storage of a multi-vector index is a product of four numbers.

bytes = pages × vectors per page × dimensions × bytes per dimensionColPali: 1,030 × 128 × 2 bytes (16-bit floats) = 263,680 bytes, the 257.5 KB per page reported in the paper.

For one million pages that is about 264 GB. The same paper lists 8.6 KB per page for a BGE-M3 text index and 3 KB per page for BM25. A single 2,048-dimensional vector in 16-bit floats takes 4 KB. So a ColPali index is roughly 64 times larger than a single-vector index of the same corpus. At a hundred million pages, that is the difference between a few hundred gigabytes and tens of terabytes.

Each factor in the formula is a lever.

Figure 7Index storage calculator
Precision
Presets
Per page
Whole index
Versus one 2,048-d fp16 vector
Figure 7. Index size is pages × vectors × dimensions × bytes. The page grid shows how many vectors one page stores; pooling merges neighbouring patches. Quality retention depends on the corpus and is not modelled here; the text gives the measured numbers from ColPali and Light-ColPali.

Reranking with a VLM

A first-stage retriever must be cheap, so it compresses. A reranker can afford to look closely, because it sees only the short list. A VLM reranker is a cross-encoder: it reads the query and the full page image together and outputs a relevance score.

The simplest way to get a score from a generative VLM is to ask a yes-or-no question and read the probabilities. MonoQwen2-VL, a LoRA adapter on Qwen2-VL-2B, does this. It prompts the model with the query and the page and takes the softmax over the logits of the "True" and "False" tokens. The score is P("True"). This is the MonoT5 recipe from text reranking, moved to images. On ViDoRe, reranking the top 10 pages from DSE raised the mean nDCG@5 from 85.8 to 90.5, according to its model card.

Other rerankers follow the same pattern with different training. jina-reranker-m0 builds on Qwen2-VL-2B and scores text or page images against a query. Qwen3-VL-Reranker is the cross-encoder sibling of Qwen3-VL-Embedding, and the embedder is distilled from it. LamRA trains pointwise reranking, which scores one candidate at a time, and listwise reranking, which reads several candidates together and orders them. MM-Embed showed that an off-the-shelf VLM, simply prompted, can rerank its retriever's candidates zero-shot, with the largest gains on complex composed queries.

The cost of reranking is easy to estimate. Each reranked page is one VLM forward pass over roughly a thousand visual tokens plus the query. Reranking 50 pages processes about 50,000 tokens per query. That is far more than the first stage, which only encodes the query, but far less than reading every page. Figure 8 lets you move the cutoffs and see where the compute goes.

Figure 8Where the compute goes in a retrieve, rerank, read cascade

Figure 8. A cost model in tokens processed per query, assuming 1,000 visual tokens per page and a 30-token query. The first stage encodes only the query; corpus vectors were computed at indexing time. The bars are on a log scale. The model ignores the vector-search arithmetic, which is small next to VLM forward passes.

Feeding the evidence to the VLM

Retrieval ends with a short ranked list. The generator now has to answer from it. This step has its own design choices, and getting them wrong can waste a good retriever.

Images, text, or both

The retrieved pages can reach the generator as images, as extracted text, or as both. VisRAG compared these directly. With MiniCPM-V 2.6 as the generator, feeding page images instead of extracted text gave about a 40 percent relative gain end to end. With GPT-4o, the gain was about 20 percent. On InfographicsVQA, accuracy went from 25 to 51 percent. Even when the correct page was given, a VLM reading the page image beat a language model reading the OCR text of that page. ViDoRe V3, a 2026 benchmark with human-verified answers, also reports that visual or hybrid contexts improve answer quality.

VisRAG also tested how to pass several pages. Single-image VLMs can receive the pages glued side by side into one image. Alternatively, the model can answer from each page separately and keep the answer with the best retrieval-weighted confidence. Multi-image VLMs can receive all pages at once. The right choice depends on what the generator was trained to read.

How many pages to read

More retrieved pages raise the chance that the answer is included. They also add distractors. Visual Haystacks is a benchmark that hides one relevant image among many unrelated ones. It found that VLMs struggle with visual distractors and reason poorly across images. They are also biased by where the key image sits in the context. Its MIRAGE system adds a retrieval filter in front of the VLM and handles up to 10,000 images on one 40 GB GPU. The lesson is that long context does not replace retrieval. A model that can accept a thousand images does not necessarily use them well.

Knowledge-intensive visual questions

Not all visual RAG is about documents. A user photographs a plant, a building or a dish and asks a question whose answer is not visible: "When was this bridge built?" The image must be used as a query to find text knowledge. Benchmarks for this include OK-VQA, InfoSeek and Encyclopedic-VQA.

The early systems retrieved from a multimodal memory. MuRAG (2022) retrieved image-text pairs to answer open questions. RA-CM3 (2022) retrieved documents to help a model that generates both text and images. REVEAL (2022) built a knowledge memory from several sources and trained the retriever and generator together. Later systems add a VLM generator. Wiki-LLaVA retrieves hierarchically, first a Wikipedia article and then the passages inside it. EchoSight first searches by visual similarity to find candidate articles, then reranks their text sections against the question.

MRAG-Bench (2024) asks a sharper question: do VLMs actually use retrieved images? It has 1,353 human-annotated questions over 16,130 images in nine scenarios, such as unusual viewpoints and partially hidden objects, where a reference image helps more than text. All models gained more from images than from text. But the best model, GPT-4o, improved by only 5.82 percent when given the ground-truth images, while human participants improved by 33.16 percent.

Citations and grounding

An answer from retrieved evidence is only useful if a person can check it. The minimum is a page-level citation: the answer names the page it used. A stronger form is region-level grounding: the answer points to a box or mask on the page that supports each claim. Post 09, When Language Must Point, explains how VLMs produce boxes and masks. The author's own work in Building Grounded Document Intelligence shows why masks can serve as a precise highlighter on dense documents.

Region-level citations also allow an automatic check. Crop the cited region. Ask a verifier whether the crop supports the claim. Drop or flag claims that fail. ViDoRe V3 annotates bounding boxes for its answers to evaluate exactly this kind of grounding, and reports that models still struggle with fine-grained visual grounding.

Figure 9A visual RAG pipeline that cites its evidence

Figure 9. End-to-end visual RAG. Every claim in the answer is tied to a page and a region, and a verification pass checks the region against the claim. The unsupported claim at the end is the kind of error that page-level citations alone would hide. Post 08, Aligning Vision-Language Models, covers why VLMs produce such claims.

Video, long collections and agent memory

Video multiplies every number in this post. An hour of video at one frame per second is 3,600 frames. At a few hundred tokens per frame, that is around a million visual tokens before any audio. So video systems retrieve inside a video as well as across videos. Post 11, Seeing in Time, covers how VLMs read video. Here we look only at the search side.

The first decision is the unit of retrieval. It can be a frame, a fixed-length clip, a detected shot, or a segment of transcript. CLIP4Clip (2021) showed that CLIP image features, pooled over frames, make a strong text-to-video retriever. MMEB-V2 now includes video retrieval and moment retrieval, where the target is a time span inside one video.

Two recent systems show the two directions of video RAG. VideoRAG (Jeong and colleagues) retrieves whole videos from a corpus as knowledge for a question and feeds both their frames and their text to the generator. Video-RAG (Luo and colleagues) works inside one long video. It extracts auxiliary text with open tools, namely OCR on frames, speech recognition and object detection, retrieves the relevant pieces, and adds them to the VLM's input. It reports an average improvement of 8.0 percent on Video-MME across six open models, with about 2,000 extra text tokens.

Agents need the same machinery for their own history. A GUI agent or a robot sees thousands of screenshots or frames. It cannot keep all of them in context, so it writes them to a memory and retrieves from it later. VideoAgent (Fan and colleagues, 2024) builds a structured memory of a long video, with event descriptions over time and tracked objects, and queries it with tools. Memory Is More Than Context discusses agent memory in general. VLMs That Act covers the agents that would use it.

Training data, hard negatives and synthetic queries

Table 2 showed that most recent gains are attributed to data. This section explains why, starting from the loss.

Why negatives decide what is learned

Look again at the InfoNCE loss. Its gradient with respect to the query vector is a weighted sum. It pulls the query toward the positive, and pushes it away from each negative in proportion to that negative's softmax probability.

∂ℒ / ∂t = − (1/τ) [ v+ − ∑j pj vj ],   pj = softmaxj( ⟨t, vj⟩ / τ )The sum runs over all candidates in the batch, including the positive. Negatives that already score low get almost no weight.

So an easy negative, one the model already scores far below the positive, contributes almost nothing. Only negatives that score close to the positive produce learning signal. With random batches from a large corpus, most negatives are easy. The model stops improving long before it can separate two quarterly reports that differ only in the year.

This is the case for hard negatives: candidates that look relevant but are not. VSE++ (2017) showed that focusing an image-text loss on the hardest negative in the batch gave large gains. ANCE (2020) mined negatives for text retrieval from an index built with the model being trained, refreshing it as training went on. GME follows the same two-round recipe: train a model, use it to retrieve top candidates, keep the non-relevant ones as negatives, and train again. MM-Embed chooses negatives that punish the wrong modality. NegCLIP builds negatives by shuffling the words of the caption.

Where the queries come from

Retrieval training needs (query, relevant candidate) pairs. For photos, captions supply them for free. For document pages, nobody writes queries. The field borrowed a fix from text retrieval: generate them. Doc2query (2019) trained a model to predict queries for passages. InPars and Promptagator (2022) prompted large language models to write queries from a few examples.

Visual retrievers do the same with VLMs. ColPali's training set of 118,695 query-page pairs is 37 percent synthetic, with questions written by Claude 3 Sonnet from crawled PDF pages. VisRAG added about 239,000 GPT-4o queries over textbooks, papers and manuals. GME synthesized about 1.1 million fused-modal entries with Qwen2.5-72B-Instruct, at a cost of 600 A100 GPU-hours. mmE5 made synthetic data quality its central claim, with criteria for broad task coverage, cross-modal consistency and fidelity to real images.

Synthetic queries have a known failure. A model that writes a question while looking at the page tends to reuse the page's exact words. A retriever trained on such queries learns to match words, and a benchmark built from them rewards word matching. ViDoRe V2 responded with blind contextual queries: queries written without seeing the page, from a description of the document's context. That is closer to how users ask.

Batches, scale and distillation

Because in-batch negatives are free, larger batches help. VLM embedders are large, so memory limits the batch. VLM2Vec uses GradCache, which computes embeddings in small chunks and caches their gradients, to reach a batch of 1,024. B3 takes the other route and makes a modest batch harder by filling it with mutually confusable examples. A third route is distillation from a cross-encoder. Qwen3-VL-Embedding is trained in part to match the scores of Qwen3-VL-Reranker, which transfers some of the reranker's precision into a vector the index can store.

Benchmarks and what they miss

Multimodal retrieval benchmarks fall into three generations. Each one was built because the previous one stopped measuring what mattered. Post 07, Measuring What a VLM Can Do, discusses benchmark design for VLMs in general.

The first generation is caption retrieval. Flickr30K and COCO, with the test splits fixed by Karpathy and Fei-Fei, ask a model to match photos with their captions in both directions and report Recall@K. They are clean and cheap. Their captions are short and literal, and strong models now score close to the ceiling, so the benchmarks reward the skill CLIP already has.

The second generation is universal retrieval. M-BEIR (UniIR, 2023) combines 10 datasets from 4 domains into 8 tasks across modality combinations, with about 1.5 million queries and a pool of 5.6 million candidates. MMEB (2024) casts 36 datasets as ranking with instructions, and MMEB-V2 adds documents and video. UMRB (GME, 2024) has 47 datasets. MIEB (2025) covers image embeddings across many task types. These play the role that BEIR and MTEB play for text retrieval: many small datasets instead of one large one, so that a model cannot win by overfitting a single domain.

The third generation targets documents and RAG. ViDoRe V1 (2024) measured page retrieval with nDCG@5 across academic and practical sets in English and French, and saturated above 90 within a year. ViDoRe V2 (2025) used blind contextual queries, longer and cross-document queries, and multilingual data, and scores fell into the 60s. ViDoRe V3 (2026) evaluates the whole RAG pipeline: about 26,000 pages in 10 professional domains, 3,099 human-verified queries available in 6 languages, and about 12,000 hours of annotation that include bounding boxes for grounding. Jina-VDR extends ViDoRe with 30 more tasks. MRAG-Bench tests whether models use retrieved images. OHRBench tests how OCR errors propagate into RAG.

Table 3 · Retrieval and visual RAG benchmarks compared
BenchmarkWhat is retrievedQuery typeScaleMetricMeasuresMain blind spot
Flickr30K / COCOPhotos and captionsShort caption or photoThousands of test images (Karpathy splits)Recall@1/5/10Basic cross-modal alignmentNear ceiling; short literal captions
M-BEIRImages, text, image-text pairs8 tasks across modalities, with instructions10 datasets, 1.5M queries, 5.6M poolRecall@5 (Recall@10 for fashion)Universal retrieval, wrong-modality errorsFew document pages
MMEB / MMEB-V2Images, text; V2 adds pages and videoInstruction plus query36 datasets in V1Precision@1 over 1,000 candidatesBreadth of embedding tasksSmall candidate pools
ViDoRe V1Document pagesQuestions, partly synthetic10 sets, 100 to 1,600 queries eachnDCG@5Visually rich page retrievalSaturated above 90; lexical overlap
ViDoRe V2Document pagesBlind contextual, cross-document, multilingual4 datasetsnDCG@5Realistic page retrievalRetrieval only
ViDoRe V3Pages, answers, regionsHuman-verified, 6 languages10 domains, ~26K pages, 3,099 queriesRetrieval, answer and grounding metricsThe full RAG pipelineNewest; few published systems yet
MRAG-BenchReference images given to the generatorMultiple-choice visual questions1,353 questions, 16,130 imagesAccuracyWhether models use retrieved imagesGenerator-side only
OHRBenchOCR output of pagesQuestions over document elements8,561 pages, 8,498 QA pairsRetrieval and generation accuracyOCR error propagationOCR pipelines only

How to read this table. Read the "Main blind spot" column top to bottom. Each benchmark exists largely because of the blind spot of the row above it: caption retrieval saturated, universal retrieval ignored documents, page retrieval ignored the answer. When a paper reports only one of these, ask which blind spot it leaves open.

Design choices for a visual RAG system

We can now put the pieces together. A visual RAG system is a sequence of choices, each with a cost on one side and a failure mode on the other. Table 4 collects them.

Table 4 · Visual RAG design choices and their trade-offs
DecisionOptionsChoose the visual option whenCostFailure mode to test
Unit of indexingWhole page; region or chunk; video clip or frame; transcript segmentLayout carries meaning (slides, forms, charts)Smaller units mean more items and more vectorsAnswer split across units; citations too coarse
RepresentationOCR text; single page vector; multi-vector; hybridCharts, tables, scans, infographicsMulti-vector stores hundreds of vectors per pageSmall text missed at low resolution; dense prose favours text
Encoder resolutionFixed low resolution; tiled crops; native resolutionSmall print mattersEncoding time and index size grow with patchesRecall drops on fine print (DSE crop study)
First stageBM25; dense bi-encoder; MUVERA-style proxy for multi-vector; hybridQueries describe visual contentIndex build and memoryRecall@k too low for the reranker to recover
Mixed modalitiesOne shared index; separate indexes per modalitySame model trained with modality instructionsScore calibration across indexesModality bias: wrong-modality results win
RerankerNone; text cross-encoder; VLM cross-encoder; listwise VLMTop-k contains near-duplicatesk VLM forward passes per queryLatency; reranker overconfident on irrelevant pages
Generator inputPage images; extracted text; bothAnswers depend on visual structureVisual tokens per pageDistractor pages; position bias
Pages read (n)1 to 20Questions need several pagesLinear in nMore distractors, lower precision
CitationsNone; page-level; region-level with verificationUsers must check claimsGrounding model and a verifier passCorrect page, unsupported claim
Index updatesRe-embed on change; periodic rebuildCorpus changes oftenRe-encoding cost per pageModel or prompt version mismatch between index and queries

How to read this table. Each row is an independent choice, but the costs compound. Higher resolution, a multi-vector representation and a large reranking depth each multiply the bill. A sensible default is to buy precision where the evidence is: multi-vector or reranking for visually rich pages, and plain text retrieval for clean prose.

A starting recipe

  1. Build a test set first: a few hundred real queries with the pages that answer them, written by people who did not look at the pages while writing.
  2. Run two baselines: BM25 over OCR text, and a single-vector page embedder. Measure Recall@50 and nDCG@5. The gap between them tells you how visual your corpus is.
  3. If the visual baseline wins clearly, add multi-vector reranking (ColPali-style) or a VLM cross-encoder on the top 20 to 50. Check that the gain survives on your own queries.
  4. Compress only after you have a quality target. Pool or merge patch vectors, then quantize, and re-measure after each step.
  5. Feed page images (or images plus text) to the generator, start with 3 to 5 pages, and measure answer accuracy with gold pages as well as with retrieved pages.
  6. Ask for page and region citations, and verify a sample of them.

Key insights and nuances

The reader should now be able to look at a visual search problem and reason about it: which scoring design fits the corpus and query rate, what the index will cost, where a reranker pays off, and how to check the final answer. The next post, What Happens Inside a VLM, opens the model itself and asks which visual tokens it actually uses. That question matters here too: a retriever can find the right page, and the generator can still ignore it.

References

Grouped by topic. Every entry links to its primary source.

Contrastive image-text retrievers and their geometry

Universal multimodal embedders built on VLMs

Rerankers