← Back to all projects

GraphRAG

Builds a knowledge graph from your documents so questions about the whole corpus become answerable

OfficialMIT
Stars
36.5k
Forks
3.9k
Open issues
58
Last commit
29 Oct 2026

What is GraphRAG?

Ordinary retrieval finds the chunks most similar to a question, which fails when the answer is not written down in any one chunk — what the main themes are, how two people are connected. GraphRAG instead extracts entities, relationships and claims from every passage, clusters the resulting graph into communities and summarises each one, then answers from those summaries. The price is paid at indexing time: a model runs over every text unit and again over every community, so building the index scales with the size of the corpus, not with how often you query it.

What can you do with GraphRAG?

  • Answer questions no single passage contains — Global search works from the community summaries rather than from retrieved chunks, which is what makes corpus-wide questions — the recurring themes, what changed across a set of reports — answerable at all.
  • Start from an entity and walk outwards — Local search anchors on a specific entity and explores its neighbours and associated concepts, so a question about one person, product or place gathers the scattered mentions instead of the most similar paragraph.
  • Inspect the graph it derived — Indexing produces entities, relationships and claims as data you can look at, so a wrong answer can be traced to a wrong extraction rather than disappearing into an embedding.
  • Summaries at every level of the hierarchy — The Leiden clustering method groups the graph into communities and the summaries are generated bottom-up, giving both a fine-grained and a whole-corpus view from the same index.
  • Tune the extraction to your domain — The prompts that decide what counts as an entity or a claim are meant to be adapted; the documentation treats prompt tuning as part of setup rather than an optimisation to do later.

Before you choose GraphRAG

  • A model runs over every text unit during extraction and again over every community during summarisation, so index-building cost tracks the size of the corpus rather than the number of questions you will ask it.
  • The documentation frames it as the answer where baseline retrieval struggles to connect the dots; for straightforward lookups in a modest corpus, ordinary retrieval remains the cheaper and simpler choice.

Star history

21 Aug to 30 Oct · +884

35.6k36.5k

Frequently asked questions

Is GraphRAG free for commercial use?

GraphRAG is released under the MIT licence — OSI-approved open source, which permits commercial use.

How can GraphRAG be deployed?

GraphRAG is available as Self-hosted / Runs locally.