Graph RAG

LLM foundationsRetrieval and dataPublished By Simon Budziak

Graph RAG is a retrieval-augmented generation approach that organizes source information as entities and relationships, then retrieves connected facts or graph summaries for a language model. It helps with questions that depend on relationships across many documents rather than one semantically similar passage.

Microsoft’s GraphRAG project extracts a knowledge graph, groups related entities, and generates summaries that can answer local or corpus-wide questions.

A Graph RAG pipeline that extracts entities and relationships from documents, builds communities, retrieves connected evidence, and grounds an answer

Graph RAG makes relationships retrievable, not merely visible in the source text.

How does Graph RAG work?

An indexing pipeline divides documents into text units, extracts entities, relationships, and sometimes claims, then merges repeated descriptions into a graph. Community detection groups densely connected entities, and summarization creates reports at several levels. The index represents both individual facts and broader structures that span many documents.

At query time, the system can retrieve connected entities for a focused question or use community summaries for a corpus-wide question. Embeddings still help match the user’s language to relevant records or text. The selected evidence then enters the model context like any other RAG source.

What can Graph RAG retrieve that vector search misses?

Semantic search is good at finding passages with similar meaning. It is less reliable when an answer depends on several hops, such as which supplier supports a product owned by a division affected by a policy. A graph can traverse the named relationships that connect those facts even when no single passage states the complete answer.

Community summaries also help with questions about themes across a large corpus. Instead of retrieving a few nearby chunks and treating them as representative, the system can inspect summaries derived from clusters of related entities.

Should every RAG system use a graph?

No. Standard RAG or hybrid search is simpler and often sufficient for factual lookup. Graph construction adds extraction cost, indexing time, and new failure modes. Duplicate entities, missing aliases, and invented relationships can make a polished graph less trustworthy than the source documents.

Use Graph RAG when RAG evaluation shows that connected reasoning or corpus-wide synthesis is the real retrieval gap. It is not a substitute for clean source data, permissions, or citations.

How should a team evaluate Graph RAG?

Build questions that require known relationships and compare the graph route with the simplest retrieval baseline. Score whether the needed entities and edges were retrieved, whether the answer follows those edges, and whether every claim maps back to source text. Evaluate entity resolution separately because one duplicated or merged identity can corrupt many answers at once.

Graph RAG is justified by better answers on relationship-heavy questions, not by the sophistication of the diagram. Agentic RAG may decide when to use graph, vector, or keyword retrieval, but the graph itself remains a data model and retrieval strategy.

Frequently asked questions

How is Graph RAG different from ordinary RAG?

Ordinary RAG usually retrieves similar text chunks. Graph RAG can traverse explicit relationships or retrieve summaries built from communities of connected entities.

When is Graph RAG worth the extra work?

It is useful when answers require multi-hop relationships, corpus-wide themes, entity resolution, or connections that a nearest-neighbor text search repeatedly misses.

Summarize this page with

Train your team to build this