Chapter 8. Agentic GraphRAG
The code for this chapter is in the
code/ch08folder of the companion repository. It builds on the knowledge graph constructed in Chapter 3. See its README for dependency installation and the environment variables the scripts expect. Full step-by-step instructions for building the graph and running the Streamlit chat application are shown in the “Try It Yourself” section at the end of this chapter.
As GenAI systems mature beyond simple question-answering into autonomous decision-making and multi-step reasoning, the demands on retrieval architectures are shifting dramatically. Static retrieval pipelines, even those augmented with knowledge graphs, hit their limits when users ask questions that require planning, decomposition, and iterative exploration of connected information.
Agentic GraphRAG combines the connected retrieval of GraphRAG with an autonomous reasoning loop, enabling the system to decompose questions, decide which tools to call, traverse the graph strategically, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access