Overview
Pre-generating executive summaries across macro and micro thematic clusters, so 'global' questions don't require reading everything at answer-time.
Why it matters
Chunk-based RAG is built to answer local questions — 'what does clause 4.2 say?' — by finding the one or two chunks that contain the answer. It fails badly on global questions like 'what are the overarching themes across these 500 documents?', because no single chunk (or even top-20 chunks) contains a corpus-wide summary — that information only exists in aggregate, across thousands of chunks the LLM can never fit in one prompt.
Hierarchical community summaries fix this by doing expensive synthesis offline, once, instead of live for every query. After community detection (previous lesson) has grouped entities into clusters, an LLM is run once per community to write a short summary of what that cluster is about — and communities are typically organised at multiple levels: fine-grained 'micro' communities (a handful of tightly related entities) roll up into coarser 'macro' communities (broad topical areas), much like a table of contents has chapters and sub-sections.
At query time, a global question no longer needs to touch raw text at all: the retriever can pull the small number of macro-level summaries, and only drill down into micro-summaries or raw chunks if the query needs specifics. This is the key trade: pay the LLM synthesis cost once, offline, amortised across every future query, instead of paying it (and the latency) fresh on every request.
