NirDiamant/RAG_Techniques
NirDiamant/RAG_Techniques is a Jupyter Notebook project with 29.0k stars in the AI Tools space. This repository showcases various advanced techniques for Retrieval-Augmented Generation (RAG) systems. Each technique has a detailed notebook tutorial.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Snapshot
Top contributors
Show top contributors
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.
🎓 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. 17 modules, each pairing a video lecture with a hands-on lab, from your first structured prompt to a working production system.
🎁 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.
Sponsors ❤️
We gratefully acknowledge the organizations and individuals who have made significant contributions to this project.
Company Sponsors
|
|
Individual Sponsors

📫 Stay Updated!
| 🚀 Cutting-edge Updates | 💡 Expert Insights | 🎯 Top 0.1% Content |
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!

🎬 Prefer video?
I break these ideas down into short, one-idea-per-episode explainers on YouTube.
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 |
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 - the 400-page visual companion to this repo. Amazon Bestseller in Generative AI · 1,500+ readers · ⭐ 4.6
Get it - 33% off with code RAGKING → · Read Chapter 1 free
Related Projects
🚀 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
- 🧠 State-of-the-art RAG enhancements
- 📚 Comprehensive documentation for each technique
- 🛠️ Practical implementation guidelines
- 🌟 Regular updates with the latest advancements
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) | |
| 8 | Query Enhancement 🔍 | HyPE (Hypothetical Prompt Embedding) | |
| 9 | Context Enrichment 📚 | Contextual Chunk Headers | |
| 10 | Context Enrichment 📚 | Relevant Segment Extraction | |
| 11 | Context Enrichment 📚 | Context Window Enhancement | |
| 12 | Context Enrichment 📚 | Semantic Chunking | |
| 13 | Context Enrichment 📚 | Contextual Compression | |
| 14 | Context Enrichment 📚 | Document Augmentation | |
| 15 | Advanced Retrieval 🚀 | Fusion Retrieval | |
| 16 | Advanced Retrieval 🚀 | Reranking | |
| 17 | Advanced Retrieval 🚀 | Multi-faceted Filtering | Described below (no notebook yet) |
| 18 | Advanced Retrieval 🚀 | Hierarchical Indices | |
| 19 | Advanced Retrieval 🚀 | Dartboard Retrieval | |
| 20 | Advanced Retrieval 🚀 | Multi-modal RAG with Captioning | |
| 21 | Iterative Techniques 🔁 | Retrieval with Feedback Loop | |
| 22 | Iterative Techniques 🔁 | Adaptive Retrieval | |
| 23 | Evaluation 📊 | DeepEval | |
| 24 | Evaluation 📊 | GroUSE | |
| 25 | Explainability 🔬 | Explainable Retrieval | |
| 26 | Advanced Architecture 🏗️ | Graph RAG with LangChain | |
| 27 | Advanced Architecture 🏗️ | Microsoft GraphRAG | |
| 28 | Advanced Architecture 🏗️ | RAPTOR | |
| 29 | Advanced Architecture 🏗️ | Agentic RAG with Contextual AI | |
| 30 | Advanced Architecture 🏗️ | Self-RAG | |
| 31 | Advanced Architecture 🏗️ | Corrective RAG (CRAG) | |
| 32 | Advanced Architecture 🏗️ | Local Graph RAG with Verifiable Attribution | |
| 33 | Evaluation 📊 | End-to-End RAG Evaluation | |
| 34 | Evaluation 📊 | Open-RAG-Eval | |
| 35 | Advanced 🔬 | MemoRAG | |
| 36 | Special Technique 🌟 | Sophisticated Controllable Agent |
🌱 Foundational RAG Techniques
-
Simple RAG 🌱
- 🎬 Watch it explained: RAG Explained: Why AI Gets Your Own Documents Wrong — the intuition behind this notebook in 7 minutes: why chunks overlap, what "meaning space" actually is, and where simple RAG breaks down.
- LangChain:
- LlamaIndex:
- Runnable Script
Overview 🔎
Introducing basic RAG techniques ideal for newcomers.
Implementation 🛠️
Start with basic retrieval queries and integrate incremental learning mechanisms.
-
Simple RAG using a CSV file 🧩
- 🎬 Watch it explained: How Do You Search a Spreadsheet by Meaning? — turn each row into one labelled line and search the table by meaning; ask which customers are "in South American countries" and the Chile record comes back even though those words never appear.
- LangChain:
- LlamaIndex:
Overview 🔎
Introducing basic RAG using CSV files.
Implementation 🛠️
This uses CSV files to create basic retrieval and integrates with openai to create question and answering system.
-
Reliable RAG 🏷️:
- 🎬 Watch it explained: How Do You Know Your RAG Answer Isn't Made Up? — the three checkpoints that catch a bad chunk on the way in and an unsupported claim on the way out, plus the source highlighting that lets a skeptical reader verify the answer themselves.
Overview 🔎
Enhances the Simple RAG by adding validation and refinement to ensure the accuracy and relevance of retrieved information.
Implementation 🛠️
Check for retrieved document relevancy and highlight the segment of docs used for answering.
-
Choose Chunk Size 📏
- LangChain:
- Runnable Script
Overview 🔎
Selecting an appropriate fixed size for text chunks to balance context preservation and retrieval efficiency.
Implementation 🛠️
Experiment with different chunk sizes to find the optimal balance between preserving context and maintaining retrieval speed for your specific use case.
- LangChain:
-
Proposition Chunking ⛓️💥:
- 🎬 Watch it explained: 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, how a language model rewrites the chunk as single self-contained facts, and what the quality gate throws away.
Overview 🔎
Breaking down the text into concise, complete, meaningful sentences allowing for better control and handling of specific queries (especially extracting knowledge).
Implementation 🛠️
- 💪 Proposition Generation: The LLM is used in conjunction with a custom prompt to generate factual statements from the document chunks.
- ✅ Quality Checking: The generated propositions are passed through a grading system that evaluates accuracy, clarity, completeness, and conciseness.
-
Simple RAG with JSON
Overview 🔎
RAG with JSON documents is a method of using JSON files to create a retrieval and question answering system.
Implementation 🛠️
- 📄 Data Loading & Extraction: JSON data with multiple fields per entry is loaded, and most relevant text fields are combined to generate an embedding.
- 🔍 Retrieval: The system retrieves the most relevant JSON entries based on the user's query.
Additional Resources 📚
- The Propositions Method: Enhancing Information Retrieval for AI Systems - A comprehensive blog post exploring the benefits and implementation of proposition chunking in RAG systems.
🔍 Query Enhancement
-
Query Transformations 🔄
- LangChain:
- Runnable Script
Overview 🔎
Modifying and expanding queries to improve retrieval effectiveness.
Implementation 🛠️
- ✍️ Query Rewriting: Reformulate queries to improve retrieval.
- 🔙 Step-back Prompting: Generate broader queries for better context retrieval.
- 🧩 Sub-query Decomposition: Break complex queries into simpler sub-queries.
- LangChain:
-
Hypothetical Questions (HyDE Approach) ❓
- LangChain:
- Runnable Script
Overview 🔎
Generating hypothetical questions to improve alignment between queries and data.
Implementation 🛠️
Create hypothetical questions that point to relevant locations in the data, enhancing query-data matching.
Additional Resources 📚
- HyDE: Exploring Hypothetical Document Embeddings for AI Retrieval - A short blog post explaining this method clearly.
- LangChain:
📚 Context and Content Enrichment
-
Hypothetical Prompt Embeddings (HyPE) ❓🚀
- LangChain:
- Runnable Script
Overview 🔎
HyPE (Hypothetical Prompt Embeddings) is an enhancement to traditional RAG retrieval that precomputes hypothetical prompts at the indexing stage, but inseting the chunk in their place. This transforms retrieval into a question-question matching task. This avoids the need for runtime synthetic answer generation, reducing inference-time computational overhead while improving retrieval alignment.
Implementation 🛠️
- 📖 Precomputed Questions: Instead of embedding document chunks, HyPE generates multiple hypothetical queries per chunk at indexing time.
- 🔍 Question-Question Matching: User queries are matched against stored hypothetical questions, leading to better retrieval alignment.
- ⚡ No Runtime Overhead: Unlike HyDE, HyPE does not require LLM calls at query time, making retrieval faster and cheaper.
- 📈 Higher Precision & Recall: Improves retrieval context precision by up to 42 percentage points and claim recall by up to 45 percentage points.
Additional Resources 📚
- Preprint: Hypothetical Prompt Embeddings (HyPE) - Research paper detailing the method, evaluation, and benchmarks.
- LangChain:
-
Contextual Chunk Headers :label::
Overview 🔎
Contextual chunk headers (CCH) is a method of creating document-level and section-level context, and prepending those chunk headers to the chunks prior to embedding them.
Implementation 🛠️
Create a chunk header that includes context about the document and/or section of the document, and prepend that to each chunk in order to improve the retrieval accuracy.
Additional Resources 📚
dsRAG: open-source retrieval engine that implements this technique (and a few other advanced RAG techniques)
-
Relevant Segment Extraction 🧩:
Overview 🔎
Relevant segment extraction (RSE) is a method of dynamically constructing multi-chunk segments of text that are relevant to a given query.
Implementation 🛠️
Perform a retrieval post-processing step that analyzes the most relevant chunks and identifies longer multi-chunk segments to provide more complete context to the LLM.
-
Context Enrichment Techniques 📝
- LangChain:
- LlamaIndex:
- Runnable Script
Overview 🔎
Enhancing retrieval accuracy by embedding individual sentences and extending context to neighboring sentences.
Implementation 🛠️
Retrieve the most relevant sentence while also accessing the sentences before and after it in the original text.
- Semantic Chunking 🧠
- LangChain:
- Runnable Script
Overview 🔎
Dividing documents based on semantic coherence rather than fixed sizes.
Implementation 🛠️
Use NLP techniques to identify topic boundaries or coherent sections within documents for more meaningful retrieval units.
Additional Resources 📚
- Semantic Chunking: Improving AI Information Retrieval - A comprehensive blog post exploring the benefits and implementation of semantic chunking in RAG systems.
- Contextual Compression 🗜️
- LangChain:
- Runnable Script
Overview 🔎
Compressing retrieved information while preserving query-relevant content.
Implementation 🛠️
Use an LLM to compress or summarize retrieved chunks, preserving key information relevant to the query.
- Document Augmentation through Question Generation for Enhanced Retrieval
- LangChain:
- Runnable Script
Overview 🔎
This implementation demonstrates a text augmentation technique that leverages additional question generation to improve document retrieval within a vector database. By generating and incorporating various questions related to each text fragment, the system enhances the standard retrieval process, thus increasing the likelihood of finding relevant documents that can be utilized as context for generative question answering.
Implementation 🛠️
Use an LLM to augment text dataset with all possible questions that can be asked to each document.
🚀 Advanced Retrieval Methods
-
Fusion Retrieval 🔗
- LangChain:
- LlamaIndex:
- Runnable Script
Overview 🔎
Optimizing search results by combining different retrieval methods.
Implementation 🛠️
Combine keyword-based search with vector-based search for more comprehensive and accurate retrieval.
- LangChain:
-
Intelligent Reranking 📈
- LangChain:
- LlamaIndex:
- Runnable Script
Overview 🔎
Applying advanced scoring mechanisms to improve the relevance ranking of retrieved results.
Implementation 🛠️
- 🧠 LLM-based Scoring: Use a language model to score the relevance of each retrieved chunk.
- 🔀 Cross-Encoder Models: Re-encode both the query and retrieved documents jointly for similarity scoring.
- 🏆 Metadata-enhanced Ranking: Incorporate metadata into the scoring process for more nuanced ranking.
Additional Resources 📚
- Relevance Revolution: How Re-ranking Transforms RAG Systems - A comprehensive blog post exploring the power of re-ranking in enhancing RAG system performance.
- LangChain:
-
Multi-faceted Filtering 🔍
Overview 🔎
Applying various filtering techniques to refine and improve the quality of retrieved results.
Implementation 🛠️
- 🏷️ Metadata Filtering: Apply filters based on attributes like date, source, author, or document type.
- 📊 Similarity Thresholds: Set thresholds for relevance scores to keep only the most pertinent results.
- 📄 Content Filtering: Remove results that don't match specific content criteria or essential keywords.
- 🌈 Diversity Filtering: Ensure result diversity by filtering out near-duplicate entries.
-
Hierarchical Indices 🗂️
- LangChain:
- Runnable Script
Overview 🔎
Creating a multi-tiered system for efficient information navigation and retrieval.
Implementation 🛠️
Implement a two-tiered system for document summaries and detailed chunks, both containing metadata pointing to the same location in the data.
Additional Resources 📚
- Hierarchical Indices: Enhancing RAG Systems - A comprehensive blog post exploring the power of hierarchical indices in enhancing RAG system performance.
- LangChain:
-
Dartboard Retrieval 🎯
- LangChain:
Overview 🔎
Optimizing over Relevant Information Gain in Retrieval
Implementation 🛠️
- Combine both relevance and diversity into a single scoring function and directly optimize for it.
- POC showing plain simple RAG underperforming when the database is dense, and the dartboard retrieval outperforming it.
- LangChain:
-
Multi-modal Retrieval 📽️
Overview 🔎
Extending RAG capabilities to handle diverse data types for richer responses.
Implementation 🛠️
- Multi-model RAG with Multimedia Captioning:
- Caption and store all the other multimedia data like pdfs, ppts, etc., with text data in vector store and retrieve them together.
- Multi-model RAG with Colpali:
- Instead of captioning convert all the data into image, then find the most relevant images and pass them to a vision large language model.
- Multi-model RAG with Multimedia Captioning:
🔁 Iterative and Adaptive Techniques
-
Retrieval with Feedback Loops 🔁
- LangChain:
- Runnable Script
Overview 🔎
Implementing mechanisms to learn from user interactions and improve future retrievals.
Implementation 🛠️
Collect and utilize user feedback on the relevance and quality of retrieved documents and generated responses to fine-tune retrieval and ranking models.
- LangChain:
-
Adaptive Retrieval 🎯
- LangChain:
- Runnable Script
Overview 🔎
Dynamically adjusting retrieval strategies based on query types and user contexts.
Implementation 🛠️
Classify queries into different categories and use tailored retrieval strategies for each, considering user context and preferences.
- LangChain:
📊 Evaluation
-
DeepEval Evaluation:
| Comprehensive RAG system evaluation |
Overview 🔎
Performing evaluations Retrieval-Augmented Generation systems, by covering several metrics and creating test cases.
Implementation 🛠️
Use the
deepevallibrary to conduct test cases on correctness, faithfulness and contextual relevancy of RAG systems. -
GroUSE Evaluation:
| Contextually-grounded LLM evaluation |
Overview 🔎
Evaluate the final stage of Retrieval-Augmented Generation using metrics of the GroUSE framework and meta-evaluate your custom LLM judge on GroUSE unit tests.
Implementation 🛠️
Use the
grousepackage to evaluate contextually-grounded LLM generations with GPT-4 on the 6 metrics of the GroUSE framework and use unit tests to evaluate a custom Llama 3.1 405B evaluator. -
End-to-End RAG Evaluation:
| Complete evaluation pipeline |
Overview 🔎
A comprehensive tutorial covering evaluation criteria selection, LLM-as-a-judge metrics, RAGAS integration, and full evaluation pipeline assembly.
Implementation 🛠️
- Build custom metrics for completeness, relevance, and hallucination detection using the RAG-12000 dataset.
-
Open-RAG-Eval:
| Open-source RAG evaluation |
Overview 🔎
Demonstrates the open-rag-eval library for evaluation using UMBRELA scoring, AutoNuggetizer, and citation/hallucination detection.
Implementation 🛠️
- Evaluate RAG pipelines using multiple open-source metrics against the FIQA financial dataset.
🧠 Memory-Augmented Retrieval
-
MemoRAG:
| Memory-augmented retrieval |
Overview 🔎
A from-scratch implementation of MemoRAG - a memory-augmented RAG system with key-value pair extraction, surrogate query generation, and multi-query retrieval.
Implementation 🛠️
- Build a complete MemoryStore with FAISS-based retrieval, surrogate queries, and comparison evaluation against standard RAG.
🔬 Explainability and Transparency
-
Explainable Retrieval 🔍
- LangChain:
- Runnable Script
Overview 🔎
Providing transparency in the retrieval process to enhance user trust and system refinement.
Implementation 🛠️
Explain why certain pieces of information were retrieved and how they relate to the query.
- LangChain:
🏗️ Advanced Architectures
-
Agentic RAG with Contextual AI 🤖
- Agentic RAG:
Overview 🔎
Building production-ready agentic RAG pipelines for financial document analysis with Contextual AI's managed platform. This comprehensive tutorial demonstrates how to leverage agentic RAG to solve complex queries through intelligent query reformulation, document parsing, reranking, and grounded language models.
Implementation 🛠️
- Document Parser: Enterprise-grade parsing with vision models for complex tables, charts, and multi-page documents
- Instruction-Following Reranker: SOTA reranker with instruction-following capabilities for handling conflicting information
- Grounded Language Model (GLM): World's most grounded LLM specifically engineered to minimize hallucinations for RAG use cases
- LMUnit: Natural language unit testing framework for evaluating and optimizing RAG system performance
- Agentic RAG:
-
Graph RAG with Milvus Vector Database 🔍
- Graph RAG with Milvus:
Overview 🔎
A simple yet powerful approach to implement Graph RAG using Milvus vector databases. This technique significantly improves performance on complex multi-hop questions by combining relationship-based retrieval with vector search and reranking.
Implementation 🛠️
- Store both text passages and relationship triplets (subject-predicate-object) in separate Milvus collections
- Perform multi-way retrieval by querying both collections
- Use an LLM to rerank retrieved relationships based on their relevance to the query
- Retrieve the final passages based on the most relevant relationships
- Graph RAG with Milvus:
-
Knowledge Graph Integration (Graph RAG) 🕸️
- LangChain:
- Runnable Script
Overview 🔎
Incorporating structured data from knowledge graphs to enrich context and improve retrieval.
Implementation 🛠️
Retrieve entities and their relationships from a knowledge graph relevant to the query, combining this structured data with unstructured text for more informative responses.
- LangChain:
-
GraphRag (Microsoft) 🎯
- GraphRag:
Overview 🔎
Microsoft GraphRAG (Open Source) is an advanced RAG system that integrates knowledge graphs to improve the performance of LLMs
Implementation 🛠️
• Analyze an input corpus by extracting entities, relationships from text units. generates summaries of each community and its constituents from the bottom-up.
- GraphRag:
-
RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval 🌳
- LangChain:
- Runnable Script
Overview 🔎
Implementing a recursive approach to process and organize retrieved information in a tree structure.
Implementation 🛠️
Use abstractive summarization to recursively process and summarize retrieved documents, organizing the information in a tree structure for hierarchical context.
- LangChain:
-
Self RAG 🔁
- LangChain:
- Runnable Script
Overview 🔎
A dynamic approach that combines retrieval-based and generation-based methods, adaptively deciding whether to use retrieved information and how to best utilize it in generating responses.
Implementation 🛠️
• Implement a multi-step process including retrieval decision, document retrieval, relevance evaluation, response generation, support assessment, and utility evaluation to produce accurate, relevant, and useful outputs.
- LangChain:
-
Corrective RAG 🔧
- LangChain:
- Runnable Script
Overview 🔎
A sophisticated RAG approach that dynamically evaluates and corrects the retrieval process, combining vector databases, web search, and language models for highly accurate and context-aware responses.
Implementation 🛠️
• Integrate Retrieval Evaluator, Knowledge Refinement, Web Search Query Rewriter, and Response Generator components to create a system that adapts its information sourcing strategy based on relevance scores and combines multiple sources when necessary.
- LangChain:
-
Local Graph RAG with Verifiable Attribution 🔗
- NetworkX + Ollama:
Overview 🔎
A privacy-first Graph RAG implementation running entirely locally with Ollama. Uses NetworkX for multi-hop graph traversal and provides sentence-level attribution — every claim traces back to the exact source sentence, unlike Vector RAG's chunk-level attribution.
Implementation 🛠️
• Extract entities and relationships from documents using a local LLM, building a knowledge graph with full source provenance. Combine vector similarity search (entry points) with graph traversal (multi-hop expansion). Generate answers with inline citations that map each claim to its source document, sentence, and graph path.
- NetworkX + Ollama:
🌟 Special Advanced Technique 🌟
-
Sophisticated Controllable Agent for Complex RAG Tasks 🤖
Overview 🔎
An advanced RAG solution designed to tackle complex questions that simple semantic similarity-based retrieval cannot solve. This approach uses a sophisticated deterministic graph as the "brain" 🧠 of a highly controllable autonomous agent, capable of answering non-trivial questions from your own data.
Implementation 🛠️
• Implement a multi-step process involving question anonymization, high-level planning, task breakdown, adaptive information retrieval and question answering, continuous re-planning, and rigorous answer verification to ensure grounded and accurate responses.
Getting Started
To begin implementing these advanced RAG techniques in your projects:
- Clone this repository:
git clone https://github.com/NirDiamant/RAG_Techniques.git - Navigate to the technique you're interested in:
cd all_rag_techniques/technique-name - Follow the detailed implementation guide in each technique's directory.
📚 Recommended reading
This list contains Amazon affiliate links. As an Amazon Associate I earn from qualifying purchases. Every book below is one I've read and genuinely recommend to engineers working in this space. The companion book to this repo is featured separately at the top of this README.
- Build a Large Language Model (From Scratch) by Sebastian Raschka. Build a GPT-style model end to end in PyTorch.
- AI Engineering: Building Applications with Foundation Models by Chip Huyen. Canonical reference for productionizing foundation-model apps.
- Hands-On Large Language Models by Jay Alammar and Maarten Grootendorst. Visual, practical LLM walkthroughs.
- Natural Language Processing with Transformers by Lewis Tunstall, Leandro von Werra, and Thomas Wolf. From the Hugging Face team.
- Designing Machine Learning Systems by Chip Huyen. ML systems in production, still the standard reference.
🌟 Support This Project: Your sponsorship fuels innovation in RAG technologies. Become a sponsor to help maintain and expand this valuable resource!
📚 More from the same author
Prompt Engineering: Master the Art of AI Interaction - the prompting foundation that makes RAG work better. Same visual approach, 22 hands-on techniques.
Run a course, newsletter, or dev community? You can earn 25% recommending RAG Made Simple to your audience.
Contributing
We welcome contributions from the community! If you have a new technique or improvement to suggest:
- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to the branch:
git push origin feature/AmazingFeature - Open a pull request
Contributors
License
This project is licensed under a custom non-commercial license - see the LICENSE file for details.
⭐️ If you find this repository helpful, please consider giving it a star!
Keywords: RAG, Retrieval-Augmented Generation, NLP, AI, Machine Learning, Information Retrieval, Natural Language Processing, LLM, Embeddings, Semantic Search, PydanticAI, Agent Frameworks
Related repositories
LangChain is a Python framework (MIT-licensed) for assembling LLM-powered apps and agents from standard components: model wrappers, prompts, retrieval, tools, and chain/graph orchestration handed off to LangGraph. It's for developers gluing together model providers and data sources, not for a single prompt-response call.
Dify is an open-source LLM app platform that packages a visual workflow/agent builder, RAG pipeline, model provider management, and app-level APIs into one self-hostable (or cloud) stack, aimed at teams who want to skip stitching those pieces together themselves.
Microsoft's introductory course on building generative AI applications walks you through 21 structured lessons created by Microsoft Cloud Advocates. The curriculum alternates between conceptual 'Learn' lessons and hands-on 'Build' lessons, progressing from LLM fundamentals through advanced topics like RAG, AI agents, and fine-tuning. Each lesson includes a written explanation, video introduction, and working code samples in both Python and TypeScript. Basic Python or TypeScript knowledge is expected. The course supports Azure OpenAI, OpenAI API, Microsoft Foundry Models, and Foundry Local for fully offline execution. With over 50 language translations maintained via automated GitHub Actions, it's accessible to a global developer audience. MIT licensed with an active Discord community and developer forum for peer support.
LLMs-from-scratch is Sebastian Raschka's GitHub companion to the Manning book Build a Large Language Model (From Scratch), ISBN 9781633437166. It walks through building, pretraining, and finetuning a GPT-style model in PyTorch across seven chapters and five appendices, plus a growing set of bonus notebooks covering newer open architectures.
Quick answers
How active is development on NirDiamant/RAG_Techniques?
The most recent commit recorded on NirDiamant/RAG_Techniques was 13 days ago, based on the GitHub push timestamp. The repository has 3.5k forks — one of the better signals of community interest.
How does NirDiamant/RAG_Techniques compare to other AI Tools projects?
NirDiamant/RAG_Techniques is tracked by TopGit in the AI Tools category, with 29.0k GitHub stars and written in Jupyter Notebook. Browse the AI Tools topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does NirDiamant/RAG_Techniques have?
NirDiamant/RAG_Techniques has 29.0k GitHub stars — refresh the page for the live number, or check github.com/NirDiamant/RAG_Techniques. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is NirDiamant/RAG_Techniques open source?
TopGit's metadata for NirDiamant/RAG_Techniques does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is NirDiamant/RAG_Techniques?
NirDiamant/RAG_Techniques (NirDiamant/RAG_Techniques) is a Jupyter Notebook project on GitHub. From the project's own README: This repository showcases various advanced techniques for Retrieval-Augmented Generation (RAG) systems. Each technique has a detailed notebook tutorial.
Where do I read more about NirDiamant/RAG_Techniques?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/NirDiamant/RAG_Techniques is the definitive source.
Read full README in the tab above.
Want a second opinion on RAG_Techniques?
Ask an AI that can read this page — one click and you get its take on RAG_Techniques.