RRAG - Enterprise Rust RAG Framework
RRAG (Rust RAG) is a high-performance, enterprise-ready framework for building Retrieval-Augmented Generation applications in Rust. Built from the ground up with safety, performance, and developer experience in mind.
π― Why RRAG?
- π Native Performance: Zero-cost abstractions with compile-time optimizations
- π‘οΈ Memory Safety: Rust's ownership system prevents data races and memory leaks
- β‘ Async First: Built on Tokio for maximum concurrency
- π― Type Safety: Compile-time guarantees eliminate runtime errors
- π Modular Design: Pluggable architecture with swappable components
- π Production Ready: Built-in observability, security, and monitoring
ποΈ Architecture Overview
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Documents βββββΆβ Processing βββββΆβ Vector Store β
β (Input) β β Pipeline β β (Storage) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Responses ββββββ Agent ββββββ Retriever β
β (Output) β β (rsllm) β β (Search) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β‘ Quick Start
Add RRAG to your Cargo.toml:
[]
= { = "0.1", = ["rsllm-client"] }
= { = "1.0", = ["full"] }
Basic RAG Application
use *;
async
π Core Features
π Advanced Retrieval
- Hybrid Search: Combines semantic and keyword search with multiple fusion strategies
- Graph-Based Retrieval: Knowledge graph construction with entity extraction
- Multi-Modal Support: Process text, images, tables, charts, and documents
- Smart Reranking: Cross-encoder models for precise result ranking
π§ Intelligent Agents
- Tool Integration: Built-in calculator, HTTP client, and custom tool support
- Memory Management: Conversation buffers, token limits, and summarization
- Streaming Responses: Real-time token streaming with async iterators
β‘ Performance & Scalability
- Intelligent Caching: Multi-level caching with semantic similarity
- Incremental Indexing: Efficient document updates without full rebuilds
- Batch Processing: High-throughput document ingestion
π Production Features
- Observability Dashboard: Real-time monitoring with web UI and metrics
- Security & Rate Limiting: Authentication, authorization, and abuse prevention
- Health Checks: Component monitoring and dependency tracking
π Documentation
Visit docs.rs/rrag for complete API documentation and examples.
π§ Feature Flags
[]
= "0.1"
= [
"rsllm-client", # rsllm integration
"http", # HTTP tools and clients
"concurrent", # Concurrent data structures
"multimodal", # Multi-modal processing
"observability", # Monitoring and metrics
"security", # Authentication and rate limiting
]
π License
This project is licensed under the MIT License.
π€ Contributing
Contributions welcome! Please see our contributing guidelines for details.