A lightweight knowledge-graph RAG framework and server that indexes documents into entities and relations for retrieval-augmented LLM answers.
microsoft/graphrag
A Python data pipeline that uses LLMs to extract structured knowledge graphs from unstructured text for retrieval-augmented question answering.
- Stars
- 36,391
- Forks
- 3,861
- Open issues
- 57
- Last commit
- yesterday
What is it?
GraphRAG is a modular, graph-based retrieval-augmented generation system from Microsoft Research. It is a data pipeline and transformation suite that uses LLMs to pull structured data, such as entities and relationships, out of unstructured text, and then organizes that data into a graph that can supply targeted context for answering questions over private documents.
The project targets questions about large collections of narrative text, where a plain vector search may miss themes that span many documents. Indexing is the costly step: the project's guidance recommends reading the documentation on the process and costs involved and starting with a small dataset. Prompts generally need tuning for a specific dataset before results are good.
The project is a research effort now in maintenance mode, so it accepts no new features or PRs and only receives bug fixes, dependency updates and security patches. Its code is a demonstration rather than an officially supported Microsoft product.
Key features
- 01Uses LLMs to extract entities and relationships from unstructured text into structured data.
- 02Builds a knowledge graph from extracted data to provide context for question answering.
- 03Provides a command line interface with an init step for generating configuration and prompts.
- 04Includes a prompt tuning workflow for adapting extraction prompts to your data.
- 05Distributed as a Python package on PyPI.
Use cases
- Answering thematic questions over a large private corpus of narrative documents.
- Exploring relationships among people, organizations or events in unstructured text.
- Experimenting with graph-based RAG approaches in research settings.
Quick start
- 1
Follow the command line quickstart in the official docs
- 2
Initialize a project folder with the config format
graphrag init --root [path] --force
Things to know
- The project is in maintenance mode and is not accepting new PRs or features.
- GraphRAG indexing can be expensive, so start with a small dataset.
- The code is a research demonstration and not an officially supported Microsoft product.
- Out-of-the-box results may be weak, so prompts usually need tuning.
Topics
FAQ
- What is graphrag?
- A Python data pipeline that uses LLMs to extract structured knowledge graphs from unstructured text for retrieval-augmented question answering. GraphRAG is a modular, graph-based retrieval-augmented generation system from Microsoft Research. It is a data pipeline and transformation suite that uses LLMs to pull structured data, such as entities and relationships, out of unstructured text, and then organizes that data into a graph that can supply targeted context for answering questions over private documents.
- Is graphrag free to use? What license does it have?
- graphrag is open source under the MIT license. Check the license terms before using it in commercial products.
- Is graphrag still maintained?
- Actively maintained. The last commit to graphrag was on Oct 19, 2026.
- What can I use graphrag for?
- Answering thematic questions over a large private corpus of narrative documents. Exploring relationships among people, organizations or events in unstructured text. Experimenting with graph-based RAG approaches in research settings.
- How do I install graphrag?
- Follow the command line quickstart in the official docs Initialize a project folder with the config format: graphrag init --root [path] --force
- Where can I get graphrag?
- The source code and installation instructions are on GitHub: https://github.com/microsoft/graphrag
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Python framework for building temporal knowledge graphs that track how facts change over time, used as memory and context for AI agents.
A visual platform for building, testing and deploying AI agents and workflows, with built-in API and MCP server exposure.
Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
A memory layer for AI agents and apps that stores and retrieves user, session, and agent context across conversations.
Open-source Python framework for building production-ready LLM applications with modular pipelines and agent workflows for RAG, search and agents.