Chapter 3. Better Answers with GraphRAG
The code for this chapter is in the
code/ch03folder of the companion repository. It builds on the data you loaded in Chapter 2. See its README for dependency installation and the environment variables the scripts expect.
In this chapter we continue to follow OMG Consulting as it transforms its basic vector-search based assistant — one that helps them manage their employee skills and assignments — into a knowledge-graph-augmented retrieval system using GraphRAG. Through their story, we’ll uncover the practical steps, technical architecture, and mindset shift needed to move from text-chunks to connections, and from isolated facts to contextual insights.
Note
As in the previous chapter, we’re not using any framework or library for the RAG and GraphRAG implementation here — frameworks evolve quickly, and we want the underlying mechanics to stay visible.
While OMG’s initial RAG chatbot was promising at first, the basic RAG system Sara Patel’s staffing team ...
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