RAG_Techniques README

The project's README from github.com/NirDiamant/RAG_Techniques. As one markdown file: README.md.

Advanced RAG Techniques 🚀

Elevating Your Retrieval-Augmented Generation Systems

A community-driven hub of 42+ runnable notebooks covering RAG techniques from foundational to cutting-edge - the intuition, the code, and the references to build more accurate, context-rich retrieval systems.


PRs Welcome LinkedIn Twitter Reddit Discord Sponsor

🎓 From RAG prototypes to production

Prompt to Production - my full course on building software with AI the way professionals do: the methods and paradigms behind reliable, efficient, modular production systems, taught systematically. 20 modules, each pairing a video lecture with a hands-on lab, from your first structured prompt to a working production system.

The course is live. Every module is out, lecture and lab.

🎁 Try a full module, free

🎬
7-minute
video lecture
🛠️
Hands-on
tutorial
🤖
AI assistant
inside Claude Code

One npm install adds the module's AI assistant to your Claude Code, and it guides you through the tutorial as you build.

Claim your free module

👉 Get the full course

Sponsors ❤️

We gratefully acknowledge the organizations and individuals who have made significant contributions to this project.

Company Sponsors

Contextual AI Contextual AI CodeRabbit CodeRabbit Qodo

Individual Sponsors

📫 Stay Updated!

🚀
Cutting-edge
Updates
💡
Expert
Insights
🎯
Top 0.1%
Content

Subscribe to DiamantAI Newsletter

Join over 50,000 AI enthusiasts getting unique cutting-edge insights and free tutorials! Plus, subscribers get exclusive early access and special 33% discounts to my book and the upcoming RAG Techniques course!

DiamantAI's newsletter

🎬 Prefer video?

I break these ideas down into short, one-idea-per-episode explainers on YouTube.


🆕 AI Is Rewarded for Guessing [Hallucination]

why a model guesses instead of saying I don't know, watched on its own token probabilities, and where retrieval moves the fact out of the guess


RAG Explained: Why AI Gets Your Own Documents Wrong

why chunks overlap, what "meaning space" is, and where simple RAG breaks down

How Do You Search a Spreadsheet by Meaning?

turn each row into one labelled line and search the table by meaning

How Do You Know Your RAG Answer Isn't Made Up?

three checkpoints that catch a bad chunk on the way in and an unsupported claim on the way out

Why Does RAG Return a Paragraph When You Asked for One Fact?

why a paragraph's embedding is a blend that points at nothing in particular

Subscribe on YouTube   Browse every episode →

Introduction

Retrieval-Augmented Generation (RAG) is revolutionizing the way we combine information retrieval with generative AI. This repository showcases a curated collection of advanced techniques designed to supercharge your RAG systems, enabling them to deliver more accurate, contextually relevant, and comprehensive responses.

Our goal is to provide a valuable resource for researchers and practitioners looking to push the boundaries of what's possible with RAG. By fostering a collaborative environment, we aim to accelerate innovation in this exciting field.

📖 Go deeper: the book

RAG Made Simple

RAG Made Simple - the 400-page visual companion to this repo. Amazon Bestseller in Generative AI · 1,500+ readers · ⭐ 4.6

Get it on Amazon (paperback · Kindle · free on Kindle Unlimited) → · Read Chapter 1 free

🚀 Agents Towards Production - code-first tutorials for shipping production-grade GenAI agents, prototype to scale.

🤖 GenAI Agents - a broad collection of AI agent implementations and tutorials.

🖋️ Prompt Engineering Techniques - prompting strategies from basics to advanced.

🧠 Agent Memory Techniques - 30 notebooks on agent memory: vector stores, knowledge graphs, Mem0, MemGPT, Zep, Graphiti.

Join the community

Contributions make this better - propose ideas, share techniques, or give feedback via CONTRIBUTING.md.

r/EducationalAI · Discord · LinkedIn

Key Features

Advanced Techniques

Explore our extensive list of cutting-edge RAG techniques:

Recently added: MemoRAG (memory-augmented retrieval), End-to-End RAG Evaluation, Open-RAG-Eval, JSON RAG. 42 notebooks and growing.

# Category Technique View
1 Foundational 🌱 Basic RAG
2 Foundational 🌱 RAG with CSV Files
3 Foundational 🌱 Reliable RAG
4 Foundational 🌱 Optimizing Chunk Sizes
5 Foundational 🌱 Proposition Chunking
6 Query Enhancement 🔍 Query Transformations
7 Query Enhancement 🔍 HyDE (Hypothetical Document Embedding) [](https://europe-west1-rag-techniques-views-tracker.cloudfunctions.net/rag-techniques-tracker?notebook=main-readme&click=youtube-hyde-table&targ

RAG_Techniques (NirDiamant/RAG_Techniques)

Searching Database…

What is this?A community-driven hub of advanced techniques for Retrieval-Augmented Generation (RAG) — grounding LLM answers in retrieved documents, distilled into runnable notebook tutorials.
Is this an installable library, or a set of tutorials?A set of tutorials, not a package: 42+ self-contained Jupyter notebooks, each teaching one RAG technique with intuition, code and references.
How do I work through a technique?Clone the repo, open the technique's notebook in Jupyter and run it top to bottom — each notebook is a standalone lesson you can adapt to your own stack.
What do I need installed and configured to run the notebooks?Python with Jupyter. Per the repo topics, the notebooks are built on LangChain and LlamaIndex and use OpenAI's GPT models, so plan on an OpenAI API key for most of them.
Any gotchas before I dive in?It teaches techniques rather than shipping a production library — you port the code into your own system. Notebooks also call hosted LLM APIs, so running them all consumes API credits.
Will a RAG beginner benefit, or is it for people already building systems?Both: material runs from foundational basics to cutting-edge, and it is written for researchers and practitioners pushing what RAG can do.
Can I run this on a regular laptop, or do I need special hardware?Any machine with Python and Jupyter works — Windows, macOS or Linux; the LLM work happens through cloud APIs, not your hardware.
What kinds of techniques does the collection cover?Everything from Basic RAG, chunk-size optimization and proposition chunking to query transformations, HyDE (hypothetical document embeddings) and agentic RAG, plus recent additions like MemoRAG and end-to-end RAG evaluation.
Where should a beginner start?In the Foundational section: Basic RAG first, then RAG with CSV Files, Reliable RAG, Optimizing Chunk Sizes and Proposition Chunking, before moving to Query Enhancement techniques like HyDE.
Is the collection still growing, or is it stale?Alive and growing: the README lists recent additions (MemoRAG, End-to-End RAG Evaluation, Open-RAG-Eval, JSON RAG), counts 42 notebooks and promises regular updates. The repo is not archived and has about 29.8k stars.
Is everything here free?The notebooks are free. The author monetizes companion material — a 20-module Prompt to Production course and the 400-page book RAG Made Simple — both linked from the README.
Creator
NirDiamant
Size
40.1 MB
Stars
29.9K
Age
2y
Commits · 90 Days