GraphRAG

Active
GitHub Python MIT

Description

A modular graph-based Retrieval-Augmented Generation system by Microsoft that uses LLMs to extract structured knowledge graphs from text, enabling global and local community summarization queries.

Key Features

  • Knowledge Graph Construction — Auto-extract entities and relations from unstructured text using LLMs
  • Community Detection & Summarization — Leiden algorithm-based graph community detection with hierarchical summaries
  • Global Queries — Answer cross-document reasoning questions via community summaries
  • Local Queries — Graph-structure retrieval for entity-specific questions with related context
  • Tunable Prompts — Prompt tuning guide for optimizing extraction and query quality on custom datasets
  • Modular Pipeline — Separated indexing, community detection, and query engines for independent scaling

Use Cases

💡 Private Document Q&A — Global reasoning across enterprise contracts, reports, and emails
💡 Research Report Analysis — Extract relationship networks from academic papers, answer cross-literature questions
💡 Legal Compliance Review — Build knowledge graphs from regulations for cross-reference compliance queries
💡 Medical Literature Mining — Extract disease-drug-gene relations from clinical research for drug discovery
💡 Competitive Intelligence — Extract company relationship networks from news and reports

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (35.8k stars)
  • Permissive open-source license (MIT)
  • Established track record (2 years in production)

Categories

Quick Start

pip install graphrag
graphrag init --root ./my-project
graphrag index --root ./my-project
graphrag query --root ./my-project --method global --query "What are the main themes?"

Related Projects

KAG

9.0k · Python
Stale B

KAG is a logical form-guided reasoning and retrieval framework based on OpenSPG engine and LLMs for building logical reasoning and factual Q&A solutions for professional domain knowledge bases, effectively overcoming the limitations of traditional RAG vector similarity models.

knowledge-graphragreasoning +2
  • · Bidirectional knowledge-text indexing: KG nodes cross-reference original text chunks for complete context preservation
  • · Logic form-guided hybrid reasoning: transforms natural language into formal logical inference combining exact match, text retrieval, numerical computation, and semantic reasoning
  • · Schema-constrained knowledge construction: supports both free-form information extraction and structured domain expert knowledge representation

LightRAG

39.3k · Python
Active A+

LightRAG is a simple and fast Retrieval-Augmented Generation framework using graph-enhanced retrieval, published at EMNLP 2025.

raggraphretrieval +2
  • · Graph-enhanced retrieval — Dual-level retrieval (local/global) using knowledge graph entities and relationships, more precise than vector search
  • · Four text chunking strategies — Fixed, Recursive, Vector, and Paragraph chunking adapted to different document types
  • · Multi-backend storage — Neo4j, PostgreSQL, MongoDB, OpenSearch, JSON KV Store and other storage backends supported

RAG Techniques

29.3k · Jupyter Notebook
Active A+

NirDiamant's RAG_Techniques repository systematically collects and demonstrates cutting-edge retrieval-augmented generation techniques and engineering practices.

ragretrievaltechniques +2
  • · Systematic taxonomy — techniques organised by simple / advanced / modular levels for targeted learning
  • · Runnable notebooks — every technique ships with a Jupyter notebook and minimal runnable code
  • · Evaluation & comparison — retrieval quality and answer quality evaluation scripts with visualisation

R2R

8.0k · Python
Stale B

A production-ready Agentic RAG system with RESTful API, featuring multimodal document ingestion, hybrid search, knowledge graph construction, and agent-driven retrieval-augmented generation workflows.

ragretrievalknowledge-graph +3
  • · Production-ready Agentic RAG system with RESTful API for retrieval-augmented generation workflows
  • · Multimodal document ingestion supporting .txt, .pdf, .json, .png, .mp3 and more formats
  • · Hybrid search combining semantic and keyword search with reciprocal rank fusion

Related Articles