The Problem

Retrieval-Augmented Generation (RAG) is powerful, but most implementations are either glued together Python scripts with questionable performance or SaaS products that lock you into their stack. Need a knowledge graph from your documents? Want to query it using natural language? Oh, and maybe you'd like to run it locally, in your browser, or scale it up to production servers? Good luck. Most solutions fall apart the second you need fine-grained control or care about performance.

What This Does

GraphRAG-rs is a Rust implementation of RAG that actually respects your need for speed, modularity, and deployment flexibility. It's split into several components: The core logic lives in graphrag-core/, handling entity extraction, knowledge graph creation, and query pipelines. For folks who hate setup, the graphrag-cli/ provides a command-line interface to run queries, test embeddings, or benchmark pipelines. Want to see it in action? Check out examples/graphrag-leptos-demo/ for a WASM-based browser app or examples/multidocumentpipeline.rs for a server-side pipeline.

It supports three deployment modes: a traditional server (cargo run --bin graphrag-server), a WASM-only client (trunk serve), and a hybrid architecture that combines both. Need GPU acceleration? There's WebGPU support baked in. Prefer local embeddings to keep your data private? Integrate with Ollama or ONNX runtime. It's all configurable via various .toml and .json5 files in config/templates/.

Real-World Use

Let's say you're building a privacy-focused research app. You have a pile of academic papers in PDF format. Using GraphRAG-rs, you can: Parse documents and extract entities with graphrag-core/examples/advancednlpdemo.rs. Build a knowledge graph using the GraphBuilder in graphrag-core/src/builder/mod.rs. Serve it in a browser with the WASM-based demo in examples/graphrag-leptos-demo/. Run a query like "Show connections between quantum mechanics and entropy" and get meaningful results right in your browser.

For extra credit, you can add Ollama for local embeddings or plug in Qdrant for vector search.

The Bottom Line

GraphRAG-rs is fast, flexible, and overkill (in a good way). If you're hacking together a weekend project, this probably isn't for you. But if you need serious performance, local-first options, and full control over your RAG pipeline, it's worth your time. Just be ready to dig into the docs—this isn't a plug-and-play toy.