Chapter 6. Basic GraphRAG Model and Retrieval Patterns
In Chapter 5 we covered the basic construction patterns — the pipeline that takes raw documents and produces a populated graph: representation, parsing, chunking, embedding, linking, and entity/relationship extraction. A populated graph is necessary but not sufficient for GraphRAG; we also need a way to think about the shape of the data in the graph, and efficient ways to retrieve relevant context from it. This chapter covers the two remaining basic pattern categories - graph model and retrieval patterns.
The model decision determines what retrieval can do. A pure Lexical Graph supports retrieval that gathers structural context but cannot answer questions about how concepts relate. An Entity Graph reasons about relationships but loses the citation-friendly document anchoring of the lexical layer. Combined in a Hybrid Graph, multiple strategies are made possible: navigating from documents to the entities they contain, relating documents ...
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