llava via Ollama or gpt-4o via OpenAI) to “see” diagrams, charts, and photos inside your documents and index their descriptions.
You need a VLM-capable model (e.g.,
llava via Ollama or gpt-4o via
OpenAI) for this to work effectively.Implementation
1
Import the VLM processor
VlmPDFProcessor replaces the default PDF processor with one that uses a
VLM to caption images.2
Configure the pipeline
Pass
custom_processors to the Builder’s with_vector_store call to
override the default PDF handling.3
Ingest and query
Documents are indexed with visual context. You can now ask questions about
charts or diagrams.
multimodal_rag.py