Visual RAG: when document images speak in responses
Citai Team
March 29, 2026 · 12 min read
The problem: incomplete responses without visual context
Traditional RAG systems extract only text from documents. But technical manuals, product guides, and catalogs contain diagrams, screenshots, and visual tables that are essential for correct answers.
Concrete example: a software manual has screenshots of configuration screens. When a user asks "how to configure a cash register?", the textual answer is useful but seeing the actual screen is much clearer.
The solution: Visual RAG
Visual RAG extends the classic RAG pipeline with automatic image extraction:
1. Upload PDF/DOCX → 2. Extract text + images → 3. Filter (dedup, min size) → 4. Associate images to chunks by page → 5. Display in responses
Smart extraction
Not all images in a document are useful. The extractor applies automatic filters:
- Minimum size: Images smaller than 50x50px are ignored (icons, spacers)
- Solid color: White backgrounds or separators are discarded
- Deduplication: MD5 hash prevents repeated logos on each page
- Configurable limit: Maximum 50 images per document (adjustable)
Proximity association
Each image is associated with text chunks on the same page (PDF) or position (DOCX). This means when RAG retrieves a relevant chunk, images from that section automatically accompany the response.
The Image Manager allows manual adjustment: reassign images to other chunks, upload additional images, or remove irrelevant ones.
Display in chat and widget
Images appear inline in the response, below the LLM text:
- 1 image: Direct display with lightbox on click
- 2+ images: Carousel with navigation (arrows, dots, counter)
- Embeddable widget: Same behavior inside Shadow DOM
Zero latency impact
Background, one-time
+0ms (only URLs in JSON)
$0 (no vision AI)
All heavy lifting happens in background during document processing. At runtime, only image URLs are passed — zero impact on response time.
Conclusion
Visual RAG transforms technical documents from "walls of text" into rich visual responses. Users see exactly the screen, diagram, or table they need, alongside the textual explanation.
Try Citai for free
Create your intelligent knowledge base in minutes. No credit card required.
Create free accountRelated articles
What is RAG? Retrieval-Augmented Generation Explained
Discover how RAG combines intelligent search with generative AI to deliver accurate answers with verifiable sources.
Read article → Practical GuideHow to Prepare Your Documents for AI: Complete Optimization Guide
Learn best practices for preparing PDFs, DOCX, Excel, TXT, and Markdown before uploading to Citai. Maximize answer quality with well-structured documents.
Read article → TechnologyEmbeddings and Semantic Search: How Context-Aware AI Works
Understand how embeddings transform text into vectors to find information by meaning, not exact words.
Read article →