Welcome to Mini RAG ๐
Mini RAG is a lightweight, modular, and production-ready Retrieval-Augmented Generation (RAG) library built with Python. Install withuv add mini-rag and start building intelligent document search and question-answering systems in minutes.
Key Features
๐ค Agentic RAG
Intelligent query processing with automatic query rewriting and result re-ranking
๐ Multi-format Support
Load documents from PDF, DOCX, images, and more using MarkItDown
โ๏ธ Smart Chunking
Advanced text chunking with Chonkie for optimal context preservation
๐ฎ Flexible Embeddings
Support for OpenAI, Azure OpenAI, and any OpenAI-compatible API
๐พ Vector Storage
Powered by Milvus for high-performance similarity search
๐ฏ Query Optimization
Automatic query rewriting for better retrieval results
๐ Hybrid Search
Combine semantic (vector) and keyword (BM25) search
๐ Multiple Re-ranking
Choose from Cohere API, local cross-encoders, or LLM-based re-ranking
๐ Observability
Built-in Langfuse integration for tracing and monitoring
๐ง Modular Design
Use individual components or the complete RAG pipeline
Quick Start
Get started with Mini RAG in just 5 lines of code:Installation
Install Mini RAG and get set up in minutes
Quick Start Guide
Follow our step-by-step guide to build your first RAG application
API Reference
Explore the complete API documentation
Examples
Learn from practical examples and use cases
Why Mini RAG?
Simple & Pythonic API
Simple & Pythonic API
Mini RAG provides a clean, intuitive API that follows Python best practices. Get started with just a few lines of code.
Production Ready
Production Ready
Built with production use cases in mind, featuring error handling, retry logic, observability, and comprehensive configuration options.
Modular Architecture
Modular Architecture
Use individual components (loader, chunker, embeddings, vector store) or the complete RAG pipeline. Mix and match as needed.
Advanced Features
Advanced Features
Query rewriting, hybrid search, multiple re-ranking strategies, and observability built-inโfeatures that typically require custom implementation.
Flexible & Extensible
Flexible & Extensible
Support for multiple embedding providers, vector stores, and re-ranking methods. Easy to extend with custom implementations.
Architecture
Mini RAG follows a modular architecture that makes it easy to understand and customize:Community & Support
GitHub
Star us on GitHub and contribute
PyPI
View releases and version history
Issues
Report bugs or request features
Next Steps
1
Install Mini RAG
Follow the installation guide to set up Mini RAG
2
Complete Quick Start
Build your first RAG application with our quick start guide
3
Explore Features
Learn about advanced features like hybrid search and re-ranking
4
Check Examples
Browse practical examples for your use case
