A powerful Retrieval Augmented Generation (RAG) system designed to analyze and answer questions about data visualizations. The system combines computer vision and natural language processing to understand charts, graphs, and other data visualizations.
Also, great article on Colpali and Qdrant here for those that want to do a deep dive: Colpali x Qdrant
- 🔍 Smart Retrieval: Automatically finds relevant visualizations based on your questions
- 🧠 Intelligent Analysis: Provides detailed analysis of multiple visualizations simultaneously
- 📊 Multiple Dataset Support: Works with both pre-loaded datasets and custom visualizations
- 🔄 Real-time Updates: Automatic refresh of dataset explorer and real-time indexing
- 🎨 Modern UI: Clean and intuitive interface built with Gradio
- Clone the repository:
git clone https://github.com/yourusername/RAG_with_qdrant.git
cd RAG_with_qdrant- Install uv (if not already installed):
pip install uv- Install dependencies:
uv sync
Note: Using uv instead of regular pip provides faster installation times and better dependency resolution. The project's dependencies are configured in pyproject.toml and will be automatically installed with the correct versions.
- Start the application:
uv run python multimodal_rag/app.py- Open your browser and navigate to:
http://localhost:7860
- Pre-loaded dataset containing visualizations about global development trends
- Includes charts about life expectancy, GDP, healthcare access, and more
- Automatically downloaded on first run
- Upload your own data visualizations
- Supports PNG, JPG, and JPEG formats
- Real-time indexing and analysis
- Real-time preview of available visualizations
- Automatic refresh every 5 seconds
- File information including size and modification date
- Easy deletion of selected images
- Natural language questions about visualizations
- Multi-visualization analysis
- Configurable number of results (1-5 visualizations)
- Detailed analysis for each retrieved visualization
- Drag-and-drop file upload
- Multiple file upload support
- Automatic indexing of new files
- Real-time gallery updates
The system uses:
- Qdrant for vector similarity search
- Transformers for image and text processing
- Gradio for the web interface
- PyTorch for deep learning operations
- IDEFICS for multimodal understanding
- Python 3.11+
- CUDA-compatible GPU (optional, for faster processing)
- 8GB+ RAM recommended
- Storage space for datasets and indexes
multimodal_rag/
├── app.py # Main application file
├── models/
│ └── multimodal_rag.py # RAG system implementation
├── utils/
│ └── dataset_utils.py # Dataset management utilities
└── data/
├── ourworldindata/ # Pre-loaded dataset
└── custom/ # Custom uploads directory
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Our World in Data for the dataset
- Hugging Face for transformer models
- Qdrant team for the vector database
- Gradio team for the UI framework