Model or dataset
GiovanniPasq/agentic-rag-for-dummies avatar
GiovanniPasq/agentic-rag-for-dummies

Agentic RAG for Dummies: A LangGraph Blueprint for Modular Retrieval Agents

A modular Agentic RAG built with LangGraph — learn Retrieval-Augmented Generation Agents in minutes.

4,381 stars579 forksJupyter NotebookMIT

At a glance

What is it?
This project offers a modular Agentic RAG system built on LangGraph, with hierarchical indexing, multi-agent map-reduce, and human-in-the-loop clarification. It targets developers who want a runnable starting point for agent-driven retrieval rather than another static RAG tutorial.
Who is it for?
Adopt this repository if you are a developer or data scientist who wants a concrete, extensible LangGraph template for agentic retrieval, especially if you already run Ollama locally and prefer a notebook-to-modular-app path. Skip it if you need a production-hardened system, or if you require a non-Python stack.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 4 days ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • GiovanniPasq/agentic-rag-for-dummies4,381 ★ · +350
Star history
Repository2026-09-102026-11-14
GiovanniPasq/agentic-rag-for-dummies4k4.4k

350 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What This Repository Actually Solves

Most RAG examples stop at a single retrieval step: embed a document, search a vector store, stuff the result into a prompt. This project addresses the gap between that demo and a system that can handle ambiguous queries, multi-part questions, and long conversations. It does so by wrapping retrieval in a LangGraph agent that can rewrite queries, ask for clarification, spawn parallel sub-agents, and re-query when results are weak. The intended audience is developers who have seen basic RAG and want a working reference for agent orchestration. The README explicitly frames it as both a learning path, via a Jupyter notebook, and a building path, via a modular project. That dual purpose is the core value: you can run the notebook in Colab to grasp the flow, then switch to the modular app to adapt components for your own use.

Hierarchical Indexing and the Parent-Child Split

The retrieval design rests on a two-tier chunking strategy. Documents are split into parent chunks, which are bounded by Markdown headers (H1, H2, H3), and child chunks, which are fixed-size pieces taken from those parents. The search operates on child chunks for precision, while the answer generation pulls in the larger parent chunks for context. This is a known pattern in RAG, often called parent-document retrieval, and it addresses the trade-off between finding a specific passage and giving the LLM enough surrounding material to answer correctly. The repository mentions an optional companion tool, Chunky, for PDF-to-Markdown conversion and chunk inspection, but the core system does not require it.

Four-Stage Workflow with Human-in-the-Loop

The query processing pipeline is explicitly laid out as a sequence: user query, conversation summary, query rewriting, query clarification, parallel agent reasoning, aggregation, and final response. Stage 1 keeps a rolling summary and recent history, which avoids unbounded context growth. Stage 2 handles references like 'How do I update it?' by resolving what 'it' means, and it can pause to ask the user for details when the query is unclear. That human-in-the-loop step is a genuine design choice, not a gimmick. It means the system can fail gracefully when the input is too vague to retrieve against. Stage 3 then decomposes complex queries into sub-queries and runs parallel agent subgraphs, one per sub-query. Each subgraph performs its own search, fetches parent chunks, and can self-correct if the initial results are insufficient. The README gives the example of 'What is JavaScript? What is Python?' spawning two agents. Stage 4 aggregates the sub-agent responses into a single answer. This is a map-reduce pattern applied to retrieval, and it is the most distinctive part of the architecture.

Installation and Configuration: Ollama First, Cloud Later

The runnable app is Ollama-first. The README shows pulling a model with 'ollama pull granite4.1:8b' and initializing a chat model with ChatOllama, setting temperature to 0 and a fixed seed for reproducibility. It warns that models smaller than 8B parameters may ignore retrieval instructions or hallucinate, so the model choice is not arbitrary. For cloud providers, the repository includes examples for OpenAI, Anthropic, and Google, but the code pattern is the same: install the LangChain integration package and set the appropriate environment variable, such as OPENAI_API_KEY. The project also lists Qdrant as the vector database and Langfuse for observability. The repository ships a requirements.txt and pyproject.toml with exactly pinned dependencies, plus start.sh and start.bat scripts. The notebook is available via a Colab badge, which lowers the barrier for the learning path. If you want to run the modular app locally, you will need to clone the repo, install the dependencies, and configure your LLM and Qdrant endpoints yourself.

Limitations and Wrong-Tool Cases

The most obvious limitation is the dependency on LangGraph and LangChain, which are fast-moving libraries. The project pins langgraph==1.2.16, and by the time you read this, that version may be outdated, and the code may break with newer releases. The README itself acknowledges that model names change frequently and advises checking official documentation. Another limitation is that the system is not a turnkey product. It is a template. If you need a hosted RAG service or a managed vector store, this repository is not that. The human-in-the-loop clarification is a strength for interactive use, but it also means the system may stop and wait in contexts where you need fully autonomous processing. Finally, GitHub reports Jupyter Notebook as the primary language, but the modular project lives separately in the project/ directory.

Alternative Approaches in the RAG Agent Space

A common alternative is a single-agent RAG system where one LLM call handles retrieval and generation without sub-agents or map-reduce. Frameworks like LlamaIndex offer agentic RAG with a different orchestration model: they use a query engine and tool abstractions, and they often ship with more built-in evaluation and data connectors. The difference is architectural. LangGraph, as used here, gives you explicit graph control over state transitions, which suits complex branching logic like parallel sub-agents and self-correction. LlamaIndex, by contrast, tends to abstract away the graph and give you higher-level agents that are easier to start with but harder to fine-tune at the node level. Another alternative is to skip agents entirely and use a simple retriever-reader chain. That is the right choice if your queries are always well-formed and single-faceted, because it is cheaper and simpler. This repository is for cases where you anticipate ambiguous, multi-part, or conversational queries that benefit from an orchestrated retrieval loop.

Maintenance, Licensing, and Upgrade Cost

The project is under the MIT license, which is permissive and allows commercial use, modification, and redistribution without copyleft obligations. That is a low-license-risk choice for most engineering teams. The repository has recent releases, with v2.3.1 from October 2026 and v2.3 and v2.2 from June 2026, indicating active maintenance, and the last push date is October 2026. The upgrade cost is moderate: because the project relies on LangGraph, LangChain, and Qdrant, each of those dependencies can introduce breaking changes. Dependencies are pinned to exact versions in requirements.txt and pyproject.toml. You should budget time to reconcile version mismatches when you upgrade. The observability integration with Langfuse and evaluation with RAGAS are mentioned as features, and a companion evaluation notebook, notebooks/evaluation.ipynb, scores answers and tool outputs with RAGAS metrics. For a learning project, that is acceptable. For a production deployment, you will need to add your own testing and version pinning.

Editorial conclusion

Adopt this repository if you are a developer or data scientist who wants a concrete, extensible LangGraph template for agentic retrieval, especially if you already run Ollama locally and prefer a notebook-to-modular-app path. Skip it if you need a production-hardened system, or if you require a non-Python stack. Before adopting, verify the current LangGraph and LangChain versions against the repository's requirements, check that your chosen LLM supports reliable tool calling, and confirm the Qdrant integration matches your deployment target, since the code assumes a specific vector store setup.

Frequently asked questions

Can you explain agentic RAG in a simple way?

In this repository's framing, the agentic part is the loop around retrieval: a rolling conversation summary, query rewriting and clarification that can pause to ask the user, parallel sub-agents per sub-query that search small chunks and fetch their parents, self-correction when results are thin, and context compression before the answers are aggregated.

Can you explain RAG to a beginner?

The project starts at document preparation and splits documents twice. Parent chunks are large sections bounded by Markdown headers, child chunks are small fixed-size pieces taken from those parents, and search runs on the children while answers are generated from the parent for context.

What does agentic mean in simple terms?

Here it maps onto a four-stage graph: conversation understanding with a rolling summary, query clarification that may stop for a human, parallel map-reduce retrieval across sub-queries, and response generation that aggregates the results.

Is ChatGPT an agentic AI?

The repository does not discuss ChatGPT as a product. It treats chat models as interchangeable, showing Ollama for local use and examples for OpenAI, Anthropic and Google, with LangGraph doing the orchestration in every case.

What does agentic-rag-for-dummies need installed?

Sixteen exactly pinned packages in one requirements file, including langgraph, langchain-ollama, langchain-qdrant, langchain-text-splitters, langfuse, ragas, fastembed, sentence-transformers, pymupdf4llm and gradio. The local chat model is pulled separately through Ollama.

Official sources

  1. GiovanniPasq/agentic-rag-for-dummies on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/giovannipasq-agentic-rag-for-dummies.svg)](https://hysenlabs.com/projects/giovannipasq-agentic-rag-for-dummies)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/giovannipasq-agentic-rag-for-dummies.svg)](https://hysenlabs.com/projects/giovannipasq-agentic-rag-for-dummies)

Was this useful?