Chapter 7. Knowledge Graph Construction
In Chapter 4 we established that a knowledge graph is a logical construct first, and only then an implementation. That distinction is not just terminological or academic. It determines whether your knowledge graph becomes a purposeful part of the retrieval architecture, or just an artefact you produce “because GraphRAG demands it”. The graph is only valuable to the extent that it improves RAG.
This chapter is about construction, but not in the traditional “how to load data into a graph database” sense. It’s about the kinds of construction choices that make GraphRAG systems behave in a predictable, explainable and governable way. You need to build the right graph for the system you’re building, and in this case this means that the structures in the KG will match the retrieval strategies you plan to use in it.
Sometimes that means loading business entities and relationships into the graph (closer to traditional graph construction). Sometimes it means building ...
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