What is GraphRAG (graph retrieval-augmented generation)?

GraphRAG is a RAG approach that brings a knowledge graph extracted from documents into retrieval-augmented generation, so it can answer when information is spread across many documents or a question concerns the whole collection.

It differs from classic Retrieval-Augmented Generation in what is retrieved: classic RAG fetches passages similar to the question, while GraphRAG also builds a knowledge graph of entities, relations and community summaries for retrieval. It is not better for every question; for simple local ones the extra indexing can be wasted.

Topic
Embeddings, document processing and RAG
Also known as
Graph RAG, graph-based RAG
Origin
2024, Edge et al.

How GraphRAG (graph retrieval-augmented generation) works

  1. Documents are chunked; a language model extracts entities, relations and key claims from each chunk.
  2. These are merged into a graph; communities are detected and a summary is generated for each.
  3. At query time relevant nodes, relations or community summaries are retrieved; local questions use an entity's neighbourhood, global ones use community summaries.
  4. The retrieved information goes to the language model as context to produce an answer or collection summary.

In more detail

Entity resolution and deduplication

Entity extraction across chunks inevitably creates duplicates (such as "ACME Corp." and "ACME") and conflicting relations, so an entity resolution and deduplication step is critical before community detection. Without clean merging, graph connectivity fragments and retrieval quality drops sharply.

Hierarchical community detection and global map-reduce querying

In Microsoft's GraphRAG architecture, communities are organised hierarchically (commonly using the Leiden algorithm) and global queries run via a map-reduce pattern: intermediate answers are scored per community summary and then synthesised into a final response. Choosing the hierarchy level balances detail against token budget and latency.

Newer lower-cost approaches and incremental updates

To curb the heavy LLM indexing cost of classic GraphRAG, current variants such as LazyGraphRAG, DRIFT Search and LightRAG defer or simplify expensive summary generation, combine local neighbourhood walks with global community context or support cheaper incremental graph updates. Production deployments often pair a vector index with a lightweight graph index rather than building full summaries upfront.

Commonly confused terms

TermHow it differs
Knowledge graphA traditional Knowledge Graph relies on a curated, rigid ontology/schema populated via deterministic rules or manual curation; GraphRAG typically uses an LLM to extract open-schema entities, claims and community summaries directly from raw documents.
Agentic RAGAgentic RAG routes queries iteratively across tools and retrieval steps at query time, while GraphRAG structures the knowledge corpus into a graph and community hierarchy ahead of time during indexing (though the two can be combined).

Why GraphRAG (graph retrieval-augmented generation) matters for on-premises AI

It can combine relations spread across many regulations, contracts or reports into one answer and handles questions about a whole collection's themes better than classic RAG. In return, extracting entities and relations and summarising communities needs many language model calls during indexing, so in-house GPU capacity and time are planned ahead. Documents and extracted relations stay in-house; automatically extracted relations should be checked.

ON-PREMISES EXAMPLE

A bank combines credit rules spread across several regulations and instructions in an in-house knowledge graph; inspectors' policy questions get one answer with sources.

Common questions

When does GraphRAG beat classic RAG?

When the answer is spread across many documents or a summary of the whole collection is needed. For questions answered in one document, classic RAG is usually enough.

Why does GraphRAG raise in-house hardware cost?

Extracting entities, relations and community summaries from every chunk needs many language model calls during indexing; the load grows with document count.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, D to L

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.