A comprehensive guide to building modern Retrieval-Augmented Generation (RAG) systems from the ground up. This repository covers the complete RAG lifecycle—from document ingestion and indexing to advanced retrieval, reranking, and answer generation.
- Text-to-SQL for relational databases
- Text-to-Cypher for graph databases
- Self-query retrievers for vector databases
- Multi-Query Retrieval
- RAG-Fusion
- Query Decomposition
- Step-Back Prompting
- HyDE (Hypothetical Document Embeddings)
- Logical Routing
- Semantic Routing
- Dynamic prompt and datasource selection
- Chunk Optimization & Semantic Splitting
- Parent-Child Document Retrieval
- Specialized Embeddings
- Hierarchical Indexing (RAPTOR)
- Re-ranking
- RankGPT
- RAG-Fusion
- CRAG (Corrective RAG)
- Active Retrieval
- Self-RAG
- Retrieval-Augmented Reasoning (RAR)
- Feedback-driven retrieval refinement
Large Language Models (LLMs) are trained on a fixed corpus of data, limiting their ability to access private, domain-specific, or real-time information. RAG overcomes this limitation by retrieving relevant knowledge from external sources and grounding responses with contextual information, resulting in more accurate and reliable outputs without expensive fine-tuning.
This repository serves as a practical roadmap for engineers, researchers, and AI enthusiasts looking to understand, implement, and optimize state-of-the-art RAG architectures using:
- Vector Databases
- Graph Databases
- Relational Databases
- Advanced Retrieval Techniques
Whether you're building AI assistants, enterprise search solutions, or knowledge-based applications, this repository will help you master the complete RAG ecosystem.
Build smarter AI systems by mastering indexing, retrieval, and generation.