Skip to content

Anupkp19/RAG-for-Document-Stores

Repository files navigation

🚀 RAG From Scratch

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.

📚 What You'll Learn

Query Construction

  • Text-to-SQL for relational databases
  • Text-to-Cypher for graph databases
  • Self-query retrievers for vector databases

Query Translation

  • Multi-Query Retrieval
  • RAG-Fusion
  • Query Decomposition
  • Step-Back Prompting
  • HyDE (Hypothetical Document Embeddings)

Routing Strategies

  • Logical Routing
  • Semantic Routing
  • Dynamic prompt and datasource selection

Indexing Techniques

  • Chunk Optimization & Semantic Splitting
  • Parent-Child Document Retrieval
  • Specialized Embeddings
  • Hierarchical Indexing (RAPTOR)

Advanced Retrieval

  • Re-ranking
  • RankGPT
  • RAG-Fusion
  • CRAG (Corrective RAG)
  • Active Retrieval

Generation & Self-Correction

  • Self-RAG
  • Retrieval-Augmented Reasoning (RAR)
  • Feedback-driven retrieval refinement

🤔 Why RAG?

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.

🎯 Repository Goal

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors