Zenaique

What is GraphRAG and which kind of question is it built for?

Flashcard·Easy·4.0 · 0·~30s·Asked atContextual AiCrestaMckinsey
Attempt it
TL;DR

GraphRAG turns a corpus into an entity-relationship graph, clusters it into communities, and pre-summarizes each — so it can answer global "what are the themes?" questions that top-k vector RAG can't.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine a giant pile of meeting notes and someone asks "what were the big themes this whole quarter?" Plain search just hands you the few sticky notes that mention the exact words you typed — useless for a question that needs the whole pile. GraphRAG does prep work ahead of time instead. It reads everything, draws a map of who talked to whom and what connects to what, groups that map into neighborhoods of related stuff, and writes a short summary for each neighborhood. Now when the big-picture question arrives, it reads those neighborhood summaries instead of hunting for matching words. The downside: drawing the map and writing all those summaries takes a lot of reading up front, so it is slow and pricey to build.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

GraphRAG shows up in interviews as the answer to a question vanilla RAG keeps failing: "what are the big themes across this whole corpus?" If you have ever watched a top-k pipeline confidently return five chunks and miss the point of an aggregative question, you have felt the gap GraphRAG fills.

The goal here is to make the mechanism concrete and to be honest about the price. GraphRAG is not magic and it is not cheap. It moves a pile of reasoning work from query time to index time, and whether that trade pays off depends entirely on the kind of questions your users actually ask.

Why top-k retrieval structurally can't answer global questions

Standard RAG embeds chunks and, per query, returns the k chunks whose embeddings are nearest the query embedding. That is a local operation by design — it surfaces the passages most similar to what you typed.

For "what is the refund window," that is perfect: the answer sits in one passage, retrieval finds it, the LLM reads it back. For "what are the recurring themes across all 4,000 support tickets," it falls apart. There is no single chunk that contains the themes. The answer is an emergent property of the whole collection.

The instinct to raise k doesn't help. Bumping k from 5 to 50 just stuffs more locally-similar chunks into the context window — more of the same neighborhood, not a representative sample of the corpus, and you blow the context budget while still missing the global picture. The limit is not the size of k; it is that similarity search retrieves by local proximity, and a corpus-wide theme has no single location to be proximate to.

The offline pipeline: graph, communities, summaries
Local versus global query modes at runtime
The cost trade-off and when it's worth paying
How a global question gets answered end to end
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Microsoft's open-source GraphRAG project is the canonical implementation of entity-graph plus community-summary retrieval.
  • Sensemaking over incident-report or research-paper collections, where users ask for cross-document themes, not single facts.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow does GraphRAG's global query mode actually combine community summaries into one answer?
A

Describe the map-reduce: query each relevant community summary for a partial answer, score the partials, then reduce them into a final synthesized response.

1 more follow-up an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Thinking a bigger k fixes global questions. No value of k makes top-k synthesize a corpus-wide theme — the answer lives in no single chunk, so you need a precomputed structure, not more chunks.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • The offline GraphRAG pipeline: extract entities and relationships into a graph

  • Why community detection and summarization are the enabling steps

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Which metric best measures whether a RAG answer is grounded in the retrieved context?
MCQ·Medium