[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"article-build-agentic-rag-system-langgraph-en":3,"article-related-build-agentic-rag-system-langgraph-en":31,"series-ai-agent-c9718bed-9db2-4e04-88d4-9316d047680d":85},{"id":4,"slug":5,"title":6,"content":7,"summary":8,"source":9,"source_url":10,"author":11,"image_url":12,"cover_image":12,"category":13,"language":14,"translated_content":11,"related_article_id":15,"keywords":16,"key_takeaways":23,"views":27,"created_at":28,"published_at":29,"topic_cluster_id":30},"c9718bed-9db2-4e04-88d4-9316d047680d","build-agentic-rag-system-langgraph-en","Build an Agentic RAG system with LangGraph","\u003Cp data-speakable=\"summary\">A modular LangGraph repo for building and learning Agentic \u003Ca href=\"\u002Ftag\u002Frag\">RAG\u003C\u002Fa> end to end.\u003C\u002Fp>\u003Cp>This guide is for developers who want to turn a basic retrieval app into an agentic RAG system with query clarification, conversation memory, and multi-step reasoning. By the end, you will have a local project that can ingest PDFs, build a hybrid vector index, run LangGraph workflows, and answer questions with a configurable \u003Ca href=\"\u002Ftag\u002Fllm\">LLM\u003C\u002Fa> provider.\u003C\u002Fp>\u003Cp>The repository also doubles as a learning path, so you can start with the notebook flow and then move into the modular app when you are ready to adapt the pipeline for your own model, embeddings, or document format.\u003C\u002Fp>\u003Ch2>Before you start\u003C\u002Fh2>\u003Cul>\u003Cli>Python 3.10 or 3.11\u003C\u002Fli>\u003Cli>Git installed and working on your machine\u003C\u002Fli>\u003Cli>Ollama installed locally, or API keys for OpenAI, Anthropic, or Google\u003C\u002Fli>\u003Cli>Qdrant running locally or a Qdrant path on disk\u003C\u002Fli>\u003Cli>At least one PDF file to index\u003C\u002Fli>\u003Cli>Access to the repo docs on \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FGiovanniPasq\u002Fagentic-rag-for-dummies\">GitHub\u003C\u002Fa> and LangGraph docs on \u003Ca href=\"https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002F\">LangGraph\u003C\u002Fa>\u003C\u002Fli>\u003Cli>Python packages from the repo requirements, including LangChain, Qdrant, and PyMuPDF\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>Step 1: Clone the repository\u003C\u002Fh2>\u003Cp>Your first goal is to get the project onto your machine so you can inspect the notebook path and the modular app path side by side.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781485375801-5h1u.png\" alt=\"Build an Agentic RAG system with LangGraph\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cpre>\u003Ccode>git clone https:\u002F\u002Fgithub.com\u002FGiovanniPasq\u002Fagentic-rag-for-dummies.git\ncd agentic-rag-for-dummies\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npip install -r requirements.txt\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the repo folders such as \u003Ccode>notebooks\u003C\u002Fcode>, \u003Ccode>project\u003C\u002Fcode>, and \u003Ccode>assets\u003C\u002Fcode>, plus a successful dependency install with no missing-package errors.\u003C\u002Fp>\u003Ch2>Step 2: Configure the local LLM and storage\u003C\u002Fh2>\u003Cp>Your goal here is to make the app runnable by defining the model provider, embeddings, and local storage paths that the \u003Ca href=\"\u002Ftag\u002Fagent\">agent\u003C\u002Fa> will use during retrieval.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781485383940-c6cu.png\" alt=\"Build an Agentic RAG system with LangGraph\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cpre>\u003Ccode>export OPENAI_API_KEY=\"your-key\"  # or ANTHROPIC_API_KEY \u002F GOOGLE_API_KEY\nollama pull qwen3:4b-instruct-2507-q4_K_M\nmkdir -p docs markdown_docs parent_store qdrant_db\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see Ollama report that the model is available, and the folders for source PDFs, markdown output, parent chunks, and Qdrant storage should exist on disk.\u003C\u002Fp>\u003Ch2>Step 3: Convert PDFs into markdown\u003C\u002Fh2>\u003Cp>Your goal is to normalize source documents into markdown so the pipeline can chunk them consistently and preserve structure for retrieval.\u003C\u002Fp>\u003Cpre>\u003Ccode>python -c \"from project.pdf_utils import pdfs_to_markdowns; pdfs_to_markdowns('docs\u002F*.pdf')\"\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see markdown files appear in \u003Ccode>markdown_docs\u003C\u002Fcode>, and each PDF should have a corresponding \u003Ccode>.md\u003C\u002Fcode> file that is readable in a text editor.\u003C\u002Fp>\u003Ch2>Step 4: Build the hierarchical index\u003C\u002Fh2>\u003Cp>Your goal is to create the repo’s parent-child retrieval setup, where small chunks improve search precision and parent chunks restore context for generation.\u003C\u002Fp>\u003Cpre>\u003Ccode>python -c \"from project.indexing import build_index; build_index()\"\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the Qdrant collection created, child chunks stored in the \u003Ca href=\"\u002Ftag\u002Fvector-database\">vector database\u003C\u002Fa>, and parent chunk JSON files written to \u003Ccode>parent_store\u003C\u002Fcode>.\u003C\u002Fp>\u003Ch2>Step 5: Run the LangGraph agent workflow\u003C\u002Fh2>\u003Cp>Your goal is to launch the agentic query pipeline so the system can rewrite ambiguous questions, clarify missing details, retrieve context, and synthesize the final answer.\u003C\u002Fp>\u003Cpre>\u003Ccode>python -m project.app\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see the graph execute through stages such as conversation summary, query rewriting, retrieval, and response generation, then return an answer instead of a raw document dump.\u003C\u002Fp>\u003Ch2>Step 6: Test a multi-part question\u003C\u002Fh2>\u003Cp>Your goal is to verify that the agent can split a complex prompt into parallel sub-queries and merge the results into one coherent response.\u003C\u002Fp>\u003Cpre>\u003Ccode>What is JavaScript? What is Python?\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>You should see two retrieval paths run in parallel or in sequence through the graph, followed by a combined answer that addresses both topics clearly.\u003C\u002Fp>\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Metric\u003C\u002Fth>\u003Cth>Before\u002FBaseline\u003C\u002Fth>\u003Cth>After\u002FResult\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Retrieval workflow\u003C\u002Ftd>\u003Ctd>Basic single-pass RAG\u003C\u002Ftd>\u003Ctd>Agentic RAG with clarification, self-correction, and map-reduce reasoning\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Document context\u003C\u002Ftd>\u003Ctd>Small chunks only\u003C\u002Ftd>\u003Ctd>Hybrid parent and child chunks for precision plus context\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Model support\u003C\u002Ftd>\u003Ctd>One provider only\u003C\u002Ftd>\u003Ctd>Ollama first, with OpenAI, Anthropic, and Google options\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003Ch2>Common mistakes\u003C\u002Fh2>\u003Cul>\u003Cli>Using a small local model that ignores tool instructions. Fix: switch to a 7B+ model or a stronger hosted chat model.\u003C\u002Fli>\u003Cli>Skipping the markdown conversion step. Fix: convert PDFs first so chunking and metadata stay stable.\u003C\u002Fli>\u003Cli>Forgetting to create Qdrant storage paths. Fix: create the local folders before running indexing, or point the client at the right database path.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>What's next\u003C\u002Fh2>\u003Cp>Once the local flow works, extend it with your own document set, swap in a different embedding model or chat provider, and add tracing or evaluation with Langfuse and RAGAS so you can measure retrieval quality before you ship.\u003C\u002Fp>","A modular LangGraph repo for building and learning Agentic RAG end to end.","github.com","https:\u002F\u002Fgithub.com\u002FGiovanniPasq\u002Fagentic-rag-for-dummies",null,"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781485375801-5h1u.png","ai-agent","en","45c6e678-8ac7-4881-8096-34703d7db136",[17,18,19,20,21,22],"LangGraph","Agentic RAG","Qdrant","Ollama","RAGAS","LangChain",[24,25,26],"You can run an agentic RAG pipeline locally with modular model and storage choices.","Hierarchical parent-child indexing improves both retrieval precision and answer context.","LangGraph adds clarification, memory, self-correction, and multi-agent reasoning to RAG.",0,"2026-06-15T01:02:29.81896+00:00","2026-06-15T01:02:29.812+00:00","c58956f2-0e6f-4be5-b68a-39eda67428b3",{"tags":32,"relatedLang":44,"relatedPosts":48},[33,35,37,39,41],{"name":17,"slug":34},"langgraph",{"name":20,"slug":36},"ollama",{"name":19,"slug":38},"qdrant",{"name":21,"slug":40},"ragas",{"name":42,"slug":43},"agentic RAG","agentic-rag",{"id":15,"slug":45,"title":46,"language":47},"yong-langgraph-zuo-chu-dai-li-shi-rag-xi-tong-zh","用 LangGraph 做出代理式 RAG 系統","zh",[49,55,61,67,73,79],{"id":50,"slug":51,"title":52,"cover_image":53,"image_url":53,"created_at":54,"category":13},"a84c46a7-6a3f-4a04-91ac-7c9337919d30","manus-ai-proves-agents-are-ready-for-real-work-en","Manus AI proves agents are ready for real work, but pricing will deci…","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781444876641-wnp9.png","2026-06-14T13:47:21.873741+00:00",{"id":56,"slug":57,"title":58,"cover_image":59,"image_url":59,"created_at":60,"category":13},"88192de5-5bda-4eba-ae2a-157d4bbea8d7","coinbase-ai-agent-accounts-strict-limits-en","Coinbase is right to let AI agents trade and spend, with strict limits","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781409759613-rhzp.png","2026-06-14T04:02:15.747337+00:00",{"id":62,"slug":63,"title":64,"cover_image":65,"image_url":65,"created_at":66,"category":13},"4d6fc0c2-481a-48c6-9743-2f3f77945134","peft-llm-fine-tuning-without-full-retraining-en","PEFT for LLM Fine-Tuning Without Full Retraining","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781403469215-8tu4.png","2026-06-14T02:17:26.696413+00:00",{"id":68,"slug":69,"title":70,"cover_image":71,"image_url":71,"created_at":72,"category":13},"39f54361-7d76-4dfe-be99-dcae84f18a07","llm-research-engineers-post-training-services-en","LLM research engineers turn post-training into services","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781402606334-iyoh.png","2026-06-14T02:02:47.274885+00:00",{"id":74,"slug":75,"title":76,"cover_image":77,"image_url":77,"created_at":78,"category":13},"00cabbf4-05e7-440c-be15-b8f441a1506f","fine-tuning-slms-turns-enterprise-ai-practical-en","Fine-Tuning SLMs Turns Enterprise AI Practical","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781359408003-mj9d.png","2026-06-13T14:02:55.855964+00:00",{"id":80,"slug":81,"title":82,"cover_image":83,"image_url":83,"created_at":84,"category":13},"50d67ff2-698e-4ac1-9b5f-9233550bdc00","aspire-microsoft-agent-framework-app-graph-en","Aspire ties Microsoft Agent Framework into one app graph","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1781353081127-r8l2.png","2026-06-13T12:17:30.899796+00:00",[86,91,96,101,106,111,116,121,126,131],{"id":87,"slug":88,"title":89,"created_at":90},"03db8de8-8dc2-4ac1-9cf7-898782efbb1f","anthropic-claude-ai-agent-task-automation-en","Anthropic's Claude AI Agent: A New Era of Task Automation","2026-03-25T16:25:06.513026+00:00",{"id":92,"slug":93,"title":94,"created_at":95},"045d1abc-190d-4594-8c95-91e2a26f0c5a","googles-2026-ai-agent-report-decoded-en","Google’s 2026 AI Agent Report, Decoded","2026-03-26T11:15:23.046616+00:00",{"id":97,"slug":98,"title":99,"created_at":100},"e64aba21-254b-4f93-aa21-837484bb52ec","kimi-k25-review-stronger-still-not-legend-en","Kimi K2.5 review: stronger, still not a legend","2026-03-27T07:15:55.385951+00:00",{"id":102,"slug":103,"title":104,"created_at":105},"30dfb781-a1b2-4add-aebe-b3df40247c37","claude-code-controls-mac-desktop-en","Claude Code now controls your Mac desktop","2026-03-28T03:01:59.384091+00:00",{"id":107,"slug":108,"title":109,"created_at":110},"254405b6-7833-4800-8e13-f5196deefbe6","cloudflare-100x-faster-ai-agent-sandbox-en","Cloudflare’s 100x Faster AI Agent Sandbox","2026-03-28T03:09:44.356437+00:00",{"id":112,"slug":113,"title":114,"created_at":115},"04f29b7f-9b91-4306-89a7-97d725e6e1ba","openai-backs-isara-agent-swarm-bet-en","OpenAI backs Isara’s agent-swarm bet","2026-03-28T03:15:27.849766+00:00",{"id":117,"slug":118,"title":119,"created_at":120},"3b0bf479-e4ae-4703-9666-721a7e0cdb91","openai-plan-automated-ai-researcher-en","OpenAI’s plan for an automated AI researcher","2026-03-28T03:17:42.312819+00:00",{"id":122,"slug":123,"title":124,"created_at":125},"fe91bce0-b85d-4efa-a207-24ae9939c29f","harness-engineering-ai-agent-reliability-2026","Harness Engineering: From Bridle to Operating System, The Missing Link in AI Agent Reliability","2026-03-31T06:36:55.648751+00:00",{"id":127,"slug":128,"title":129,"created_at":130},"7a09007d-820f-43b3-8607-8ad1bfcb94c8","mcp-explained-from-prompts-to-production-en","MCP Explained: From Prompts to Production","2026-04-01T09:24:40.089177+00:00",{"id":132,"slug":133,"title":134,"created_at":135},"116d5ee9-a4f1-4b5a-aac5-5d035dd22bbe","amazon-bedrock-agents-multi-agent-workflows-en","Amazon Bedrock Agents Gets Multi-Agent Workflows","2026-04-01T09:30:30.197685+00:00"]