Back to rankings

NirDiamant/RAG_Techniques

Jupyter Notebookamzn.to/4cvxqSw

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

ragtutorialslangchainllama-indexllmspythonaillmembeddingsnlpopenairetrieval-augmented-generation
Star Growth
Stars
28.7k
Forks
3.5k
Weekly Growth
โ€”
Issues
8
10k20k
Jul 2024Mar 2025Nov 2025Jul 2026
README

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. 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.

Claim your free module

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

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

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 - 33% off with code RAGKING โ†’ ยท 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

  • ๐Ÿง  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
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

  1. Simple RAG ๐ŸŒฑ

    Overview ๐Ÿ”Ž

    Introducing basic RAG techniques ideal for newcomers.

    Implementation ๐Ÿ› ๏ธ

    Start with basic retrieval queries and integrate incremental learning mechanisms.

  2. Simple RAG using a CSV file ๐Ÿงฉ

    • 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.

  3. Reliable RAG ๐Ÿท๏ธ:

    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.

  4. Choose Chunk Size ๐Ÿ“

    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.

  5. Proposition Chunking โ›“๏ธโ€๐Ÿ’ฅ:

    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.
  6. 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 ๐Ÿ“š

๐Ÿ” Query Enhancement

  1. Query Transformations ๐Ÿ”„

    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.
  2. Hypothetical Questions (HyDE Approach) โ“

    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 ๐Ÿ“š

๐Ÿ“š Context and Content Enrichment

  1. Hypothetical Prompt Embeddings (HyPE) โ“๐Ÿš€

    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 ๐Ÿ“š

  2. 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)

  3. 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.

  4. Context Enrichment Techniques ๐Ÿ“

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.

  1. Semantic Chunking ๐Ÿง 

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 ๐Ÿ“š

  1. Contextual Compression ๐Ÿ—œ๏ธ

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.

  1. Document Augmentation through Question Generation for Enhanced Retrieval

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

  1. Fusion Retrieval ๐Ÿ”—

    Overview ๐Ÿ”Ž

    Optimizing search results by combining different retrieval methods.

    Implementation ๐Ÿ› ๏ธ

    Combine keyword-based search with vector-based search for more comprehensive and accurate retrieval.

  2. Intelligent Reranking ๐Ÿ“ˆ

    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 ๐Ÿ“š

  3. 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.
  4. Hierarchical Indices ๐Ÿ—‚๏ธ

    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 ๐Ÿ“š

  5. 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.
  6. 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.

๐Ÿ” Iterative and Adaptive Techniques

  1. Retrieval with Feedback Loops ๐Ÿ”

    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.

  2. Adaptive Retrieval ๐ŸŽฏ

    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.

๐Ÿ“Š Evaluation

  1. DeepEval Evaluation: | Comprehensive RAG system evaluation |

    Overview ๐Ÿ”Ž

    Performing evaluations Retrieval-Augmented Generation systems, by covering several metrics and creating test cases.

    Implementation ๐Ÿ› ๏ธ

    Use the deepeval library to conduct test cases on correctness, faithfulness and contextual relevancy of RAG systems.

  2. 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 grouse package 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.

  3. 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.
  4. 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

  1. 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

  1. Explainable Retrieval ๐Ÿ”

    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.

๐Ÿ—๏ธ Advanced Architectures

  1. 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
  2. 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
  3. Knowledge Graph Integration (Graph RAG) ๐Ÿ•ธ๏ธ

    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.

  4. 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.

  5. RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval ๐ŸŒณ

    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.

  6. Self RAG ๐Ÿ”

    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.

  7. Corrective RAG ๐Ÿ”ง

    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.

  8. 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.

๐ŸŒŸ Special Advanced Technique ๐ŸŒŸ

  1. 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:

  1. Clone this repository:
    git clone https://github.com/NirDiamant/RAG_Techniques.git
    
  2. Navigate to the technique you're interested in:
    cd all_rag_techniques/technique-name
    
  3. Follow the detailed implementation guide in each technique's directory.

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.


๐ŸŒŸ 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:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/AmazingFeature
  3. Commit your changes: git commit -m 'Add some AmazingFeature'
  4. Push to the branch: git push origin feature/AmazingFeature
  5. Open a pull request

Contributors

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
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

TypeScriptnpmOtheraigpt
dify.ai
149.5k23.6k
open-webui/open-webui

User-friendly AI Interface (Supports Ollama, OpenAI API, ...)

PythonPyPIOtherollamaollama-webui
openwebui.com
146.1k21.2k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.2k23.6k
Shubhamsaboo/awesome-llm-apps

100+ AI Agent & RAG apps you can actually run โ€” clone, customize, ship.

PythonPyPIApache License 2.0llmsrag
theunwindai.com
125.2k18.5k
Graphify-Labs/graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

PythonPyPIMIT Licenseclaude-codegraphrag
graphify.com
92.4k9k
thedotmack/claude-mem

Persistent Context Across Sessions for Every Agent โ€“ Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

JavaScriptnpmApache License 2.0aiai-agents
claude-mem.ai
88k7.6k
PaddlePaddle/PaddleOCR

Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between images/PDFs and LLMs. Supports 100+ languages.

PythonPyPIApache License 2.0ocrchineseocr
paddleocr.com
85.9k11k
infiniflow/ragflow

RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs

GoGo ModulesApache License 2.0aiai-agents
ragflow.io
85.5k10k
dair-ai/Prompt-Engineering-Guide

๐Ÿ™ Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
datawhalechina/hello-agents

๐Ÿ“š ใ€ŠไปŽ้›ถๅผ€ๅง‹ๆž„ๅปบๆ™บ่ƒฝไฝ“ใ€‹โ€”โ€”ไปŽ้›ถๅผ€ๅง‹็š„ๆ™บ่ƒฝไฝ“ๅŽŸ็†ไธŽๅฎž่ทตๆ•™็จ‹

PythonPyPIOtheragenttutorial
hello-agents.datawhale.cc
67.5k8.4k
Mintplex-Labs/anything-llm

Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience

JavaScriptnpmMIT Licenseraglocalai
anythingllm.com
63.6k7k
mem0ai/mem0

Universal memory layer for AI Agents

TypeScriptnpmApache License 2.0aichatgpt
mem0.ai
61.3k7.1k