Community detection groups entities that connect more densely with one another than with the rest of a graph. In GraphRAG, these clusters expose themes and higher-level relationships that individual entity links miss. section 7.2.4 section 7.4
A practical workflow is:
- Run Louvain on the entity-relationship graph and store each detected community as a node property. section 7.2.4
- Generate a summary for each community from its nodes and relationships, then persist the summary for retrieval. section 7.2.4
- Use community summaries for broad thematic or global search, while local search combines vector similarity with graph traversal. section 7.4
Interpreting detected clusters
In a narrative such as The Odyssey, a community might gather characters connected to one event or location. Results depend on graph structure and can vary between Louvain runs; smaller graphs may use one level instead of the full hierarchy. section 7.2.4
Figure 7.3 Example of community detection results
Inspect the clustered graph to compare densely connected groups, integrated communities, and isolated subgraphs. section 7.2.4



