GraphRAG lets an AI assistant answer questions about a large collection of your own documents, such as years of customer emails or project reports. Before anyone asks anything, an AI model reads all the text and maps the people, organisations and places in it and how they connect. That map helps with questions no single document answers, such as "What do customers complain about most?"
Where does GraphRAG come from?
Microsoft Research introduced GraphRAG in a blog post in February 2024 and described it in a paper by Edge et al. (April 2024). The code has been on GitHub since July 2024; the paper also lists versions for LangChain, LlamaIndex, NebulaGraph and Neo4j. In August 2026 Microsoft put the repository largely in maintenance mode and stopped adding features.
Why is plain RAG not enough?
Plain RAG (retrieval-augmented generation) turns the question into an embedding and fetches the passages closest to it in meaning. Microsoft names two kinds of questions where that falls short. The first requires connecting facts that sit in different documents and are linked only by a shared name. In Microsoft's demo on news articles, plain RAG could not say what the movement Novorossiya had done, because none of the passages it retrieved mentioned it. GraphRAG found the name in its graph and answered with references to the sources. The second kind is about the whole collection, such as "What are the main themes in the dataset?". Nothing in that question points to a particular passage.
How does it work?
GraphRAG first builds an index, as its documentation describes:
- It splits the documents into small text units.
- A large language model extracts the entities in each unit (by default people, organisations, places and events), their relationships and key claims. Together they form a knowledge graph.
- A clustering algorithm called Leiden groups closely connected entities into communities, at several levels.
- The model summarises each community, from the bottom up.
For a question about the whole collection, global search has the model write a partial answer from each batch of community summaries and then combine them. Local search starts from the entities named in the question and follows their connections.
What did the research show?
Edge et al. tested GraphRAG on two collections of about one million tokens each, podcast transcripts and news articles, with questions about the collection as a whole. A second language model judged pairs of answers. Against plain RAG, GraphRAG's answers were judged more comprehensive in 72 to 79% of the comparisons and more diverse in 62 to 81%, depending on the collection and the level of the graph. Plain RAG gave the most direct answers. The authors did not measure how often either method makes things up.
Where does it go wrong?
- Cost. Building the graph means a language model reads all the text. The README warns that indexing "can be an expensive operation" and advises starting small; for the podcast collection it took 281 minutes with GPT-4 Turbo. Microsoft's LazyGraphRAG (November 2024) skips the summaries up front and indexes at 0.1% of the cost of full GraphRAG.
- Tuning. According to the README, GraphRAG may not give the best results on your data out of the box, and Microsoft strongly recommends tuning its prompts.
- Overkill. For who, what, when and where questions whose answer sits in one passage, Microsoft writes that plain vector RAG does well.
Example
Suppose an installation company has five years of service reports. "What is the warranty on boiler model X?" suits plain RAG: one passage holds the answer. "Which faults keep coming back, and with which suppliers?" does not, because the answer is spread over hundreds of reports. GraphRAG has linked products, suppliers and faults across all reports in advance, so the model can answer from its summaries and name the reports behind them. New reports have to be indexed too, at the cost of more model calls.
Sources
- Edge et al. (Microsoft Research): From Local to Global, a Graph RAG Approach to Query-Focused Summarization (2024)arXiv
- Microsoft Research: GraphRAG, Unlocking LLM discovery on narrative private dataRSS
- Microsoft: GraphRAG repository and READMEGitHub
- Microsoft: GraphRAG documentationWeb
- Microsoft Research: LazyGraphRAG, Setting a new standard for quality and costRSS
