The Complete Learning Path from Basic RAG to Production Multi-Agent Systems
Master Retrieval-Augmented Generation (RAG) with real-world implementations across all major frameworks: LangChain, AutoGen, CrewAI, LangGraph, and Amazon Bedrock.
This repository provides a complete learning path for RAG systems, from basic concepts to production-grade multi-agent architectures:
- Simple RAG: Keyword-based retrieval + LLM generation
- Vector RAG: Semantic search with ChromaDB/Pinecone
- Production RAG: Circuit breakers, caching, metrics
- Query Rewriting: Expansion, HyDE, multi-query
- Reranking: Cross-encoder, LLM-based, fusion (RRF)
- Chunking: Semantic, recursive, sliding window
- Knowledge Graphs: Entity extraction, graph reasoning
- Hybrid Search: BM25 + semantic fusion
- Multimodal RAG: Text + images + embeddings
- LangChain Agents: Research, analysis, planning agents
- AutoGen: Conversational agents with group chat
- CrewAI: Role-based agent crews with task delegation
- LangGraph: Graph-based workflows with state management
- Amazon Bedrock: AWS-native agent orchestration
- Ingestion: Batch & streaming document processors
- Evaluation: RAG metrics, benchmarks, A/B testing
- Monitoring: Observability, logging, tracing
- AWS: Lambda, SageMaker, Bedrock
- GCP: Vertex AI, Cloud Run
- Azure: OpenAI Service, Container Apps
Python 3.9+
pip or conda# Clone the repository
git clone https://github.com/KlementMultiverse/rag-mastery-hub.git
cd rag-mastery-hub
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys# Simple RAG (no external dependencies)
python 01_basic_rag/level_1_simple/simple_rag.py
# Vector RAG with ChromaDB
python 01_basic_rag/level_2_vector_db/vector_rag.py
# Production RAG
python 01_basic_rag/level_3_production/production_rag.pyrag-mastery-hub/
βββ 01_basic_rag/ # Basic RAG implementations
β βββ level_1_simple/ # Keyword-based RAG
β βββ level_2_vector_db/ # Vector database RAG
β βββ level_3_production/ # Production-ready RAG
βββ 02_advanced_rag/ # Advanced techniques
β βββ query_rewriting/ # Query expansion & HyDE
β βββ reranking/ # Multiple reranking strategies
β βββ chunking_strategies/ # Semantic chunking
β βββ knowledge_graphs/ # Graph-based RAG
β βββ hybrid_search/ # BM25 + semantic
β βββ multimodal/ # Text + image RAG
βββ 03_multi_agent/ # Multi-agent systems
β βββ langchain/ # LangChain agents
β βββ autogen/ # AutoGen agents
β βββ crewai/ # CrewAI agents
β βββ langgraph/ # LangGraph workflows
β βββ amazon_bedrock/ # AWS Bedrock agents
βββ 04_production_pipelines/ # Production systems
β βββ ingestion/ # Document processing
β βββ evaluation/ # RAG evaluation
β βββ monitoring/ # Observability
βββ 05_cloud_deployments/ # Cloud platforms
β βββ aws/ # AWS deployment
β βββ gcp/ # GCP deployment
β βββ azure/ # Azure deployment
βββ 06_use_cases/ # Real-world examples
β βββ customer_support/ # Support chatbot
β βββ research_assistant/ # Research bot
β βββ code_assistant/ # Code helper
β βββ legal_assistant/ # Legal document analyzer
βββ shared/ # Shared utilities
βββ config.py # Configuration management
βββ clients/ # API clients (Grok, embeddings)
βββ prompts/ # Prompt templates
Create a .env file with your API keys:
# Primary LLM (Grok)
GROK_API_KEY=your_grok_api_key
GROK_BASE_URL=https://api.x.ai/v1
# Vector Databases
PINECONE_API_KEY=your_pinecone_key
CHROMA_PATH=./chroma_db
# Embeddings
OPENAI_API_KEY=your_openai_key
COHERE_API_KEY=your_cohere_key
# Cloud Providers
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secretβ
Error Handling: Comprehensive exception management
β
Type Hints: 100% type hint coverage
β
SOLID Principles: Clean, maintainable architecture
β
Logging: Structured logging throughout
β
Testing: Unit and integration tests
β
Documentation: Detailed docstrings & examples
π§ LangChain: Agent workflows, chains, tools
π§ AutoGen: Multi-agent conversations
π§ CrewAI: Role-based agent coordination
π§ LangGraph: Graph-based state management
π§ Bedrock: AWS-native agents
βοΈ AWS: Lambda, SageMaker, Bedrock
βοΈ GCP: Vertex AI, Cloud Run
βοΈ Azure: OpenAI Service, Container Apps
- Architecture Guide - System design and patterns
- Setup Instructions - Detailed setup guide
- Tutorials - Step-by-step tutorials
- API Reference - Complete API documentation
- Start with
01_basic_rag/level_1_simple - Progress to
level_2_vector_db - Review
level_3_production
- Explore
02_advanced_rag/techniques - Try multi-agent examples in
03_multi_agent/ - Study production pipelines
- Deploy to cloud (
05_cloud_deployments/) - Build custom use cases (
06_use_cases/) - Contribute improvements
| Component | Technologies |
|---|---|
| LLMs | Grok (xAI), OpenAI, Claude |
| Embeddings | OpenAI, Cohere, HuggingFace |
| Vector DBs | Pinecone, ChromaDB, Weaviate, Qdrant |
| Frameworks | LangChain, AutoGen, CrewAI, LangGraph |
| Cloud | AWS, GCP, Azure |
| Monitoring | LangSmith, OpenTelemetry |
Answers customer queries using company knowledge base
Finds and summarizes academic papers
Helps with code generation and debugging
Analyzes legal documents and contracts
Contributions welcome! Please see CONTRIBUTING.md
MIT License - see LICENSE for details
If this repository helps you learn RAG systems, please β star it!
Klement Gunndu
- GitHub: @KlementMultiverse
- Portfolio: klementmultiverse.github.io
- Add more cloud deployment examples
- Add video tutorials
- Add Jupyter notebooks
- Add performance benchmarks
- Add more use cases
Built with β€οΈ for the AI community