MCPcopy Index your code
hub / github.com/microsoft/graphrag

github.com/microsoft/graphrag @v3.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.0 ↗ · + Follow
2,206 symbols 10,399 edges 571 files 1,793 documented · 81% 15 cross-repo links updated 14d agov3.1.0 · 2026-05-28★ 34,19643 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GraphRAG

👉 Microsoft Research Blog Post

👉 Read the docs

👉 GraphRAG Arxiv

PyPI - Version PyPI - Downloads GitHub Issues GitHub Discussions

Overview

The GraphRAG project is a data pipeline and transformation suite that is designed to extract meaningful, structured data from unstructured text using the power of LLMs.

To learn more about GraphRAG and how it can be used to enhance your LLM's ability to reason about your private data, please visit the Microsoft Research Blog Post.

Quickstart

To get started with the GraphRAG system we recommend trying the command line quickstart.

Repository Guidance

This repository presents a methodology for using knowledge graph memory structures to enhance LLM outputs. Please note that the provided code serves as a demonstration and is not an officially supported Microsoft offering.

⚠️ Warning: GraphRAG indexing can be an expensive operation, please read all of the documentation to understand the process and costs involved, and start small.

Diving Deeper

Prompt Tuning

Using GraphRAG with your data out of the box may not yield the best possible results. We strongly recommend to fine-tune your prompts following the Prompt Tuning Guide in our documentation.

Versioning

Please see the breaking changes document for notes on our approach to versioning the project.

Always run graphrag init --root [path] --force between minor version bumps to ensure you have the latest config format. Run the provided migration notebook between major version bumps if you want to avoid re-indexing prior datasets. Note that this will overwrite your configuration and prompts, so backup if necessary.

Responsible AI FAQ

See RAI_TRANSPARENCY.md

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Privacy

Microsoft Privacy Statement

Core symbols most depended-on inside this repo

get
called by 193
packages/graphrag-cache/graphrag_cache/cache.py
get
called by 59
packages/graphrag-llm/graphrag_llm/templating/template_manager.py
encode
called by 44
packages/graphrag-llm/graphrag_llm/tokenizer/tokenizer.py
create_storage
called by 37
packages/graphrag-storage/graphrag_storage/storage_factory.py
write_dataframe
called by 37
packages/graphrag-storage/graphrag_storage/tables/table_provider.py
read_dataframe
called by 35
packages/graphrag-storage/graphrag_storage/tables/table_provider.py
open
called by 35
packages/graphrag-storage/graphrag_storage/tables/table_provider.py
num_tokens
called by 32
packages/graphrag/graphrag/index/text_splitting/text_splitting.py

Shape

Method 1,034
Function 794
Class 370
Route 8

Languages

Python100%
TypeScript1%

Modules by API surface

tests/unit/indexing/test_create_communities.py51 symbols
tests/unit/vector_stores/test_filtering.py44 symbols
tests/unit/indexing/test_finalize_graph.py44 symbols
packages/graphrag-vectors/graphrag_vectors/filtering.py41 symbols
tests/integration/vector_stores/test_lancedb.py33 symbols
tests/unit/indexing/operations/embed_text/test_embed_text.py27 symbols
tests/unit/config/utils.py26 symbols
packages/graphrag/graphrag/config/defaults.py25 symbols
packages/graphrag-storage/graphrag_storage/tables/cosmos_table_provider.py25 symbols
tests/unit/indexing/test_cluster_graph.py22 symbols
packages/graphrag-vectors/graphrag_vectors/cosmosdb.py22 symbols
tests/unit/indexing/operations/test_extract_graph.py21 symbols

Dependencies from manifests, versioned

aiofiles24.1 · 1×
altair5.3 · 1×
azure-core1.32 · 1×
azure-cosmos4.9 · 1×
azure-identity1.25 · 1×
azure-search-documents11.5 · 1×
azure-storage-blob12.24 · 1×
blis1.0 · 1×
devtools0.12 · 1×
graphrag2.5.0 · 1×
graphrag-cache3.1.0 · 1×
graphrag-chunking3.1.0 · 1×

Datastores touched

testclearDatabase · 1 repos
testdatabaseDatabase · 1 repos
test_dbDatabase · 1 repos
testchildDatabase · 1 repos
testfindDatabase · 1 repos

For agents

$ claude mcp add graphrag \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact