A community is a group of graph entities with denser internal connections than connections to the rest of the graph. Detecting communities reveals themes, groups, and higher-level relationships that individual entity links may miss. section 7.2.4
Use communities in a GraphRAG indexing and retrieval workflow:
- Apply the Louvain algorithm to identify densely connected groups and store each community as a node property. section 7.2.4
- Generate a domain-specific summary from each community’s nodes and relationships, then persist the summary for downstream retrieval. section 7.2.4
- Use community-, entity-, and relationship-level summaries to support global and local search in RAG applications. section 7.0
Narrative communities
In a narrative such as The Odyssey, a community might group characters involved in a particular event or location. A small graph run detected nine communities ranging from two to thirteen nodes; results can vary because Louvain is nondeterministic. section 7.2.4
Figure 7.1 Microsoft’s GraphRAG pipeline. (Image from Edge et al., 2024, licensed under CC BY 4.0)
Trace the pipeline from entity and relationship extraction through community detection, summarization, and retrieval. section 7.0



