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 提供高性能的 Rust 实现,用于基于图的 Retrieval Augmented Generation。它允许用户从非结构化文档构建知识图谱,并使用自然语言进行查询,利用图结构更好地捕获实体之间的关系和概念连接,克服传统 RAG 的局限。
How it works
项目实现了七阶段流水线:索引(分块、实体抽取、关系抽取和图构建)以及查询(嵌入、检索和答案生成)。支持三种部署架构:传统的仅服务器部署、使用 WebGPU 与 ONNX Runtime Web 的 100% 客户端 WASM 实现,以及计划中的混合方式。为提升检索质量,集成了 LightRAG 双层检索、Leiden 社区检测和 HippoRAG 个性化 PageRank 等研究技术。
Who it’s for
它面向构建隐私优先应用、离线工具或需要高性能索引和检索复杂互联数据的可扩展企业 RAG 系统的开发者。
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.