This is an early release preview. You may encounter bugs.
GraphRAG logo
Unclaimed

Tool coding

GraphRAG

Pipeline that uses LLMs to build knowledge graphs from unstructured text for retrieval-augmented generation

Built by Microsoft

A 89/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What GraphRAG is.

GraphRAG is a data pipeline and transformation suite that uses LLMs to extract structured data from unstructured text and then uses that structure at query time. Rather than retrieving plain text snippets by semantic similarity, it builds a knowledge graph of entities and relationships from the source documents, groups the graph into a hierarchy of communities, writes a summary for each community, and draws on those summaries and graph neighbourhoods when answering questions. The approach targets questions that span a whole corpus, such as themes across a set of documents, which snippet-based retrieval handles poorly.

The system is driven from the graphrag command-line interface: graphrag init writes a configuration and prompt set, an index step runs the extraction and summarisation dataflow, and query commands run against the indexed output. Query modes include global search over community summaries, local search around specific entities, DRIFT search that combines both, and question generation. Prompt tuning, either automatic from a sample of your data or manual, adjusts the extraction prompts to a domain.

Indexing calls the LLM many times over the corpus and can be costly, so the guidance is to start with a small dataset. The project is a Microsoft Research demonstration in maintenance mode: bug fixes and dependency updates continue, but no new features are planned. Between minor versions, rerun graphrag init --root [path] --force to refresh the configuration format; a migration notebook covers major-version upgrades without re-indexing.

Features

  • Knowledge-graph extraction: LLM prompts pull entities, relationships, and claims out of raw text
  • Community hierarchy: graph clustering produces nested communities, each with an LLM-written summary
  • Global search: answers corpus-wide questions from community summaries
  • Local search: answers entity-centred questions from graph neighbourhoods and source text
  • DRIFT search: combines global community context with local entity traversal
  • Question generation: proposes follow-up questions from the indexed data
  • Prompt tuning: automatic or manual adaptation of extraction prompts to a domain
  • Configurable language models: model selection and detailed settings in the init-generated config
  • Custom graphs: import an existing graph instead of extracting one
  • Notebooks: example notebooks for each search mode

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

03 / Related

More around GraphRAG.

04 / Build

Build with GraphRAG.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get GraphRAG →

Browse the catalogue