Modular RAG system for production use
Top 97.5% on sourcepulse
Legit-RAG is a production-ready, modular Retrieval-Augmented Generation (RAG) pipeline designed for developers and researchers building AI-powered question-answering systems. It offers a structured, extensible framework for implementing a 5-step RAG workflow, leveraging FastAPI, Qdrant, and OpenAI for efficient and intelligent information retrieval and response generation.
How It Works
The system orchestrates a five-stage RAG process: Query Routing intelligently determines if a query can be answered, needs clarification, or should be rejected using an LLM. Query Reformulation refines the input for better retrieval, often extracting keywords for hybrid search. Context Retrieval performs a hybrid search, combining semantic (vector) and keyword-based methods, currently utilizing Qdrant for vector storage. A Completion Check evaluates the sufficiency of retrieved context against a configurable threshold, returning a confidence score. Finally, Answer Generation produces a response using the retrieved context, including citations and confidence scoring. This modular design, based on abstract base classes, facilitates easy extension for different LLM providers, vector databases, and search strategies.
Quick Start & Requirements
pip install -r requirements.txt
.env
with OpenAI API key.docker-compose up -d
(API at http://localhost:8000
, Qdrant at http://localhost:6333
).http://localhost:8000/docs
.Highlighted Details
Maintenance & Community
The repository is maintained by Emissary-Tech. Further community or roadmap information is not detailed in the README.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The system currently relies exclusively on OpenAI for LLM interactions and Qdrant for vector storage, although extensibility is planned. Streaming responses and additional vector database implementations are listed as future enhancements, indicating they are not yet available.
5 months ago
Inactive