raphaelmansuy / edgequake
High-performance GraphRAG inspired from LightRag written in Rust
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing raphaelmansuy/edgequake in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewEdgeQuake > **High-Performance Graph-RAG Framework in Rust** > Transform documents into intelligent knowledge graphs for superior retrieval and generation > **v0.6.0** — Unified Streaming Response Protocol (SPEC-006): Structured SSE events with , , , , and event types. Rich streaming statistics, enriched source references with entity types & degree, and full workspace-aware query streaming. --- Why EdgeQuake? Traditional RAG systems retrieve document chunks using vector similarity alone. This works for simple lookups but fails on multi-hop reasoning ("How does X relate to Y through Z?"), thematic questions ("What are the major themes?"), and relationship queries. The core problem: **vectors capture semantic similarity but lose structural relationships between concepts**. **EdgeQuake** solves this by implementing the LightRAG algorithm in Rust: documents are not just chunked and embedded — they are decomposed into a **knowledge graph** of entities and relationships. At query time, the system traverses both the vector space and the graph structure, combining the speed of vector search with the reasoning power of graph traversal. What Sets EdgeQuake Apart • **Knowledge Graphs**: LLM-powered entity extraction and relationship mapping create a structured understanding of your documents — not just keyword matching • **6 Query Modes**: From fast naive vector search to graph-traversing hybrid queries, each mode optimizes for different question types • **Rust Performance**: Async-first Tokio architecture with zero-copy operations — handles thousands of concurrent requests • **PDF LLM Vision Pipeline ✅ NEW in 0.4.0**: Multimodal LLMs (GPT-4o, Claude, Gemini) read PDF pages as images — handles scanned documents, complex tables, and multi-column layouts out of the box • **Production Ready**: OpenAPI 3.0 REST API, SSE streaming, health checks, multi-tenant workspace isolation • **Modern Frontend**: React 19 with interactive Sigma.js graph visualizations Performance Benchmarks | Metric | EdgeQuake | Traditional RAG | Improvement | | ---------------------- | ---------------- | --------------- | ----------- | | Entity Extraction | ~2-3x more | Baseline | 3x | | Query Latency (hybrid) | **v0.4.0 — PDF is now Production Ready**: The PDF pipeline ships with embedded pdfium (zero-config) and an opt-in LLM vision mode. Text-mode extraction works for all standard PDFs; enable (or send ) to route pages through your vision-capable LLM for scanned documents and complex layouts. > **v0.4.0 Update**: PDF processing is now **production-ready** with embedded pdfium via . No external library setup required — just upload your PDFs! --- Features 🚀 High Performance • **Async-First**: Tokio-based runtime for maximum concurrency • **Zero-Copy**: Efficient memory management with Rust ownership • **Parallel Processing**: Multi-threaded entity extraction and embeddings • **Fast Storage**: PostgreSQL AGE for graph + pgvector for embeddings Knowledge Graph • **Entity Extraction**: Automatic detection of people, organizations, locations, concepts, events, technologies, and products (7 configurable types) • **Relationship Mapping**: LLM-powered relationship identification with keyword tagging • **Gleaning**: Multi-pass extraction catches 15-25% more entities than single-pass • **Community Detection**: Louvain modularity optimization clusters related entities for thematic queries • **Graph Visualization**: Interactive Sigma.js-powered frontend with zoom/pan 📄 PDF Processing (Production Ready in v0.4.0) • **Text Mode**: Fast pdfium-based extraction for standard PDFs (default, zero-config) • **Vision Mode** ✨: LLM reads each page as an image — GPT-4o, Claude 3.5+, Gemini 2.5 supported • **Automatic Fallback**: Vision failures gracefully fall back to text extraction (BR1010) • **Table Reconstruction**: Vision mode recovers complex tables that text parsers mangle • **Multi-Column Layout**: LLM understands reading order across multi-column pages • **Embedded pdfium**: No env var needed — binary ships inside the binary 🔍 6 Query Modes • **Naive**: Simple vector similarity — fastest for keyword-like lookups (~100-300ms) • **Local**: Entity-centric with local graph neighborhood — best for specific relationships (~200-500ms) • **Global**: Community-based semantic search — best for thematic/high-level questions (~300-800ms) • **Hybrid** _(default)_: Combines local + global for balanced, comprehensive results (~400-1000ms) • **Mix**: Weighted combination of naive + graph results with configurable ratios • **Bypass**: Direct LLM query without RAG retrieval — useful for general questions 🌐 REST API • **OpenAPI 3.0**: Full Swagger documentation at • **Streaming**: Server-Sent Events (SSE) for real-time responses • **Versioned**: with backward compatibility • **Health Checks**: Kubernetes-ready , , 🎯 React 19 Frontend • **Real-Time Streaming**: Token-by-token generation display • **Graph Visualization**: Interactive network graph with zoom/pan • **Document Upload**: Drag-and-drop with progress tracking • **Configuration UI**: Visual PDF processing config builder 🔌 MCP (Model Context Protocol) • **Agent Integration**: Expose EdgeQuake capabilities to AI agents via MCP • **Tool Discovery**: Agents can query, upload, and explore knowledge graphs programmatically • **Interoperability**: Works with Claude, Cursor, and other MCP-compatible clients See mcp/ for server implementation details. --- Quick Start Prerequisites • **Rust**: 1.78 or later (Install Rust) • **Node.js**: 18+ or Bun 1.0+ (Install Node) • **Docker**: For PostgreSQL (Install Docker) • **Ollama**: For local LLM (optional, Install Ollama) Installation (5 minutes) **That's it!** 🎉 • **Backend**: http://localhost:8080 • **Frontend**: http://localhost:3000 • **Swagger UI**: http://localhost:8080/swagger-ui • **Provider**: Ollama (local, free) First Document Upload **Response**: First Query **Response**: --- Architecture How the Algorithm Works Edge…