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.