A modular graph-based Retrieval-Augmented Generation (RAG) system
open sourceMITself-hostablefree
GraphRAG is Microsoft Research's MIT-licensed Python pipeline that extracts a knowledge graph from unstructured text, clusters it into a hierarchy of communities with the Leiden algorithm, writes a summary report for each community, and answers with global search (over community reports, for whole-corpus questions), local search (around specific entities), DRIFT search or basic vector search. The standard indexing method uses the LLM for entity and relationship extraction, their summaries, optional claims and the reports, and its docs warn indexing can be expensive; FastGraphRAG (--method fast) swaps extraction for NLTK or spaCy noun phrases and co-occurrence and uses the LLM only for community reports, which the docs call much cheaper but noisier. LazyGraphRAG, a later Microsoft Research method whose indexing cost the team puts at the same as vector RAG and 0.1% of full GraphRAG, isn't in this library: Microsoft offers it in Microsoft Discovery and Azure Local. The project is largely in maintenance mode, taking bug fixes and dependency updates but no new features.
Problems it solves
- answer whole-dataset questions like 'what are the main themes across these 5,000 reports' that top-k vector search can't
- summarise a large private corpus into a hierarchy of topic communities an LLM can reason over
- extract entities, relationships and claims from unstructured text into parquet tables
- cut graph indexing cost by extracting noun phrases with spaCy instead of prompting an LLM for every chunk
- build community summaries for a knowledge graph I already have instead of extracting a new one
- tune graph extraction prompts to the entity types of my own domain
- run graph RAG indexing with Gemini or another non-OpenAI model through LiteLLM
- compare global, local, DRIFT and plain vector search answers over the same indexed corpus
- research reference implementation of graph RAG with community reports to benchmark my own pipeline against
Features
- standard indexing: LLM entity, relationship and claim extraction, entity and relationship summaries, community reports
- FastGraphRAG indexing: NLTK or spaCy noun phrases and co-occurrence edges, LLM only for community reports
- Leiden hierarchical community detection
- query methods: global, local, DRIFT and basic search
- bring your own graph: summarise and query existing entity and relationship tables
- prompt tuning for your domain (
graphrag prompt-tune) - LLM access through LiteLLM (100+ models with structured output); separate models for indexing and query
- vector stores: LanceDB (default), Azure AI Search, Azure Cosmos DB
- storage: files, memory, Azure Blob Storage, Azure Cosmos DB
- inputs: text, CSV, JSON, JSONL, parquet, MarkItDown
View 1 more
- CLI: graphrag init, index, query, prompt-tune
Limitations
- Doesn't take new features: Microsoft says the project is largely in maintenance mode, with bug fixes and dependency updates only1
- Doesn't include LazyGraphRAG: Microsoft offers it in Microsoft Discovery and Azure Local; the library has the Standard and Fast methods23
- Doesn't index cheaply by default: standard indexing prompts the LLM for extraction, summaries and community reports, and the docs warn it's expensive13
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what GraphRAG does.
- LightRAG Simple and Fast Retrieval-Augmented Generation
- Graphiti Build real-time knowledge graphs for AI agents
- Cognee The open-source AI memory platform for agents
- LlamaIndex A Python toolkit for building LLM-powered agents over your data
- R2R Agentic Retrieval-Augmented Generation (RAG) with a RESTful API
