Graph RAG

Plain vector RAG retrieves isolated chunks by similarity — it can't connect facts across documents or reason over relationships. Graph RAG builds a knowledge graph of entities and their relationships, then retrieves by traversing it. This unlocks multi-hop reasoning and global, whole-corpus questions that vector search alone can't answer.

💡 In one line: Graph RAG retrieves over a knowledge graph of entities and relationships, enabling multi-hop and whole-corpus reasoning.

The Problem It Solves

Vector RAG finds similar chunks, but it struggles to:

  • Connect facts spread across multiple documents.
  • Do multi-hop reasoning ("who is the CEO of the company that acquired X?").
  • Answer global / summary questions ("what are the main themes across all documents?").

These need structure and relationships, not just similarity.

What is Graph RAG?

Graph RAG retrieves over a knowledge graph: nodes are entities or concepts, and edges are the relationships between them. Instead of fetching lone chunks, it traverses the graph to gather connected context — often alongside vector search.

How It Works

Whiteboard
Whiteboard diagram



Indexing extracts entities and relations (usually with an LLM) to build the graph; retrieval finds relevant entities and traverses to connected context.

Local vs. Global Search

  • Local search — entity-focused questions: traverse the neighbourhood of the relevant entities.
  • Global search — whole-dataset / theme questions: use hierarchical community summaries built over the graph.

This local/global split was popularised by Microsoft GraphRAG.

Why It Works

Because relationships are explicit, the system can follow chains of reasoning ("the company that acquired X → its CEO"). Community summaries give a global view of the corpus. The result is more connected — and more explainable (you can trace the path) — than similarity alone.

Microsoft GraphRAG

The best-known implementation: an LLM builds an entity-relationship graph, clusters it into communities, and generates summaries at multiple levels — then answers with local (entity) or global (summary) search.

Trade-offs

  • Expensive to build — LLM extraction over the whole corpus means many calls, cost, and time.
  • Complex, with graph maintenance and updates to manage.
  • Overkill for simple factoid Q&A.

When to Use It

  • Interconnected knowledge and relational / multi-hop queries.
  • Global / summary questions across a corpus.
  • Research, investigations, and enterprise knowledge bases.
  • Often used hybrid — graph plus vector search together.

Summary

  • Graph RAG retrieves over a knowledge graph (entities + relationships), not just chunks.
  • It enables multi-hop reasoning and global questions that vector RAG can't handle.
  • Indexing extracts entities/relations; retrieval traverses the graph for connected context.
  • Local search handles entities; global search uses community summaries.
  • It's powerful but costly to build — best for complex, relational knowledge, often hybrid with vector search. EOF echo created