GraphRAG implementation for simpler, faster knowledge graphs
Top 15.6% on sourcepulse
This project provides a lightweight and hackable implementation of GraphRAG, designed for developers and researchers seeking a simpler alternative to existing complex frameworks. It offers core GraphRAG functionality with a focus on modularity, portability, and ease of customization, enabling faster iteration and integration into various RAG applications.
How It Works
nano-graphrag constructs a knowledge graph from text, enabling more sophisticated retrieval than traditional RAG. It extracts entities and relationships to build this graph, allowing for both "global" (whole-graph) and "local" (context-specific) searches. This approach aims to improve relevance and context understanding by leveraging structured knowledge, with a design prioritizing small code size (around 1100 lines excluding tests/prompts) and asynchronous operations.
Quick Start & Requirements
pip install -e .
(from source, recommended) or pip install nano-graphrag
(from PyPI).Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project does not implement the "covariates" feature found in the original GraphRAG. Its global search implementation differs by using only the top-K important and central communities, rather than a map-reduce style across all communities.
1 week ago
1 day