ToolsPromptsSkillsWorkflowsBlogAbout

Multi-Modal RAG — retrieve and ground across text, images, and tables

Index documents with embedded images, charts, and tables using vision-language models so answers cite visual evidence, not just text.

RAG4.5
Multi-Modal RAG — retrieve and ground across text, images, and tables preview

Prompt template

Answer the question using the provided text passages and image descriptions. Cite which passage or image supports each claim. If evidence is only in an image, describe what the image shows.

Text passages: {text_context}

Image evidence: {image_context}

Question: {question}

Answer:

How to use

  1. 1Parse source documents to separate text blocks, images, and tables into distinct chunks
  2. 2Generate text descriptions for images using a vision-language model (e.g. Qwen-VL, GPT-4V)
  3. 3Embed text chunks with a text encoder and image chunks with a vision encoder (CLIP or ColPali)
  4. 4Store both modalities in a vector database with metadata indicating chunk type and source page
  5. 5At query time, retrieve top-k from both text and image indexes and merge by relevance
  6. 6Pass merged context (text + image descriptions) to a multi-modal LLM for grounded answers

Pro tips

  • ColPali enables late-interaction retrieval directly on document page images without OCR
  • For tables, extract as structured HTML/Markdown and embed separately for better query matching
  • Always store the original image alongside its text description so the LLM can re-examine it
  • Use page-level metadata to keep text and images from the same page co-located in context

Works best with

llamaindexlangchaincolpaliqwen-vl

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills