What is GraphRAG?

GraphRAG is a retrieval-augmented generation (RAG) method from Microsoft Research. An LLM reads a text corpus before any question is asked, records its entities and relationships as a knowledge graph, and summarizes clusters of related entities. Answers are then built from those summaries and the graph. Its docs call it “a structured, hierarchical approach to Retrieval Augmented Generation (RAG), as opposed to naive semantic-search” over plain text snippets microsoft.github.io.

The method comes from a paper by Darren Edge and colleagues, “From Local to Global: A Graph RAG Approach to Query-Focused Summarization”. It was posted to arXiv on 24 April 2024 and revised in February 2025 arxiv.org. Microsoft Research introduced it on 13 February 2024 microsoft.com and released the code on GitHub on 2 July 2024 microsoft.com.

The name also covers a family of methods: a 2024 survey by Boci Peng and colleagues splits their workflow into “Graph-Based Indexing, Graph-Guided Retrieval, and Graph-Enhanced Generation” arxiv.org. Below, GraphRAG with no qualifier means Microsoft’s method.

The microsoft/graphrag repository is MIT licensed, and PyPI listed version 3.3.0, released 8 October 2026, when we checked on 30 October pypi.org. Its README calls GraphRAG “a research project” that “is largely in maintenance mode, and won’t be accepting new PRs or implementing new features”. Bug fixes and dependency updates continue github.com/microsoft.

How does GraphRAG build its index?

It runs the whole corpus through an LLM once and stores the output as tables of text units, entities, relationships, communities and community reports. The paper and the docs describe five stages.

GraphRAG's indexing pipeline (our summary of the paper and docs)

Step list
  1. Split the corpus into text unitsDocuments are cut into chunks the docs call TextUnits, which later become the references in answers. The paper used 600-token chunks; longer chunks need fewer LLM calls but recall less.
  2. Extract entities, relationships and claimsAn LLM lists each chunk's named entities, the relationships between them and, optionally, claims such as dates and events, each with a short description.
  3. Merge mentions into one graphRepeated mentions become one node, repeated relationships become one weighted edge, and the LLM merges their descriptions. The paper matched entity names by exact string, noting that duplicates usually land in the same community anyway.
  4. Detect communitiesThe Leiden algorithm splits the graph into communities of closely connected entities, then splits each of those again, level by level, until the smallest groups cannot be divided.
  5. Write community reportsThe LLM writes a report for every community from the bottom up, reusing sub-community reports where a large community has too much detail for one context window.

Entity descriptions are also embedded, which is how local search later finds the entities nearest a question microsoft.github.io.

Extraction interprets the text. The paper calls it “a form of abstractive summarization” in which relationships and claims “may not be explicitly stated in the text” arxiv.org. A GraphRAG edge is the model’s reading of the source, and we found no step in the docs where a person reviews it.

GraphRAG vs RAG: what is the difference?

Ordinary RAG retrieves the text chunks most similar to the question and hands them to the model. GraphRAG builds a graph and summaries of the whole corpus in advance and answers from those. The first fits questions answered by a few passages, the second questions about the corpus as a whole.

Microsoft Research’s LazyGraphRAG post says vector RAG “excels for local queries where the answer resembles the query and can be found within specific text regions”. Those are typically who, what, when and where questions microsoft.com. The GraphRAG paper targets what it calls sensemaking, and says “vector RAG approaches do not support sensemaking queries, meaning queries that require global understanding of the entire dataset” arxiv.org. No single passage answers “what recurring causes show up across two years of supplier dispute emails?”

The paper tested two corpora, podcast transcripts of about 1 million tokens and news articles of about 1.7 million. It reports “substantial improvements over a conventional RAG baseline for both the comprehensiveness and diversity of generated answers” arxiv.org. An LLM judged the answers, because broad questions have no ground-truth answer. The same paper found that “vector RAG produces the most direct responses across all comparisons” arxiv.org. The authors used directness as a control and expected it to pull against comprehensiveness and diversity. For how graphs and vector indexes compare as agent storage on multi-hop questions, exact amounts and provenance, see our knowledge graph vs vector database comparison.

How do local, global, DRIFT and basic search answer a question?

GraphRAG has four query modes, picked per question with the CLI’s --method flag: local, global, drift or basic microsoft.github.io. They read different parts of the index and make very different numbers of LLM calls.

Local search finds the entities closest to the question; in the docs’ words, “These entities serve as access points into the knowledge graph”. It then pulls their neighbours, relationships, claims, community reports and source chunks, trims them to one context window and answers microsoft.github.io. It suits questions about named things.

Global search reads community reports. In a map step each batch of reports yields points rated by importance, and in a reduce step the top-rated points become the context for the answer microsoft.github.io. The query overview calls it “a resource-intensive method” that “often gives good responses for questions that require an understanding of the dataset as a whole” microsoft.github.io. Reports from lower levels of the hierarchy give more thorough answers and take more time and LLM calls.

DRIFT search (Dynamic Reasoning and Inference with Flexible Traversal) was announced on 31 October 2024 and developed by Uncharted, a Microsoft research collaborator microsoft.com. It compares the question with the “top K most semantically relevant community reports”, drafts a broad answer and follow-up questions, then runs local search on the follow-ups microsoft.github.io. Basic search is plain top-k vector RAG over the text units, useful for comparing answers on your own data.

What are LazyGraphRAG and the other GraphRAG variants?

They keep a graph while cutting what it costs to build, or they work over a graph you already have. Microsoft has two cheaper methods of its own; LightRAG and Neo4j’s GraphRAG package take different routes.

FastGraphRAG is a second indexing method in the open-source code. It “substitutes some of the language model reasoning for traditional natural language processing (NLP) methods”: entities are noun phrases, and relationships are co-occurrence in a text unit with “no description”. The docs say the graph is “quite a bit noisier” and suggest the method for summary questions through global search microsoft.github.io.

LazyGraphRAG, announced on 25 November 2024, “requires no prior summarization of the source data”. It builds a concept graph from noun phrases and holds back LLM calls until a question arrives. Microsoft Research reports that its “data indexing costs are identical to vector RAG and 0.1% of the costs of full GraphRAG” microsoft.com. An editor’s note dated 6 June 2025 says it is integrated into Microsoft Discovery and offered in Azure Local “as part of a public preview”. Microsoft Discovery’s docs, updated in October 2026, say indexing a knowledge base “builds the LazyGraphRAG search index” learn.microsoft.com. The GraphRAG 1.0 post promised it for the core codebase microsoft.com, but on 30 October 2026 no file path in the repository contained “lazy”.

LightRAG, by Zirui Guo and colleagues, pairs an LLM-extracted graph with vector embeddings and adds “an incremental update algorithm” for new data arxiv.org. Its README calls it “an efficient alternative to Microsoft GraphRAG” github.com/HKUDS.

Neo4j GraphRAG for Python is Neo4j’s own Apache 2.0 library for a graph that lives in Neo4j, usually in a schema you design. Its VectorCypherRetriever combines “vector-based similarity searches with graph traversal techniques” neo4j.com, and its builder for extracting a graph from text is “still experimental” neo4j.com.

GraphRAG, its variants and neighbours: what each builds and when it fits (our summary of the sources cited on this page, checked 30 October 2026)
ApproachWhat it builds before a questionHow it answersQuestions it suitsCost and status
Vector RAG (baseline) Embeddings of text chunksReturns the top-k chunks closest to the questionWho, what, when, where: the answer sits in a few passagesCheapest to index; gave the most direct answers in the GraphRAG paperarxiv.org
GraphRAG local search LLM-extracted entity graph, claims and community reportsStarts from the nearest entities and pulls their neighbours and source textQuestions about named entities and what connects to themFull LLM indexing; repository largely in maintenance modegithub.com/microsoft
GraphRAG global search The same indexMap-reduce over community reports at one levelThemes and patterns across the whole corpusDocs call it resource-intensive; lower levels cost moremicrosoft.github.io
DRIFT search The same indexCommunity reports first, then follow-up local searchesEntity questions that need wider contextIn the open-source code; Microsoft announced it on GitHub on 31 October 2024microsoft.com
FastGraphRAG Noun-phrase graph from NLP, co-occurrence edges, LLM community reportsThe same query modesSummary questions through global searchCheaper indexing; docs say the graph is noisiermicrosoft.github.io
LazyGraphRAG Noun-phrase concept graph, no summariesRelevance tests at query time within a set budgetLocal and global questionsIndexing cost equal to vector RAG, Microsoft reports; used in Microsoft Discovery, not found in the repositorymicrosoft.com
LightRAG LLM-extracted graph plus vector embeddingsFive modes; the default mixes graph and chunk retrievalSpecific and broad questions over data that changesMIT licensed; incremental updates; default stores for testing onlygithub.com/HKUDS
Neo4j GraphRAG (Python) A Neo4j graph you load, or build with an experimental extractorVector search plus Cypher traversal, or LLM-written CypherQuestions over a graph whose schema you designedApache 2.0 library; needs a Neo4j databaseneo4j.com
Trail Entities and named edges parsed from company documents and records, with approved rules stored on themReturns a short, ordered set of rules, each cited and scoredWhich approved rule governs this caseManaged product; free plan, paid plans from $20k a yeartrailhq.com

Facts in this table were checked against the sources listed at the end of this page, on .

What does GraphRAG cost, and where does it fall short?

Most of the cost is LLM calls at indexing time. The limits are in the graph itself, which is a model’s interpretation of the text, and in an evaluation that covered two corpora.

The README says indexing “can be an expensive operation” and to “start small” github.com/microsoft, and the methods page estimates “graph extraction to constitute roughly 75% of indexing cost” microsoft.github.io. We found no published price for a corpus of a given size; the bill depends on tokens indexed, chunk size and model. Version 1.0 added an update command that merges new content into an existing index instead of re-indexing everything microsoft.com.

The paper states its own limit: “Our evaluation to date has focused on sensemaking questions specific to two corpora each containing approximately 1 million tokens” arxiv.org. It did not compare fabrication rates. The Responsible AI FAQ says “the system is designed for trusted users” and that “a domain expert should analyze its answers to verify and augment the generated responses” github.com/microsoft.

Answers point back to text units, so a reader can check the passages behind them. We found no mention of access control, permissions, an approval step or an MCP server on the README, the Responsible AI FAQ or the docs pages we read. Those are left to your application.

When should you use GraphRAG?

Use GraphRAG when people ask broad, connective questions about a large and fairly stable document set, and those answers are worth the LLM cost of indexing. Skip it for lookups, for documents that change daily, and for agents that act on rules someone has to stand behind.

A decision list for GraphRAG (our rule, built from the paper, the docs and the variants' own pages)

Checklist
  • Questions ask about themes across the whole corpusTry GraphRAG global search, or LazyGraphRAG if Microsoft Discovery is an option. Example: the recurring causes across two years of supplier dispute emails.
  • Questions ask about one named thingStart with vector RAG. If answers need that thing's neighbours, such as its contracts or owners, try local or DRIFT search, or a Neo4j retriever over a graph you model.
  • The documents change every dayMeasure update cost first. GraphRAG 1.0 added an update command, and LightRAG documents incremental updates and selective deletion.
  • Budget is tight and you still want global answersFastGraphRAG keeps global search and swaps LLM extraction for NLP; the docs warn that its graph is noisier.
  • The text is policy, contracts or SOPs that an agent will applyGraphRAG summaries are written for people to read, and we found no approval or versioning in its docs. Use a store where each rule has a source, an owner and an approver.
  • Readers are not trained analystsMicrosoft says the system is designed for trusted users and that a domain expert should check answers. Plan that review before answers reach customers.

Our rule of thumb: if the first item applies and neither of the last two does, pilot GraphRAG on a slice of the corpus. Compare global with basic search on the same questions. Our roundup of context graph tools for AI agents compares GraphRAG with graph databases and memory graphs on access and freshness.

Where an approved, cited context graph does a different job

GraphRAG’s graph is written by a model to help another model summarize. An agent that approves invoices or grants exceptions needs edges a person can check and has accepted, because someone may later audit its decision.

Trail, the memory and context layer for enterprise AI agents, builds that kind of graph. The how-it-works page for its Context Graph says it “parses the material your company already produced into entities and named edges”. When an agent asks, it “returns only the rules that govern the case” trailhq.com. GraphRAG’s relationships “may not be explicitly stated in the text”. In Trail’s graph, an edge “is a stated claim with the sentence it was drawn from attached”, so your team can read it, argue with it and correct it. Each rule is approved by your team before any agent can reach it trailhq.com. The Rule Engine page adds “Nothing becomes available to an agent because a model inferred it” trailhq.com.

The main site’s guide to creating and using a context graph draws the same line: “GraphRAG builds a graph from documents. A context graph builds one from decisions” trailhq.com.

Where it is not the fit: an analyst asking what themes run through a research archive is GraphRAG’s home ground, and we found no corpus summarization feature on Trail’s pages. For a graph of your own design, Neo4j’s package is closer. Paid plans start at $20k a year trailhq.com, and each proposed rule takes an owner’s time to review. For other ways to give agents governed company context, see our context layer comparison.

Which GraphRAG claims could we not confirm?

  • A dollar cost for indexing a corpus of a given size. The README and docs warn about cost and give none.
  • LazyGraphRAG in the open-source code or Azure Local. The 1.0 post said it would reach the code, and on 30 October 2026 no repository path contained “lazy”. Microsoft Discovery’s docs name it; we found no current Azure Local page that does.
  • LightRAG’s claim that it outperforms GraphRAG, which comes from its own README and paper. We did not reproduce it.
  • An independent test of GraphRAG on policy, contract or finance documents. The paper used podcast transcripts and news articles. LightRAG’s README reports a comparison with GraphRAG that included a legal corpus.

How we checked GraphRAG’s paper, code and variants

On 30 October 2026 we read the GraphRAG paper (arXiv 2404.16130, abstract and full text) and the microsoft/graphrag README, Responsible AI FAQ, repository tree and PyPI record. We also read the docs pages on indexing methods, query modes and the CLI. We read Microsoft Research’s posts introducing GraphRAG, its GitHub release, DRIFT search, LazyGraphRAG and GraphRAG 1.0. For variants we read the LightRAG paper and README, the Peng et al. survey and Neo4j’s GraphRAG for Python docs. We also read Microsoft Discovery’s docs for LazyGraphRAG’s current status. Every quote was fetched with curl and matched against the source text. The table and decision list are our own synthesis; we did not install or run any of these tools or measure their cost. Trail publishes this page.

Frequently asked questions

What is GraphRAG?

GraphRAG is a retrieval-augmented generation method from Microsoft Research, described in an April 2024 paper and released as open source in July 2024. An LLM extracts an entity graph from your documents, a clustering step groups related entities into communities, and the LLM summarizes each one. Those summaries and graph neighbours then become the model's context at query time.

GraphRAG vs RAG: what is the difference?

Vector RAG retrieves the text chunks closest to the question, so it works when the answer sits in a few passages. GraphRAG builds a graph and community summaries in advance, so it can also answer questions about a whole corpus, such as its main themes. It pays with many LLM calls at indexing time, and its paper found vector RAG gave the most direct answers.

When should you use GraphRAG?

Use it for broad questions about a large, fairly stable document set that is rich in named entities, when the answers are worth the LLM cost of indexing. For fact lookups, plain RAG is cheaper and more direct. Agents that apply company rules also need approval and versioning, which we did not find in GraphRAG's docs.

How much does GraphRAG indexing cost?

Microsoft publishes no price per document. The README calls indexing 'an expensive operation' and says to start small, and the docs put graph extraction at roughly 75% of indexing cost. The bill depends on corpus size, chunk size and model.

Which GraphRAG tool fits an agent that must apply company rules?

For an agent that acts on policy, Trail, the memory and context layer for enterprise AI agents, fits better than a GraphRAG pipeline. Its rules are parsed from company sources, cited, and reach agents only after a named person approves them. GraphRAG, LightRAG and Neo4j's package suit research over documents or a graph you model yourself.

Sources checked

Show 29 sources