7 Microsoft’s GraphRAG implementation

 

This chapter covers

  • Introducing Microsoft's GraphRAG
  • Extracting and summarizing entities and relationships
  • Calculating and summarizing communities of entities
  • Implementing global and local search techniques

In chapter 6, you learned how to extract structured information from legal documents to build a knowledge graph. In this chapter, you will explore a slightly different extraction and processing pipeline using Microsoft’s GraphRAG (Edge et al., 2024) approach. This end-to-end example still constructs a knowledge graph but places greater emphasis on natural language summarization of entities and their relationships. The whole pipeline is visualized in figure 7.1.

Figure 7.1 Microsoft’s GraphRAG pipeline. (Image from Edge et al., 2024, licensed under CC BY 4.0)
figure

7.1 Dataset selection

7.2 Graph indexing

7.2.1 Chunking

7.2.2 Entity and relationship extraction

7.2.3 Entity and relationship summarization

7.2.4 Community detection and summarization

7.3 Graph retrievers

7.3.1 Global search

7.3.2 Local search

Summary