Notes

GraphRAG

Ask a retrieval system what a contract says about termination and ordinary chunk search works fine. Ask it what the recurring themes are across five hundred support tickets and it fails, because the answer is not written down in any single chunk. GraphRAG is the pattern built for the second kind of question.

How it differs from chunk retrieval

Instead of only embedding passages, the indexing pass sends the corpus through a model that extracts entities and the relationships between them, assembling a knowledge graph over the whole collection. The graph is partitioned into communities of densely connected entities, and each community gets its own generated summary. At query time the system can retrieve a neighbourhood of the graph, follow a chain of relationships across separate documents, or answer from the community summaries when the question is about the collection as a whole rather than a passage inside it.

What it buys and what it costs
  • Multi-hop questions become answerable — linking a person to a project to a decision, where no one document holds all three.
  • Global, sense-making queries get a real answer instead of an arbitrary top-k sample.
  • Indexing is the expensive part: entity extraction means at least one model call per chunk, so a large corpus costs real money and hours before the first query runs.
  • The graph goes stale as documents change, and incremental update is harder than re-embedding one chunk.

Microsoft's open-source graphrag package is the reference implementation, with similar property-graph routes in LlamaIndex and Neo4j. It is the right choice when relationships carry the meaning, and overkill when they do not.

GraphRAG indexes a corpus by extracting entities and their relationships into a knowledge graph, clustering it into communities and summarising each, instead of only embedding passages. Retrieval can then traverse relationships across documents or answer from community summaries. This makes multi-hop and whole-corpus questions answerable, which plain top-k chunk search cannot do. The cost is an expensive indexing pass — a model call per chunk — and a graph that is awkward to keep current.

Picture the difference between a pile of newspaper clippings and a detective's pinboard with string connecting the photographs. Ordinary document search gives you the clippings: whichever ones look most like your question. GraphRAG builds the pinboard first. Before any question is asked, it reads everything and notes who is connected to what, then groups those connections into topics. So when you ask something broad — what keeps going wrong in these reports? — it can answer from the whole picture, not from three paragraphs that happened to match your words. Building the board takes time and money; following the string is what you get for it.