Project Description: Legit-RAG
What is the project about?
Legit-RAG is a modular Retrieval-Augmented Generation (RAG) system. It's designed to answer questions by retrieving relevant information from a knowledge base and then generating a comprehensive answer.
What problem does it solve?
It addresses the limitations of large language models (LLMs) in providing accurate and up-to-date answers, especially for domain-specific or knowledge-intensive queries. By grounding the LLM's responses in retrieved, factual information, it reduces hallucinations and improves the reliability of answers. It also allows to build a question answering system on top of a custom knowledge base.
What are the features of the project?
- Modular Design: Built with independent, interchangeable components for each step of the RAG process.
- 5-Step RAG Workflow:
- Query Routing: Intelligently routes queries (ANSWER, CLARIFY, REJECT).
- Query Reformulation: Refines queries for better retrieval.
- Context Retrieval: Performs hybrid search (semantic + keyword).
- Completion Check: Evaluates if the context is sufficient.
- Answer Generation: Creates the final response with citations.
- Extensibility: Easily add new LLM providers, vector databases, document types, and search strategies.
- Hybrid Search: Combines semantic and keyword-based search for robust retrieval.
- Configurability: Customize LLM models, vector DB settings, completion thresholds, and more.
- API Endpoints: Provides REST API for adding documents and querying the system.
- Logging System: Event logging and visualization.
What are the technologies used in the project?
- FastAPI: Web framework for building the API.
- Qdrant: Vector database for storing and searching document embeddings.
- OpenAI: Large language models (LLMs) for various tasks (routing, reformulation, generation).
- Docker & Docker Compose: Containerization for easy deployment and environment management.
- Python 3.10+: Programming language.
What are the benefits of the project?
- Improved Accuracy: Provides more reliable and factual answers compared to standalone LLMs.
- Reduced Hallucinations: Grounding in retrieved context minimizes the risk of LLMs generating incorrect information.
- Customizability: Adaptable to different knowledge domains and use cases.
- Scalability: Modular design allows for scaling individual components as needed.
- Maintainability: Clear separation of concerns makes the system easier to understand and maintain.
- Extensibility: Easy integration of new technologies and features.
What are the use cases of the project?
- Question Answering Systems: Build chatbots or search interfaces that provide accurate answers from a specific knowledge base.
- Domain-Specific Search: Create search engines tailored to particular industries or fields.
- Content Generation: Assist in generating content by providing relevant context and information.
- Research Tools: Help researchers quickly find and synthesize information from large document collections.
- Customer Support: Automate responses to frequently asked questions using a company's internal documentation.
- Knowledge Management: Organize and access information within an organization more effectively.
