NirDiamant/RAG_Techniques

This repository showcases various advanced techniques for Retrieval-Augmented Generation (RAG) systems. Each technique has a detailed notebook tutorial.

A community-driven collection of 42+ ready-to-run Jupyter notebooks that teach Retrieval-Augmented Generation (RAG) — the technique that lets AI systems pull in external documents before answering, so they're less likely to guess or make things up.

What is RAG (in one breath)

RAG stands for Retrieval-Augmented Generation. Instead of an AI model answering purely from memory, a RAG system first searches a body of documents ("retrieval") and then drafts its answer using what it found ("generation"). This makes answers more accurate and grounded in real material.

What this repo actually is

  • A curated, community-driven hub of 42+ runnable notebooks (and growing), covering RAG techniques from foundational to cutting-edge.
  • Each notebook covers the intuition, the code, and references to help you build more accurate retrieval systems.
  • Techniques are organized by category in a table with direct links to open each notebook on GitHub or run it in Google Colab. Some entries also link to short video explainers.

Technique categories shown in the README

  • Foundational — e.g. Basic RAG, RAG with CSV files, Reliable RAG, choosing chunk sizes, proposition chunking.
  • Query Enhancement — e.g. Query Transformations, HyDE (hypothetical document embedding), HyPE (hypothetical prompt embedding).
  • Context Enrichment — e.g. contextual chunk headers, relevant segment extraction, context window enhancement.

The full table continues well beyond what's shown; the README notes recent additions like Mistral OCR document parsing, MemoRAG (memory-augmented retrieval), end-to-end RAG evaluation, Open-RAG-Eval, and JSON RAG.

Key features (as stated)

  • State-of-the-art RAG enhancements
  • Comprehensive documentation for each technique
  • Practical implementation guidelines
  • Regular updates with the latest advancements

Related projects

The same author maintains several sibling collections: Agents Towards Production (production-grade GenAI agents), GenAI Agents (a broad collection of agent implementations), Prompt Engineering Techniques, and Agent Memory Techniques (30 notebooks on AI-agent memory).

Community and extras

  • Open to contributions — the README invites ideas, techniques, and feedback via CONTRIBUTING.md.
  • Active community channels: a Reddit subreddit (r/EducationalAI), Discord, LinkedIn, and a YouTube channel with short explainer videos (each episode covers one idea).
  • A companion book, "RAG Made Simple" (400-page visual companion, Amazon bestseller in generative AI), with chapter 1 available free.
  • A newsletter (50,000+ subscribers) with updates, insights, and discounts on the author's books; sponsors and individual sponsors are acknowledged.

Who it's for

Researchers and practitioners who want to push what's possible with RAG — from simple first steps to advanced enhancements.

Related

  • Project
  • Project
  • Project
  • Project