RAG Techniques
A comprehensive open-source collection of 42+ advanced Retrieval-Augmented Generation (RAG) tutorials and implementations using LangChain, LlamaIndex, and PydanticAI.
At a Glance
Fully free and open-source repository available on GitHub under a custom non-commercial license.
Engagement
Available On
Alternatives
Listed Apr 2026
About RAG Techniques
RAG Techniques is one of the most comprehensive open-source repositories for Retrieval-Augmented Generation (RAG) tutorials, covering 42+ techniques from foundational to advanced architectures. Maintained by Nir Diamant, the repository provides Jupyter notebook tutorials with runnable scripts for each technique, spanning query enhancement, context enrichment, advanced retrieval, evaluation, and agentic RAG. It leverages cutting-edge frameworks including LangChain, LlamaIndex, PydanticAI, and Contextual AI to help researchers and practitioners build production-ready RAG systems.
- Basic RAG & Foundational Techniques — Clone the repo and run the simple_rag.ipynb notebook to get started with basic retrieval pipelines using LangChain or LlamaIndex.
- Query Enhancement — Explore query transformations, HyDE (Hypothetical Document Embedding), and HyPE (Hypothetical Prompt Embeddings) to improve retrieval alignment.
- Context Enrichment — Apply semantic chunking, contextual chunk headers, contextual compression, and relevant segment extraction to improve context quality.
- Advanced Retrieval — Use fusion retrieval, intelligent reranking, hierarchical indices, dartboard retrieval, and multi-modal RAG with captioning or Colpali.
- Iterative & Adaptive Techniques — Implement retrieval with feedback loops and adaptive retrieval strategies that adjust dynamically to query types.
- RAG Evaluation — Evaluate systems end-to-end using DeepEval, GroUSE, Open-RAG-Eval, and RAGAS with metrics for faithfulness, relevance, and hallucination detection.
- Advanced Architectures — Build Graph RAG with LangChain or Milvus, Microsoft GraphRAG, RAPTOR, Self-RAG, Corrective RAG (CRAG), and Agentic RAG with Contextual AI.
- Memory-Augmented Retrieval — Implement MemoRAG with FAISS-based retrieval, surrogate query generation, and key-value pair extraction.
- Explainability — Use explainable retrieval techniques to provide transparency into why specific documents were retrieved.
- Community & Contributions — Join the RAG Techniques Discord community or Educational AI Subreddit and contribute via pull requests following the CONTRIBUTING.md guide.
Community Discussions
Be the first to start a conversation about RAG Techniques
Share your experience with RAG Techniques, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source repository available on GitHub under a custom non-commercial license.
- 42+ RAG technique Jupyter notebooks
- Runnable Python scripts
- LangChain and LlamaIndex implementations
- Community Discord access
- Google Colab support
Capabilities
Key Features
- 42+ RAG technique tutorials in Jupyter notebooks
- Foundational RAG implementations (Simple RAG, CSV RAG, Reliable RAG)
- Query enhancement techniques (HyDE, HyPE, query transformations)
- Context enrichment (semantic chunking, contextual compression, chunk headers)
- Advanced retrieval (fusion retrieval, reranking, hierarchical indices, dartboard)
- Multi-modal RAG with captioning and Colpali
- Graph RAG with LangChain, Milvus, and Microsoft GraphRAG
- RAPTOR recursive tree-organized retrieval
- Self-RAG and Corrective RAG (CRAG) architectures
- Agentic RAG with Contextual AI
- MemoRAG memory-augmented retrieval
- RAG evaluation with DeepEval, GroUSE, Open-RAG-Eval, and RAGAS
- Runnable Python scripts for each technique
- LangChain and LlamaIndex implementations
- PydanticAI integration for type-safe agent workflows
- Community-driven contributions via GitHub PRs
