liveBook · Manning

Community detection

As explained in Essential GraphRAG

Community detection is the analysis of a graph to identify groups of entities with relatively dense internal connectivity.

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
figure

Inspect the clustered graph to compare densely connected groups, integrated communities, and isolated subgraphs. section 7.2.4

How Essential GraphRAG covers it

How deep it goes
Explains Louvain detection, persistence, summarization, variability, and single-level use, while deferring hierarchical treatment for larger graphs.
Examples
Uses an Odyssey character-and-location scenario, clustered-graph visualization, and persisted community summaries.
What it assumes
Assumes an extracted entity-relationship graph and teaches community formation and summarization within that pipeline.
What you can do after
Builds community-aware GraphRAG retrieval by detecting clusters, summarizing them, and storing results for global search.
How it connects
Connects entity extraction, relationship summarization, graph indexing, global search, local search, and knowledge representation.

Also explained in

Compare how 4 books explain community detection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Essential GraphRAG. The section links point to the parts of the book it draws on.