A maintenance engineer asks the assistant for the torque spec on a pump flange. The answer is in a table inside a scanned PDF. The text extractor saw that table as a pile of numbers with no column headers, so the chunk containing it never ranked, and the bot replied that no specification exists. The spec existed. The pipeline just could not see it.
Multimodal RAG is retrieval-augmented generation where the corpus, the query, or the answer can include more than text: scanned pages, charts, diagrams, screenshots, photos. You make non-text content searchable, retrieve it next to text, and give a vision-capable model the evidence it needs. There are three distinct ways to do it, and picking the wrong one is the main reason prototypes disappoint.
Three ways to make an image searchable
1. Caption or parse first, then embed text
Run a vision-language model or OCR/layout parser over each image or page, turn the result into text (a caption, a transcribed table, a chart description), and index that text with your normal pipeline. It is the least exotic option: every tool you already own still works, including hybrid search and rerankers. The cost is that retrieval quality is capped by caption quality. A caption saying “bar chart of quarterly revenue” will not help a question about the Q3 EMEA bar.
2. Joint image-text embeddings
CLIP-style models learn a shared space where an image and a sentence describing it land near each other. The original CLIP paper trained on image-caption pairs from the web. With a model like this you can embed photos directly and search them with a text query, or search by example image. It shines for natural photos and product images. It is weaker for dense document pages, where the meaning lives in small text and layout rather than overall visual gist.
3. Page-image retrieval with late interaction
A newer family skips OCR entirely. ColPali feeds page screenshots through a vision-language model and produces many vectors per page, then scores queries with ColBERT-style late interaction. The paper also introduced a benchmark for visually rich document retrieval. The appeal is clear: tables, figures and layout get embedded as they appear. The tradeoffs are bigger indexes (multiple vectors per page) and a retrieval stack that not every vector store supports out of the box. Check your engine in our vector databases overview before committing.
Pick by document type, not by trend
| Corpus | Start with | Why |
|---|---|---|
| Clean digital PDFs with real text and simple tables | Parse to text, add table-to-markdown | Cheapest; text layer is already accurate. |
| Scans, forms, mixed-quality PDFs | Page-image retrieval or strong OCR plus layout parsing | Text extraction is the weak link. |
| Slide decks, infographics, dashboards | Page-image retrieval, with VLM summary as fallback | Meaning is spatial. |
| Product photos, diagrams, screenshots | Joint image-text embeddings plus captions | Visual similarity matters. |
| Mixed corpus | Two indexes (text and image) fused at query time | Different content wants different retrievers. |
The last row is how most real systems end up. Rather than pick one embedding to rule them all, keep a text index and an image or page index, query both, and fuse results with reciprocal rank fusion, the same trick used for sparse and dense search. If fusion is new to you, the explanation in our hybrid search guide transfers directly.
An ingestion pipeline that does not lose provenance
Multimodal ingestion fails quietly when you lose track of where an item came from. A chart extracted from page 14 and indexed as a free-floating blob will eventually be cited without context. Store, for every indexed unit:
- document ID, version and page number,
- a bounding box or region ID if you cropped a figure,
- the modality (text, table, figure, full-page),
- the extraction method and model version that produced any derived text,
- a link or path to the original asset for display.
The extraction method field matters more than it looks. When you upgrade your captioning model, you need to know which items to reprocess. Without the field, a re-index becomes a guess.
Chunking still applies. A figure and its caption belong together, and the paragraph that says “as shown in Figure 3” is a retrieval clue worth attaching. Our chunking strategies guide covers boundary choices for text; for visuals, treat figure plus caption plus referencing sentence as one unit.
Charts, tables and diagrams need special handling
Charts are the classic trap. A vision model can describe a chart’s style easily and its exact values poorly. If the underlying numbers matter, try to recover the data table at ingest time, either from the source file (many charts originate in spreadsheets) or via a chart-to-table extraction step you then verify on a sample. Store the table as text. Retrieval then finds it by value, and the image stays attached for display.
Tables benefit from two representations: a markdown or CSV version for exact lookups, and a short natural-language summary for semantic matching. Diagrams such as wiring or architecture drawings often need a labeled description of components and connections; generate it once, have a domain person review ten examples, and keep the prompt that worked.
Generation: show the model the image, or only the text?
Once you retrieve a page or figure, you have two choices. Pass the original image to a vision-capable model alongside the question, or pass the extracted text. Image input preserves layout and handles surprises, at higher token cost and latency. Text input is cheaper and easier to cache but only as good as extraction.
A practical pattern is tiered: send extracted text for most queries, and escalate to image input when the retrieved item is a figure, when text confidence is low, or when the user asks something visual (“what color is the warning light in the diagram?”). Treat the escalation rule as a configuration you can test, not a vibe. Prompt wording matters here too; instruct the model to say when the image is illegible rather than guess, a point developed in our prompt engineering guide.
Latency and cost, without fake numbers
Costs vary by provider and change often, so measure your own. The shape is predictable: vision captioning at ingest is a one-time cost per asset; page-image embeddings multiply storage; vision input at query time raises per-request tokens. Budget by running the whole pipeline on 100 representative pages and extrapolating. Log image count per request so a runaway query that attaches twelve pages shows up in a dashboard instead of an invoice.
How to test a multimodal pipeline
Build an evaluation set where the answer provably lives in a non-text element. Mix three kinds of questions: answer in body text (control), answer in a table, answer in a figure or scan. If your new pipeline improves the second and third without hurting the first, it earns its keep.
Measure retrieval and generation separately. For retrieval, check whether the right page or figure appears in the top results. For generation, check whether the answer matches the ground truth value, not just whether it sounds plausible. Our RAGAS guide covers metric basics; for multimodal specifics, expect to add manual review for a sample of answers, since automatic metrics lean on text overlap.
Failure modes worth designing for
- The confident misread. A VLM reads 8.5 as 85 from a blurry axis. Mitigate by retrieving original numbers from source data where possible and displaying the source image next to the answer.
- The orphan figure. The figure indexes fine, but its caption and units live in another chunk. Store them together.
- The oversized index. Multi-vector page embeddings balloon storage. Prototype on a subset and measure before indexing a million pages.
- The rotated scan. Pages scanned sideways or upside down quietly poison OCR. Add an orientation check at ingest.
- The privacy leak. Screenshots contain names and tokens that text redaction never saw. Run redaction on images too, or exclude sensitive sources.
- The mismatched query. Users type short text queries, while your index holds long visual pages. Rewriting the query into a more document-like description can narrow that gap.
A rollout plan for week one
- Sample 150 documents and tag where each answer lives: text, table, figure, scan.
- Write 30 questions spread across those types and record the current system’s score as a baseline.
- Add one multimodal technique, not three. Re-run the test set.
- Inspect ten failures by hand and classify them as retrieval misses, extraction errors, or generation errors.
- Decide whether to add a second index based on which class dominates.
Multimodal capability is also a design question about how many moving parts you want in production. If the orchestration logic is growing, the idea of an agent harness is a useful frame for keeping tool choice, retries and logging in one place, and the broader AI engineering overview shows where this fits in the discipline. Pair this reading with RAG versus fine-tuning versus agents if you are still deciding whether retrieval is the right layer. For library specifics, the LlamaIndex documentation has multimodal indexing examples that are kept current.
Frequently asked questions
What is multimodal RAG?
It is retrieval-augmented generation over content that includes images, scanned pages, charts or diagrams as well as text. Non-text items are made searchable, retrieved alongside text, and passed to a model that can use them to answer.
Do I need a multimodal embedding model?
Not always. If you convert images and pages to good text through captioning, OCR and table extraction, a standard text embedding model works. Joint image-text or page-image embeddings help when visual content cannot be captured well as text.
What is the difference between CLIP-style retrieval and ColPali-style retrieval?
CLIP-style models place an image and text in one shared vector space, which suits photos and general visuals. ColPali-style methods embed page screenshots with multiple vectors and late interaction, which suits visually rich documents such as reports and slides.
Should I send the image or the extracted text to the LLM?
Use extracted text when it is accurate because it is cheaper and faster. Send the image when layout matters, when extraction confidence is low, or when the question is explicitly visual. Many teams use text first and escalate to images.
How do I handle charts in a RAG system?
Try to recover the underlying data table at ingest time, store it as text so numbers are searchable, and keep the chart image attached for display. Relying on a model to read exact values from a picture is the common source of wrong answers.
How do I evaluate multimodal RAG?
Create a labeled set where answers live in body text, tables and figures. Score retrieval and answer correctness separately, compare against a text-only baseline, and review a sample of failures by hand because automatic metrics miss visual errors.
AI Generated Apps AI Code Learning Technology

One comment
Pingback: Open-Source Vector DB Projects Worth Tracking