What if the answer to your question is spread across forty documents, and no single document contains it?
That is the problem graph RAG was built to solve. Standard retrieval-augmented generation (RAG) is excellent at finding passages that look like the question. It is much weaker at the kind of question that requires stitching together facts from all over a corpus. Graph RAG swaps the flat pile of text chunks for a knowledge graph, a network of entities and the relationships between them, and then lets a large language model (LLM) reason over that structure.
This guide explains how graph RAG works, where it beats plain RAG, what it costs, and the mistakes teams make when they try it.
What Is Graph RAG?
Graph RAG is a retrieval-augmented generation approach that pulls relevant entities and relationships from a knowledge graph and feeds them to an LLM as context, instead of relying only on vector-similarity text chunks.
The term gets used loosely for two different things, and that ambiguity causes real confusion:
| Sense of “graph RAG” | What it means | Typical example |
|---|---|---|
| Graph-structured indexing | An LLM builds a graph from the corpus, then summarizes and retrieves from it | Microsoft’s GraphRAG method |
| Graph-database retrieval | A pipeline queries an existing graph (via Cypher or SPARQL) and passes results to an LLM | Enterprise knowledge-graph assistants |
Both are legitimate. They are not the same architecture, though, and a team that buys a graph database expecting Microsoft-style global summaries will be disappointed. Define which sense you mean before you start building.
Why Plain RAG Hits a Wall

Vector search works by embedding text chunks and finding the ones closest to the query embedding. It is fast, cheap, and surprisingly good at local questions: “What is the refund window?” or “Who owns the billing service?”
It struggles with global questions, the kind that need information from across an entire corpus. A question like “What are the main themes in these 3,000 support tickets?” has no locally similar passage. The answer is distributed. Retrieve the top ten chunks and you get ten fragments, not a synthesis.
Microsoft Research framed this gap directly in a February 2024 paper, “From Local to Global: A Graph RAG Approach to Query-Focused Summarization.” The method builds an entity graph from the corpus, pre-generates summaries of graph communities, and answers sensemaking questions by map-reduce over those summaries. The motivation is explicit: baseline RAG returns only locally similar passages, so it cannot connect information across a whole corpus.
How the Graph RAG Pipeline Works
Microsoft’s method runs in four stages. Understanding them is the fastest way to grasp why the approach costs what it costs.
- Entity and relationship extraction. An LLM reads the whole corpus and pulls out entities, relationships, and claims. This is not a regex pass; it is a full LLM read of every chunk.
- Community detection. The resulting graph is clustered into hierarchical communities using the Leiden algorithm, a widely used method for finding densely connected groups in networks.
- Community summarization. The LLM writes a summary for each community, at each level of the hierarchy.
- Query-time retrieval. Global search runs map-reduce over community summaries. Local search does entity-centric retrieval, starting from entities matching the query and walking their neighborhood.
The hierarchy matters. High-level communities give broad themes; low-level communities give specifics. A good implementation lets the query decide which level to consult.
Global Search vs. Local Search
The two search modes answer different questions, and picking wrong is a common failure.
| Mode | Best for | How it works | Weakness |
|---|---|---|---|
| Global search | Corpus-wide themes, “what are the main…” questions | Map-reduce over community summaries | Slow and token-heavy per query |
| Local search | Specific entity questions, “who/what/where” | Entity lookup plus graph neighborhood | Misses corpus-wide patterns |
A practical rule: if the question could be answered by one well-placed paragraph, use local search or plain vector RAG. If it needs a survey of everything, use global search. Teams that route every query through global search burn money on questions that a $0.001 embedding lookup would have handled.
Where Graph RAG Genuinely Wins
Graph RAG earns its overhead in a few specific situations.
Multi-hop questions. “Which suppliers are affected by the regulation that changed last quarter?” requires chaining supplier → component → jurisdiction → regulation. A graph walks that chain; vector search has to get lucky.
Sensemaking over large corpora. Theme extraction from thousands of documents, root-cause analysis across incident reports, literature review. These are the queries the Microsoft paper targets.
Explainability requirements. When a stakeholder asks “why did the model say that?”, a graph path is a far better answer than “these five chunks had high cosine similarity.”
Entity-centric domains. Legal, biomedical, financial, and supply-chain data are naturally graph-shaped. If your data already has entities and relations, the graph is half-built.
The Cost Problem Nobody Mentions First
Graph indexing is expensive. The LLM must process the entire corpus to extract entities, then process it again (in summarized form) to write community summaries. Indexing cost scales with corpus size and is typically far higher than embedding-only indexing.
That has a direct consequence: graph RAG is a poor fit for corpora that change hourly. If your documents churn constantly, you will be re-indexing constantly. Most successful deployments target relatively stable corpora, or they re-index on a schedule (weekly, monthly) and accept staleness.
Query cost is the second surprise. Global search fans out across many community summaries, so a single query can consume far more tokens than a vector lookup. Budget for it before you promise a chatbot to the whole company.
Evaluation Caveats Worth Knowing
The headline results in the original paper come from LLM-judged win rates on comprehensiveness and diversity. That is not human evaluation, and it is not a standard QA benchmark. Treat the reported improvements as preliminary and directional rather than settled.
This matters practically. If you are building a business case, run your own evaluation on your own questions. LLM-as-judge is a reasonable screening tool, but a small human-rated test set on 50 real queries will tell you more than any published win rate. (Blog)
Common Mistakes in Practice
These show up again and again in real projects.
Skipping the definition step. Teams argue about architecture for weeks because half the room means “graph database queries” and half means “Microsoft-style community summaries.” Write the definition down on day one.
Indexing everything. A common instinct is to graph the entire document store. In practice, scoping to one domain (contracts, or incident reports, or product docs) cuts indexing cost dramatically and improves extraction quality, because the LLM sees consistent entity types.
Ignoring entity resolution. The same company appears as “Acme Corp,” “ACME,” and “Acme Corporation.” Without deduplication, your graph fragments and multi-hop retrieval quietly fails. Budget real effort here.
No hybrid fallback. The best systems route: simple lookups to vector search, entity questions to local graph search, corpus-wide questions to global search. Pure graph RAG for every query is expensive and often worse than a hybrid.
Treating the graph as ground truth. LLM extraction makes mistakes. Build a review path for high-stakes entities, or at least sample and measure extraction precision.
Practical Tips That Actually Work
Start small. Pick 200 to 500 documents in one domain, build the graph, and test twenty real questions before scaling. The failure modes surface fast at small scale and cheaply.
Measure extraction quality separately from answer quality. If entities are wrong, no amount of clever retrieval will save the answers. Sample 50 extracted relationships and check them by hand.
Keep the graph schema light. Over-engineered ontologies slow extraction and confuse the LLM. A handful of entity types and relation types usually outperforms a 40-class taxonomy.
Log the graph paths used for each answer. This is your debugging tool and, later, your explainability feature.
Re-index on a schedule, not on every document change. Batch updates keep costs predictable. (RDF 1.1 Concepts and Abstract Syntax (W3C))
How Graph RAG Fits With Other Approaches
Graph RAG is not the only answer to RAG’s limits. Alternatives include LightRAG, a 2024 preprint that proposes a lighter-weight graph-based retrieval scheme, and graph-retriever integrations in frameworks like LangChain and Neo4j. Agentic RAG, where a model issues multiple retrieval calls and decides when to stop, is another route to multi-hop answers.
The honest comparison: agentic RAG adds latency and unpredictability but requires no indexing investment. Graph RAG front-loads cost into indexing and gives you fast, structured, explainable retrieval afterward. For a stable corpus with recurring global questions, the graph usually wins on query cost. For a fast-changing corpus with mostly local questions, it usually does not. (Cloud)
For teams tracking how these architectures evolve alongside cloud infrastructure and deployment patterns, the news and cloud sections are worth following as the tooling matures. (News)
Conclusion
Graph RAG is best understood as a targeted fix rather than a universal upgrade. It shines when questions require connecting facts across a whole corpus, when multi-hop reasoning matters, and when you need to show your work. It costs more to build, more to index, and more to query than plain vector RAG, and it is a poor fit for corpora that change by the hour.
The teams that get value from it tend to do three things: they define which sense of “graph RAG” they mean, they scope the corpus tightly, and they route queries to the cheapest method that can answer them. Do that, and the graph becomes a genuine capability rather than an expensive experiment.
Frequently Asked Questions
What is the difference between graph RAG and normal RAG?
Normal RAG retrieves text chunks by vector similarity and passes them to an LLM. Graph RAG retrieves entities and relationships from a knowledge graph, or summaries of graph communities, and passes those instead. The practical difference is that graph RAG can answer questions requiring information from many documents at once, while normal RAG tends to return locally similar fragments.
Does graph RAG always beat standard RAG?
No. Graph RAG wins on global, multi-hop, and sensemaking questions. On simple lookups, plain vector RAG is cheaper, faster, and often just as accurate. Most production systems use a hybrid, routing each query to the retrieval method best suited to it.
Why is graph RAG so expensive to build?
Because an LLM must read the entire corpus to extract entities and relationships, then read summarized versions again to write community summaries. Indexing cost scales with corpus size and is typically far higher than embedding-only indexing. Query cost is also higher for global search, which fans out across many summaries.
What is the Leiden algorithm used for in graph RAG?
Leiden is a community-detection algorithm that groups densely connected nodes in a network. In Microsoft’s pipeline it clusters the entity graph into a hierarchy of communities, which the LLM then summarizes. Those summaries are what global search reads at query time.
Can I use graph RAG with an existing knowledge graph?
Yes, and it is often cheaper than building one from scratch, since you skip the extraction stage. You query the graph (for example with Cypher or SPARQL), pass the results to the LLM, and let it compose the answer. This is the second, looser sense of the term graph RAG, and it is a different architecture from Microsoft-style community summarization.
How should I evaluate whether graph RAG is working?
Build a test set of 50 real questions from your users and rate the answers by hand. Measure entity-extraction precision separately by sampling extracted relationships. Published win rates based on LLM judging are a useful starting signal but should not replace your own evaluation on your own data.







