Home › Glossary › Systems › GraphRAG

Intermediate · Systems

GraphRAG

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A retrieval-augmented generation variant that builds a knowledge graph from the corpus and retrieves entity- and community-level summaries.

Technical Definition

A retrieval-augmented generation variant that builds a knowledge graph from the corpus and retrieves entity- and community-level summaries.

How it works

GraphRAG (Microsoft, 2024) first uses an LLM to extract entities and relations from documents, then clusters the resulting graph into hierarchical communities and writes a summary for each. At query time it retrieves the most relevant community summaries instead of raw chunks, giving much better answers for global, sense-making questions where vanilla RAG fails because the answer is spread across many documents.

Related Concepts

  • Embedding — A dense vector representation that captures semantic meaning, mapping discrete items like words into continuous mathematical space.
  • Retrieval-Augmented Generation (RAG) — A technique that enhances LLM responses by retrieving relevant documents from an external knowledge base before generating an answer.
  • Knowledge Graph — A structured representation of knowledge as a network of entities and their relationships.