esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

What Is GraphRAG?

How GraphRAG builds a knowledge graph and community summaries, when it beats plain RAG, and what it costs, explained simply for your AI interview.

In short

GraphRAG is a form of RAG where an AI model first builds a knowledge graph of the people, places and things in your documents, then writes summaries of groups within it. It handles big-picture questions over a whole collection, at a higher cost to build.

10 min readAdvancedCommon · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

GraphRAG is retrieval-augmented generation with an extra build step. An AI model reads my documents once and builds a knowledge graph of the entities and how they link, then writes a summary for each group of linked entities. For a plain lookup, I'd use ordinary RAG. For a question about the whole collection, like the main complaint themes across 40,000 claim notes, GraphRAG answers from the summaries. The cost is the build, and the graph has to be updated when documents change.

What is GraphRAG, in plain words?

RAG, short for retrieval-augmented generation, means searching your documents for passages that match a question, then giving those passages to an AI model to write the answer. Plain RAG does exactly that.

GraphRAG adds a step first. An AI model reads the documents and builds a knowledge graph: a map of the entities in them, such as people, companies and products, and the links between them. It then writes a short summary for each group of closely linked entities. When a big question comes in, the answer is built from those summaries.

Think of a quality manager at a hospital group who has read every complaint letter this year. She keeps a summary for each ward. Asked for the recurring problems across the group, she reads the ward summaries first, then the few letters that mention delay. The AI version: a claims team with 40,000 notes asks which complaints keep coming back across every region.

Key words

Entity
A thing the map tracks, such as a hospital, a drug or a policy.
Relationship
How two entities connect, such as one hospital supplying another.
Knowledge graph
Entities as dots, with relationships as lines between them.
Community
A group of entities that link to each other closely.
Community summary
A short written overview of one community, written once by the model.

Why does plain RAG struggle with some questions?

Plain RAG is good at finding the passage that answers a narrow question. It is weak when the answer needs pieces scattered across many files, or a view of the whole collection.

  • Narrow question

    One fact, one place

    Who approved the refund on claim 1182? A matching passage holds the answer, so plain RAG does well.

  • Whole-collection question

    The picture across files

    What complaint themes keep coming back across all 40,000 notes? No single passage holds that, so plain RAG grabs a few matches and misses the pattern.

  • “Baseline RAG struggles to connect the dots.”

    Microsoft Research, February 2024

  • “RAG fails on global questions directed at an entire text corpus”

    Edge and colleagues, 2024 paper

How does GraphRAG build its index?

The index is the saved graph and summaries that answers are built from. It is built before questions are asked, and updated when documents change.

  1. 1

    Read and extract

    The model reads each document in chunks (short pieces of text, cut to a set length) and lists the entities and the links between them.

  2. 2

    Build the graph

    The lists join into one knowledge graph. The graph is then split into communities of closely linked entities.

  3. 3

    Summarise each community

    The model writes a summary for each community, working up from small groups to bigger ones that cover them.

  4. 4

    Answer big questions

    For a whole-collection question, the model uses each summary to write a partial answer, then merges them into one reply.

How GraphRAG builds its index

Your documents

40,000 claim notes, made-up numbers

Model reads chunks

lists entities and links

Built before questions

Knowledge graph

entities joined by links

Community summaries

one short summary per group

Model writes answers

partial answers, then one reply

Whole-set answer

themes across every file

  1. 1The model reads your documents in chunks.
  2. 2It lists the entities and the links between them.
  3. 3Linked entities form groups, and each group gets a summary.
  4. 4Each summary feeds a partial answer at question time.
  5. 5The partial answers are merged into one reply.
The model reads the documents and builds a graph of entities and links. Linked entities form communities, and each one gets a summary. For a big question, the summaries feed partial answers that are merged into one reply.

Worked example (made-up numbers): an insurer holds 40,000 claim notes. Plain RAG answers a question about one claim quickly. For the complaint themes across all the notes, the build pass reads everything, so question time runs over the summaries, which are far fewer than the 40,000 notes. The paper's own build is a real case: its Podcast dataset, one of two test corpora of about 1 million tokens each (a token is a small piece of text), became a graph of 8,564 nodes and 20,691 edges.

What does GraphRAG cost, and when is it worth it?

The build is the big cost. Every chunk goes through the model, so indexing means many model calls before the first question is answered. The paper notes that longer chunks need fewer calls for that step, which lowers the cost, but the model misses more details that sit near the start of a chunk.

Upkeep is the second cost. When documents change, the graph and its summaries have to be updated, or answers drift out of date.

The evidence is narrow. The paper's tests cover two corpora of about 1 million tokens each, on big-picture questions. A gain there may not hold for your data.

  • Use GraphRAG when

    Questions span a whole collection, and people ask them often enough to pay for the build.

  • Use plain RAG when

    The answer sits in one passage, or the documents change so often that rebuilding is costly.

  • Measure first

    Test both on real questions from your users before you pay for a graph.

Tip

Asked about cost? Name the build pass and the upkeep, and say when each one happens.

How would you decide between GraphRAG and plain RAG?

  1. 1

    Look at the questions

    Collect real questions from users and sort them: single facts in one place, or whole-collection themes.

  2. 2

    Price the build

    Estimate the model calls to build the graph, and how often the documents change.

  3. 3

    Test both

    Run the same questions through plain RAG and GraphRAG, and have real reviewers score completeness and accuracy.

  4. 4

    Ship the smaller one

    Start with plain RAG. Add a graph only for the question types that plain RAG fails on.

Which tool fits which question

One fact, one place

Refund window question

the answer sits in one policy

Whole-collection question

Main complaint themes

needs all 40,000 notes

Plain RAG

finds the matching passages

GraphRAG

reads the community summaries

Quick answer

one passage is enough

Picture of the set

built from every summary

  1. 1A single fact goes to plain RAG, which finds the matching passage.
  2. 2A whole-collection question goes to GraphRAG, which reads the summaries.
  3. 3Plain RAG gives a quick answer from one passage.
  4. 4GraphRAG gives a picture built from every summary.
Two kinds of question, two tools. Plain RAG is quick for a fact in one place. GraphRAG is for questions about the whole collection, at a higher build cost.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: a graph of entities and links, plus summaries of groups of them.
  • The problem it fixes: plain RAG misses questions about a whole collection.
  • How it is built: the model extracts entities, groups them, and summarises each group.
  • The cost: many model calls to build, and updates when documents change.
  • When not to use it: simple lookups, where plain RAG is enough.
  • Honest evidence: the 2024 results come from specific test sets.

Common traps

  • Trap"GraphRAG is always better than RAG."

    BetterIt wins on big-picture questions in the tests. For a single fact, plain RAG is cheaper and simpler.

  • Trap"It's just a graph database."

    BetterAn AI model builds the graph from text. The community summaries are what answer the big questions.

  • Trap"Build it once and forget it."

    BetterDocuments change. The graph and summaries need updating, which costs time and model calls.

Can you pick the right tool?

Spot the mismatch

A claims help desk of 12 people uses a bot that answers one-policy lookups all day. Which plan is the weakest?

Quick check

Which question suits GraphRAG best?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q137What is agentic RAG?12 min
  2. Q138RAG vs long context: which to use?12 min
  3. Q139How do you keep the index fresh?11 min
  4. Q141What is contextual retrieval?Coming soon
  5. Q133What are common RAG failure modes?11 min

Learn it in depth

Last updated on 26 November 2026

Building a question-answer system over a big document set?

I design and build AI systems and agents, including the retrieval behind them. Book a short call and tell me what your documents are and what questions people ask.