Designing, Evaluating, and Training Multimodal RAG

A good multimodal RAG system is not simply “a VLM plus a vector database.”

Intuition

Why the pieces do not add up on their own

The previous five lessons each gave you a working component: text search, image search, document retrieval, late interaction. It is reasonable to assume that assembling them produces a working system.

It usually does not, and the reason is worth understanding before any of the design advice below makes sense.

Each component is individually correct and individually blind. The text retriever returns good passages without knowing whether the answer was actually in a chart. The VLM writes a confident answer without knowing whether the page it was handed was the right one. Nothing in the pipeline is responsible for the thing you actually care about: was this answer true, and did the evidence support it?

So the job of this lesson is the part no single component does — deciding what to retrieve, how to combine it, and how to find out when the whole thing is quietly wrong.

The five decisions

Decision The question it answers
What to retrieve Does the answer live in text, an image, a page, or a video frame?
How to combine When two retrievers disagree, which evidence wins?
How to reason Should the model answer in one step, or search, check, and then answer?
How to train Do the retriever and generator learn separately or together?
How to detect failure When the answer is wrong, which component caused it?

The last one is the one teams skip, and it is the one that determines whether you can improve the system at all. A pipeline you cannot diagnose is a pipeline you can only rebuild.

What can be retrieved?

Retrieval family Typical evidence
Text-centric Passages, captions, OCR text
Vision-centric Photos, diagrams, reference images
Video-centric Frames, clips, events over time
Document and layout Complete pages containing text, tables, charts, and layout

Choose based on the evidence—not because one model is fashionable.

Where it is used

These examples have different safety needs. A wrong stock-photo result is inconvenient; an unsupported medical or driving answer can be dangerous and needs stronger validation and human control.

Three ways to combine evidence

Score fusion

Search different indexes and combine their normalized scores.

combined_score
  = alpha × text_score
  + (1 - alpha) × image_score

This keeps specialist retrievers and makes their influence visible.

Attention-based fusion

The generator uses attention to focus on useful parts of retrieved text, images, or tables for the current question.

Unified representation

Project several modalities into one shared space before generation. Some systems also turn images into captions, or preserve both images and captions.

flowchart TB Q[Question] --> T[Text retriever] Q --> I[Image retriever] Q --> P[Page retriever] T --> F[Fuse scores or evidence] I --> F P --> F F --> G[VLM generator] G --> A[Answer with sources]

Reasoning over retrieved evidence

Useful patterns include:

A citation at the end of a paragraph is weak. A link from each important claim to the exact supporting chart, table, or page region is easier to inspect.

How systems are trained

Alignment

Contrastive learning pulls a query toward its correct evidence and pushes wrong evidence away. Hard negatives teach fine distinctions.

Generation

For text answers, the generator usually learns by predicting the next correct token.

Robustness

Training can deliberately include irrelevant retrieved pages. The model learns that top-k content is not automatically trustworthy.

Retriever and generator together

The correct supporting page is not always labelled. It can be a hidden choice:

flowchart LR R1[Current retriever
scores pages] --> E[Likely evidence] E --> G[Train generator
to answer] G --> FB[Answer feedback] FB --> R2[Improve what
retriever prioritises] R2 --> R1

This resembles an alternating process:

  1. Use the current system to choose likely evidence.
  2. Update the model to make the right answer more likely with that evidence.
  3. Repeat.

In practice, many teams use a simpler staged approach: train the retriever and generator separately, then tune them together for the task if the benefit justifies the cost.

Evaluate two systems, not one

Split diagnosis into:

Retrieval quality

Useful metrics: Recall@K and nDCG@K.

Answer quality

Choose the simplest fitting strategy

Data and question Good starting point Why
Mostly plain text Text or hybrid RAG Visual complexity adds little
Products or photos CLIP-style image search Shared image-text space fits
Reports, forms, charts Multimodal document RAG Layout may carry the answer
High-stakes numeric/legal QA Retrieval + exact citations + validation Claims must be verified

Practical safety checklist

  1. Keep document and page identity in the index.
  2. Test retrieval and generation separately.
  3. Include difficult negatives, negation, and exact numbers.
  4. Require evidence-linked answers.
  5. Permit “not found” instead of forcing a guess.
  6. Validate important calculations with code.
  7. Send uncertain high-risk answers to a person.
  8. Test messy, multilingual, multi-page, and out-of-domain documents.

Mini design lab

Scenario:

Build QA over annual reports containing paragraphs, tables, and charts.

A reasonable design:

  1. Use hybrid text search for exact company names and values.
  2. Use page-image retrieval to preserve charts and layout.
  3. Merge or rerank candidates.
  4. Send the top pages and question to a VLM.
  5. Require page and region citations.
  6. Extract numeric values, validate units, and calculate with code.
  7. Abstain or route to review if evidence conflicts.

This design keeps both exact text and visual evidence instead of forcing one representation to do every job.

What goes wrong

Final recap

One-line summary

Design multimodal RAG around the evidence and failure risk, then measure retrieval and grounded generation as separate parts of one pipeline.

Key terms