automataIA/graphrag-rs
GraphRAG-rs is a high-performance, state-of-the-art Rust implementation of GraphRAG (Graph-based Retrieval Augmented Generation) that builds knowledge graphs from documents and enables natural language querying with configurable entity extraction and local LLM integration
What it solves
GraphRAG-rs provides a high-performance Rust implementation of Graph-based Retrieval Augmented Generation. It allows users to build knowledge graphs from unstructured documents and query them using natural language, overcoming the limitations of traditional RAG by leveraging graph structures to better capture relationships and conceptual connections between entities.
How it works
The project implements a 7-stage pipeline: indexing (chunking, entity extraction, relationship extraction, and graph construction) and querying (embedding, retrieval, and answer generation). It supports three deployment architectures: a traditional server-only setup, a 100% client-side WASM implementation using WebGPU and ONNX Runtime Web, and a planned hybrid approach. To improve retrieval quality, it integrates research-based techniques such as LightRAG dual-level retrieval, Leiden community detection, and HippoRAG personalized PageRank.
Who it’s for
It is designed for developers building privacy-first applications, offline tools, or scalable enterprise RAG systems that require high-performance indexing and retrieval of complex, interconnected data.
Highlights
- Flexible Deployment: Supports Server-Only, WASM-Only (browser-based), and Hybrid architectures.
- Research-Driven: Implements state-of-the-art techniques like Symbolic Anchoring, Causal Chain Analysis, and Cross-Encoder Reranking.
- Hardware Acceleration: GPU acceleration via WebGPU and support for local LLMs via Ollama.
- Extensible Chunking: Includes trait-based strategies, including hierarchical chunking and Tree-sitter AST chunking for code.
- Broad Provider Support: Compatible with 8 different embedding providers including OpenAI, HuggingFace, and Cohere.