skillfed

graphrag

GraphRAG: A graph-based retrieval-augmented generation (RAG) system.

graphrag v3.1.1 85.1K downloads/30d#13,947 on PyPI35,499
Permissive license MIT Active released

What it is and what it does

GraphRAG is a data pipeline and transformation suite from Microsoft Research that converts unstructured narrative text into structured knowledge graphs using LLM reasoning. It is designed to enhance retrieval-augmented generation (RAG) systems by giving LLMs a memory structure—a graph of entities and relationships—that helps them reason more accurately over private or domain-specific data.

The system takes raw text as input, uses LLMs to extract entities, relationships, and hierarchical summaries, and builds a queryable knowledge graph. This graph can then be queried to retrieve relevant context for LLM prompts, improving answer quality and reasoning over complex documents. The package includes a command-line interface and Python API, depends on Azure cloud services for some deployments, and requires careful tuning of prompts and configuration for best results. The documentation warns that indexing can be costly and recommends starting small and reading the full documentation before large-scale use.

Use it for:

  • Extract structured knowledge from large document collections (research papers, internal wikis, legal contracts) to enable semantic search and reasoning.
  • Build a queryable entity-relationship graph from narrative text to support question-answering systems over private data.
  • Enhance RAG systems with hierarchical summaries and relationship context to improve LLM reasoning on complex multi-document queries.
  • Organize and index domain-specific corpora (medical records, technical documentation, news archives) for downstream LLM applications.
  • Prototype knowledge graph construction pipelines where LLM-driven extraction replaces manual annotation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

GraphRAG extracts structured knowledge graphs from unstructured text using LLMs, enabling retrieval-augmented generation (RAG) systems to reason more effectively over private data.

Yes, if you need to build a graph-based RAG system over unstructured text and are willing to invest in prompt tuning and cost management. The package is actively maintained, has no known vulnerabilities, and is backed by Microsoft Research. The 25 dependencies and indexing costs are real trade-offs; start with the documentation and a small dataset to validate the approach before scaling. Not recommended if you need a lightweight, zero-configuration RAG solution.

Install

graphrag on PyPI

pip

pip install graphrag

uv

uv add graphrag

poetry

poetry add graphrag

Installing graphrag

Before you install

Low friction install with a pure-Python wheel. Active maintenance (last commit 2026-08-14, 27 days since release). Requires 25 runtime dependencies including Azure cloud SDKs, NLP libraries (spacy, nltk), and data processing tools (pandas, networkx); this is a substantial dependency footprint but all are established packages.

License in practice

MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute GraphRAG freely provided you include the license notice.

Quickstart

pip install graphrag

from graphrag.index import run_pipeline_async
import asyncio

await run_pipeline_async(root_dir="./your_data")

Requires Python 3.11 or later (supports 3.11, 3.12, 3.13). Indexing operations can be expensive; review documentation on costs and start with small datasets. Azure credentials may be needed depending on your storage and LLM provider configuration.

Verify before relying

  • Whether the 25 runtime dependencies are all required for basic usage or if some are optional for specific features.
  • Specific LLM provider integrations supported beyond Azure (e.g., OpenAI, local models).
  • Performance characteristics and typical indexing time/cost for datasets of different sizes.
  • Whether prompt tuning is mandatory for acceptable results on typical datasets or optional for refinement.

Package facts

License MIT (permissive)
Python support supports the current Python release (<3.14,>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 25 — azure-identity, azure-search-documents, azure-storage-blob, blis, devtools, graphrag-cache, graphrag-chunking, graphrag-common, graphrag-input, graphrag-llm, graphrag-storage, graphrag-vectors, graspologic-native, json-repair, networkx, nltk, numpy, pandas, pyarrow, pydantic, spacy, textblob, tqdm, typer, typing-extensions
Maintenance actively maintained — 27 days since the last release
Last repo commit
First released
Downloads 85,127/month — #13,947 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: graphrag-3.1.1-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

knowledge graph extraction from textllm-powered rag systemstructured data from unstructured textgraph-based retrieval augmented generationknowledge graph memory for llmssemantic data pipelinetext to knowledge graph
knowledge-graphrag-systemllm-pipeline

More Artificial Intelligence packages

Further reading