GraphRAG explained: entity graphs, community summaries, LightRAG and indexing cost
GraphRAG turns documents into a graph of entities and relationships, then answers from neighbourhoods or community summaries. This guide builds a toy graph in Python, compares Microsoft GraphRAG with LightRAG, prices indexing, and explains Microsoft's move to maintenance mode.
- Reading time
- 14 min
- Sections
- 7
- Code examples
- 2
- Tables
- 2
- Sources
- 8
- Published
- 24 Nov 2026
- What changed
- Microsoft GraphRAG moves to maintenance mode
- Why it matters
- GraphRAG is a specialist tool, not a replacement for plain RAG.
- What to do
- Check whether your questions are global
Standard retrieval-augmented generation (RAG) is good at questions whose answer sits in one or two passages. It is poor at questions whose answer is spread across a whole collection: "What are the main risks raised across all these incident reports?" or "How are these suppliers connected?" Top-k retrieval returns a handful of chunks and misses the pattern.
GraphRAG attacks that gap by building structure first. A language model reads every chunk, extracts entities and the relationships between them, and the system assembles a knowledge graph. It then groups the graph into communities of closely linked entities and writes a summary for each. At query time it can answer from a local neighbourhood of the graph or from the community summaries. Microsoft Research popularised the approach in 2024, and LightRAG, a lighter open-source alternative, is now among the most active projects in the area. This autumn the two diverged clearly: Microsoft put its library into maintenance mode, while LightRAG kept shipping. This article explains how GraphRAG works, builds a toy graph in runnable Python, compares the two projects and prices the indexing step that makes or breaks the approach.
An analogy: plain RAG is a search engine over index cards. GraphRAG is a detective's wall of photos connected by string, with a sticky note on each cluster saying what that cluster is about. The wall takes a long time to build, but some questions can only be answered by looking at it.
What happened
Microsoft GraphRAG moves to maintenance mode (23 September 2026)
The PyPI description of graphrag 3.2.0, released on 23 September 2026, carries a new warning that was not in 3.1.0 (28 May 2026). It says GraphRAG "is a research project", that "this project is largely in maintenance mode, and won't be accepting new PRs or implementing new features", and that the team will "perform bug fixes and dependency updates as appropriate, particularly to address CVEs". The notice explains that frontier model capabilities "have changed dramatically" since the first release in July 2024. The repository guidance also repeats that the code "serves as a demonstration and is not an officially supported Microsoft offering" and warns that "GraphRAG indexing can be an expensive operation".
GraphRAG 3.3.0 adds bulk cache reads (8 October 2026)
Maintenance does not mean silence. The changelog for 3.3.0, released on 8 October 2026, adds bulk cache reads with bounded, connection-reusing SQLite queries, after 3.2.0 added a concurrency-safe SQLite cache provider. Earlier in the 3.0 line the project removed its NetworkX dependency in favour of DataFrame-based graph utilities and added streaming to several indexing workflows. A 1.2.4 patch for the older line followed on 20 October.
LightRAG 1.5.8 released (23 November 2026)
LightRAG released 1.5.8 on PyPI on 23 November 2026, after two release candidates. Its README lists five query modes (local, global, hybrid, naive and mix, with mix as the default), role-specific model settings for extraction, query, keyword and vision steps added in May 2026, merged multimodal parsing via MinerU or Docling, and selectable chunking strategies. The README's guidance on models is telling: entity extraction "runs on every text chunk", so it recommends a fast, non-thinking model for that step.
How GraphRAG works
Indexing: from chunks to a graph
- Chunk the documents, as in any RAG pipeline.
- Extract entities (people, organisations, products, concepts) and relationships from every chunk with an LLM prompt. Each relationship keeps a pointer to its source chunk.
- Merge duplicates: the same entity mentioned in many chunks becomes one node, and its descriptions are summarised.
- Detect communities: group densely connected entities. Microsoft GraphRAG uses the hierarchical Leiden algorithm, giving communities at several levels, from broad to fine.
- Summarise communities: an LLM writes a report for each community describing its entities, relationships and key claims.
- Embed entity descriptions, chunks and reports for later retrieval.
Querying: local versus global
Local search starts from entities named or implied in the question, walks to their neighbours, and gathers the relationships, entity descriptions and source chunks around them. It is good for "who, what, how connected" questions about specific things.
Global search answers from the community reports. In Microsoft's design it works map-reduce style: each relevant report produces a partial answer, and a final step combines them. It is built for "what are the main themes" questions over a whole corpus, which the GraphRAG paper by Edge and colleagues (arXiv 2404.16130) calls query-focused summarisation.
LightRAG (Guo and colleagues, arXiv 2410.05779) simplifies the design. Instead of hierarchical community reports, it uses dual-level retrieval: low-level keywords find specific entities (its local mode), high-level keywords find broader relationship themes (its global mode), and hybrid and mix modes merge these with ordinary chunk retrieval. It also supports incremental updates and, since August 2025, document deletion with automatic graph regeneration, according to its README.
For how graphs fit with other grounding methods, see the RAG and grounding topic. The GraphRAG simulation animates extraction, communities and both query paths; the GraphRAG tool page collects the key concepts.
A toy graph in Python
The script builds a small graph from triples of the form (head, relation, tail, source chunk), the shape an LLM extraction step emits. It then finds communities and runs a one-hop local search. It needs only pip install networkx.
import networkx as nx
triples = [
("Acme Pumps", "supplies", "Nordheat", "c1"), ("Nordheat", "installs", "HP-9 heat pump", "c2"),
("HP-9 heat pump", "uses", "R290 refrigerant", "c2"), ("R290 refrigerant", "regulated by", "EU F-gas rules", "c3"),
("Acme Pumps", "manufactures", "HP-9 heat pump", "c1"), ("EU F-gas rules", "phase down", "R410A refrigerant", "c3"),
("Lena Ortiz", "leads", "Nordheat", "c4"), ("Lena Ortiz", "previously worked at", "Acme Pumps", "c4"),
("Billing team", "owns", "Invoice service", "c5"), ("Invoice service", "depends on", "Payments API", "c5"),
("Payments API", "hosted on", "Cluster East", "c6"), ("Sam Lee", "leads", "Billing team", "c6"),
("Cluster East", "monitored by", "SRE team", "c7"), ("SRE team", "on call for", "Payments API", "c7"),
]
G = nx.DiGraph()
for h, r, t, c in triples:
G.add_edge(h, t, relation=r, chunk=c)
comms = nx.community.louvain_communities(G.to_undirected(), seed=42)
for i, c in enumerate(sorted(comms, key=len, reverse=True)):
print(f"community {i}: {sorted(c)}")
def local_context(entities, hops=1):
nodes = set(entities)
for _ in range(hops):
nodes |= {n for e in nodes for n in nx.all_neighbors(G, e)}
edges = G.subgraph(nodes).edges(data=True)
return sorted({(a, d["relation"], b, d["chunk"]) for a, b, d in edges}, key=lambda x: x[3])
for fact in local_context(["Lena Ortiz"]):
print(fact)
The graph has 13 entities and 14 relationships. Louvain, a close cousin of the Leiden algorithm GraphRAG uses, finds four communities:
| Community | Entities | What a summary would say |
|---|---|---|
| 0 | Acme Pumps, HP-9 heat pump, Lena Ortiz, Nordheat | Heat pump supply chain and its people |
| 1 | EU F-gas rules, R290 refrigerant, R410A refrigerant | Refrigerant regulation |
| 2 | Cluster East, Payments API, SRE team | Payments infrastructure and operations |
| 3 | Billing team, Invoice service, Sam Lee | Billing ownership |
A local search for "Lena Ortiz" returns three facts with their sources: Acme Pumps supplies Nordheat (chunk c1), Lena Ortiz previously worked at Acme Pumps (c4), and Lena Ortiz leads Nordheat (c4). A question such as "Is there a conflict of interest between Nordheat's leadership and its supplier?" needs exactly that combination, and it spans two chunks that share no sentence. Plain top-k retrieval might fetch one of them; the graph links them by construction.
A global question, "What areas does this corpus cover?", would be answered from the four community summaries rather than from any chunk. Note also what the graph shows that chunks hide: community 2 and community 3 are joined through the Payments API, so an outage there touches both billing ownership and infrastructure.
What indexing really costs
GraphRAG's weakness is the index build. Every chunk needs at least one LLM extraction call, often more. A worked example for a corpus of one million tokens, with assumptions stated so you can swap in your own:
- chunks of 1,200 tokens with 100 overlap: ceil((1,000,000 − 100) / 1,100) = 909 chunks
- each extraction call: about 2,000 tokens of prompt and examples plus the 1,200-token chunk, and about 500 output tokens
- two passes per chunk (one extraction, one follow-up "gleaning" pass to catch missed entities)
- 200 communities, each summarised from about 4,000 input tokens into 600 output tokens
- an example small-model price of 0.40 dollars per million input tokens and 1.60 per million output tokens
| Step | Input tokens | Output tokens | Cost at example prices |
|---|---|---|---|
| Entity and relationship extraction | 5,817,600 | 909,000 | 3.78 dollars |
| Community summaries | 800,000 | 120,000 | 0.51 dollars |
| Total graph indexing | 6,617,600 | 1,029,000 | 4.29 dollars |
| For comparison: embedding the corpus once at 0.10 dollars per million tokens | 1,000,000 | 0 | 0.10 dollars |
At these assumptions, graph indexing costs about 43 times as much as embedding the same text, and takes thousands of sequential or rate-limited model calls instead of a fast batch job. For a 100-million-token corpus that becomes hundreds of dollars and many hours per full build, before any re-indexing when documents change. Using a stronger model for extraction multiplies the figure. This is why both projects stress cheap, fast, non-thinking models for extraction, why caching extraction results matters (the focus of GraphRAG's recent releases), and why LightRAG emphasises incremental updates.
Continue learning
How this article connects
7 pages link to or from it. Drag to turn, click a dot to open it.
What it means in practice
GraphRAG is a specialist tool, not a replacement for plain RAG. It pays off when questions are about connections and themes across many documents: investigations, research synthesis, supply chains, organisational knowledge, regulatory mapping. It is wasted on questions whose answer sits in one paragraph, where hybrid search with a reranker is faster, cheaper and easier to keep fresh.
Microsoft's maintenance notice changes the risk profile of adopting its library. The code will keep receiving fixes and security updates, but no new features, and Microsoft describes it as a demonstration rather than a supported product. Teams building on it should plan to own the code they depend on. LightRAG is actively developed and integrates storage backends, rerankers and evaluation, which makes it the more natural starting point for new projects, though its fast pace means more change to track.
Graph construction is also useful without "GraphRAG" proper. An entity index, even a simple table of entities with the chunks that mention them, improves local questions and can feed an agent that walks relationships step by step, which is the bridge to agentic RAG.
A practical hybrid is emerging in both projects: keep ordinary chunk retrieval as the backbone and add graph context only where it helps. LightRAG's default mix mode does exactly that, merging entity, relationship and chunk results in one context. The same pattern works in a custom stack: run normal hybrid retrieval, detect entities in the question, fetch their one-hop neighbourhood from a small graph, and pass both to the model with clear labels. You get most of the multi-hop benefit for local questions without paying for community reports, and you can add global summaries later if the questions demand them. For the broader map of where graph methods sit, see the site's RAG types guide and the modular RAG page.
What to do now
- Check whether your questions are global. Collect real questions and label which need corpus-wide synthesis or multi-hop connections; if few do, stay with naive RAG plus reranking.
- Price indexing before building. Count chunks, multiply by extraction prompt and output tokens and by passes, then add community summaries, as in the table above.
- Pilot on a slice. Index 1 to 5 percent of the corpus, inspect the extracted entities by hand, and measure answer quality on your labelled questions.
- Use a fast, non-thinking model for extraction. Both projects recommend it; reserve stronger models for query-time answering.
- Tune extraction prompts to your domain. Microsoft's documentation strongly recommends prompt tuning; define the entity types you care about.
- Plan for updates. Decide how new and deleted documents reach the graph; prefer incremental insertion and cached extraction results.
- Treat Microsoft GraphRAG as a reference implementation. Pin versions, read the maintenance notice, and be ready to maintain any code path you rely on.
- Keep plain retrieval as a fallback. LightRAG's mix mode and similar designs merge graph context with chunk retrieval; do the same in custom builds.
Risks and open questions
Extraction errors become structure. A wrongly merged entity or invented relationship is no longer a bad sentence in one chunk; it is an edge that many answers may traverse. Spot-check the graph.
Cost and time scale with the corpus. As the worked example shows, indexing is tens of times the cost of embedding, and every re-index repeats much of it.
Freshness is hard. Community summaries go stale when member entities change. Recomputing communities and summaries after each update is expensive.
Evaluation is subjective for global questions. "Main themes" answers have no single ground truth; studies often rely on LLM judges comparing comprehensiveness and diversity, which brings judge bias.
Project direction has split. Microsoft's library is in maintenance mode while lighter projects move fast. Long-term support for whichever you choose is not guaranteed.
Watch next: whether long-context models with caching make global summarisation over raw text competitive with community reports, and whether LightRAG's incremental updates hold up on large, fast-changing corpora.
Frequently asked questions
What is GraphRAG in simple terms?
GraphRAG builds a knowledge graph of entities and relationships from your documents with an LLM, groups it into communities and summarises them. It then answers questions from relevant parts of the graph or from those summaries, which helps with questions that span many documents.
When should I use GraphRAG instead of normal RAG?
Use it when many questions are about connections between entities or themes across a whole corpus, such as investigations or research synthesis. For direct factual questions answered in one passage, normal RAG with hybrid search and reranking is cheaper and simpler.
Is Microsoft GraphRAG still maintained?
Yes, but only for bug fixes and dependency and security updates. Since version 3.2.0 in September 2026 its description says the project is largely in maintenance mode and will not accept new pull requests or implement new features.
How is LightRAG different from Microsoft GraphRAG?
LightRAG uses dual-level retrieval over entities and relationships instead of hierarchical community reports, supports incremental insertion and deletion, and offers five query modes including a default mix mode that adds plain chunk retrieval. It is lighter to run and actively developed.
Why is GraphRAG indexing so expensive?
Because an LLM must read every chunk to extract entities and relationships, often more than once, and then summarise every community. In the worked example, indexing one million tokens cost about 43 times as much as embedding them.
Summary
GraphRAG builds an entity and relationship graph from documents with an LLM, detects communities and summarises them, so a RAG system can answer questions about connections and corpus-wide themes that top-k chunk retrieval misses. Local search walks an entity's neighbourhood, as the toy example did to link a manager to a supplier across two chunks; global search answers from community reports. The cost is indexing: in the worked example about 4.29 dollars per million tokens, roughly 43 times plain embedding, plus the work of keeping the graph fresh. This autumn Microsoft put its GraphRAG library into maintenance mode while LightRAG kept shipping new releases. Use graph methods where your questions are truly global or relational, pilot on a slice, and keep plain retrieval alongside.
Sources
- Code PyPI: graphrag project description and release history
- Code GitHub: Microsoft GraphRAG changelog
- Paper arXiv: From Local to Global: A Graph RAG Approach to Query-Focused Summarization (Edge et al.)
- News Microsoft Research: GraphRAG: Unlocking LLM discovery on narrative private data
- Code PyPI: lightrag-hku release history
- Code GitHub: LightRAG README
- Paper arXiv: LightRAG: Simple and Fast Retrieval-Augmented Generation (Guo et al.)
- Paper arXiv: From Louvain to Leiden: guaranteeing well-connected communities (Traag et al.)
Cite this article
Kelahmet, Ö. C. (2026, November 24). GraphRAG explained: entity graphs, community summaries, LightRAG and indexing cost. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/graphrag-entity-graphs-community-summaries-lightrag
BibTeX
@online{kelahmet2026graphrag,
author = {Kelahmet, {\"O}zer Cem},
title = {{GraphRAG explained: entity graphs, community summaries, LightRAG and indexing cost}},
year = {2026},
month = {nov},
url = {https://www.ozercemkelahmet.com/articles/graphrag-entity-graphs-community-summaries-lightrag}
}Version historyfirst version
- Published
Factual corrections are listed here with what changed. Wording and formatting edits are not listed.