rag-for-multimodal-content
Skill8 starsChanged 7 months agoMITView on GitHub
Index and retrieve text, images, tables, and other modalities with shared document context.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rag-skillsSkill
- choosing-a-chunking-frameworkSkill
- contextual-chunk-headersSkill
- hierarchical-chunkingSkill
- semantic-chunkingSkill
- chunkingSkill
- sliding-window-chunkingSkill
- rag-for-code-documentationSkill
- data-type-handlingSkill
- index-versioning-and-reindexingSkill
- production-rag-deploymentSkill
- deploymentSkill
- generation-evaluation-metricsSkill
- rag-evaluation-frameworksSkill
- retrieval-evaluation-metricsSkill
- evaluation-metricsSkill
- optimize-retrieval-latencySkill
- performance-optimizationSkill
- agentic-rag-routingSkill
- multi-agent-rag-orchestrationSkill
- rag-agentsSkill
- adaptive-retrievalSkill
- context-enrichment-windowSkill
- crag-corrective-ragSkill
- explainable-retrievalSkill
- graph-ragSkill
- hybrid-search-bm25-denseSkill
- hyde-hypothetical-document-embeddingsSkill
- hype-hypothetical-prompt-embeddingsSkill
- multi-pass-retrieval-with-rerankingSkill
- query-transformation-strategiesSkill
- raptor-hierarchical-retrievalSkill
- self-ragSkill
- retrieval-strategiesSkill
- choosing-vector-db-by-datatypeSkill
- qdrant-for-production-ragSkill
- qdrant-setup-ragSkill
- vector-databasesSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
Search across text and images with mixed queries.
- Distinctive: line 66
When queries involve visual concepts
- Distinctive: line 70
When storage/bandwidth costs are critical
- Distinctive: line 72
When GPU resources are limited (multimodal models require more compute)
- Distinctive: line 81
Text-Only Baseline: Not significantly worse on text-only queries
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Multimodal RAG extends retrieval to include images, videos, audio, and mixed media content alongside text. This skill covers handling multiple modalities, using multimodal embedding models (like CLIP), and implementing cross-modal retrieval where text queries can find image content and vice versa.
Problem Statement
Standard RAG systems are text-only and miss valuable information in other media:
- Images, diagrams, and charts contain information not captured in text
- Videos have visual context alongside transcripts
- Cross-modal queries (e.g., "show me the architecture diagram") require understanding both modalities
- Different modalities need different embedding models and processing pipelines
- Storage and retrieval become more complex with multiple vector types
Key Concepts
- Multimodal Embeddings: Models that map different modalities to shared embedding space (CLIP, ALIGN)
- Named Vectors: Storing multiple embedding vectors per document in vector databases
- Cross-Modal Retrieval: Text-to-image, image-to-text, and combined retrieval
- Modality-Specific Processing: Different preprocessing for images, audio, video
- Unified Index: Single index structure handling multiple modalities
Implementation Guide
Step 1: Choose Multimodal Embedding Model
Select a model that supports your required modalities.
Why: CLIP and similar models create a shared embedding space where text and images can be compared directly.
Step 2: Process Multimodal Documents
Parse documents containing mixed media content.
Why: Proper parsing separates different modalities while preserving their relationships within the document.
Step 3: Store Multimodal Chunks
Store with named vectors for different modalities.
Why: Named vectors allow the same document to have multiple embeddings for different modalities and search strategies.
Step 4: Implement Cross-Modal Search
Search across text and images with mixed queries.
Why: Cross-modal search enables natural queries like "show me the architecture diagram" to retrieve relevant images.
Step 5: Handle Video and Audio
Extend support to video and audio modalities.
Why: Video and audio add complexity but enable rich multimedia RAG applications.
Useful implementations include OpenAI CLIP, MM-Embed paper, LlamaIndex multimodal docs, and Sentence Transformers docs.
When to Use This Skill
- Building documentation with diagrams and charts
- Creating visual search applications
- Handling scientific papers with figures
- Building e-commerce with product images
- When queries involve visual concepts
When NOT to Use This Skill
- For text-only content (use standard RAG)
- When storage/bandwidth costs are critical
- For applications where visual information isn't needed
- When GPU resources are limited (multimodal models require more compute)
Related Skills
- Qdrant Setup for RAG - Named vectors setup
- Choosing Vector DB by Datatype - Database selection
- Semantic Chunking - For text chunks
Metrics & Success Criteria
- Cross-Modal Accuracy: Text-to-image and image-to-text retrieval mAP > 0.6
- Text-Only Baseline: Not significantly worse on text-only queries
- Storage Overhead: < 2x text-only storage for typical mixed content
- Query Latency: < 500ms for cross-modal queries
- Relevance: Relevant visual content retrieved > 80% of time for image queries
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

