Skip to content

EdgeQuake Documentation

High-Performance Graph-Enhanced RAG in Rust

Welcome to EdgeQuake β€” an advanced Retrieval-Augmented Generation (RAG) framework that combines knowledge graphs with vector search for superior context retrieval.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ EdgeQuake β”‚
β”‚ β”‚
β”‚ Document ──▢ [Pipeline] ──▢ Knowledge Graph ──▢ Query Engine β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β–Ό β–Ό β–Ό β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Chunks β”‚ β”‚ Entitiesβ”‚ β”‚ Hybrid β”‚ β”‚
β”‚ β”‚ + Embed β”‚ β”‚ + Rels β”‚ β”‚ Results β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚
β”‚ [REST API] [Next.js WebUI] [Rust SDK] [PostgreSQL/Memory] β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

GuideDescriptionTime
InstallationPrerequisites and setup5 min
Quick StartFirst ingestion and query10 min
First IngestionUnderstanding the pipeline15 min
DocumentDescription
OverviewSystem design and components
Data FlowHow documents flow through the system
Crate Reference11 Rust crates explained
ConceptDescription
Graph-RAGWhy knowledge graphs enhance RAG
Entity ExtractionLLM-based entity recognition
Knowledge GraphNodes, edges, and communities
Hybrid RetrievalCombining vector and graph search
ArticleDescription
LightRAG AlgorithmCore algorithm: extraction, graph, retrieval
Query Modes6 modes with trade-offs explained
Entity NormalizationDeduplication and description merging
GleaningMulti-pass extraction for completeness
Entity ExtractionLLM-based extraction pipeline
Community DetectionLouvain clustering for global queries
Chunking StrategiesToken-based segmentation with overlap
Embedding ModelsModel selection and dimension trade-offs
Graph StorageApache AGE property graph backend
Vector Storagepgvector HNSW indexing and search
PDF ProcessingText/Vision/Hybrid extraction pipeline
Cost TrackingLLM cost monitoring per operation
Pipeline ProgressReal-time progress tracking
ComparisonKey Insights
vs LightRAG (Python)Performance and design differences
vs GraphRAGMicrosoft’s approach comparison
vs Traditional RAGWhy graphs matter
TutorialDescription
Building Your First RAG AppEnd-to-end tutorial
PDF IngestionPDF upload and configuration
Multi-Tenant SetupWorkspace isolation
Document IngestionUpload and processing workflows
Migration from LightRAGPython to Rust migration guide
IntegrationDescription
OpenWebUIChat interface with Ollama emulation
LangChainRetriever and agent integration
Custom ClientsPython, TypeScript, Rust, Go clients
APIDescription
REST APIHTTP endpoints
Extended APIAdvanced API features
ResourceDescription
CookbookPractical recipes for common tasks
FAQFrequently asked questions
GuideDescription
DeploymentProduction deployment
ConfigurationAll config options
MonitoringObservability setup
Performance TuningOptimization guide
GuideDescription
Security Best PracticesSecurity guidelines
Common IssuesDebugging guide

I want to…

GoalGo To
Get running in 5 minutesQuick Start
Understand the architectureOverview
Learn how the algorithm worksLightRAG Algorithm
See API endpointsREST API
Deploy to productionDeployment

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend (Rust) β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Tokio β”‚ β”‚ Axum β”‚ β”‚ SQLx β”‚ β”‚ async- β”‚ β”‚
β”‚ β”‚ (async) β”‚ β”‚ (HTTP) β”‚ β”‚ (database)β”‚ β”‚ openai β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Frontend (TypeScript) β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Next.js β”‚ β”‚ React 19 β”‚ β”‚ Sigma.js β”‚ β”‚ Zustand β”‚ β”‚
β”‚ β”‚ 16.1.0 β”‚ β”‚ 19.2.3 β”‚ β”‚ (graph) β”‚ β”‚ (state) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Storage β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ PostgreSQL 15+ β”‚ β”‚ In-Memory (dev) β”‚ β”‚
β”‚ β”‚ + pgvector + Apache AGEβ”‚ β”‚ Fast prototyping β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MetricValueNotes
Lines of Rust~130,000Across 11 crates
Query Modes6naive, local, global, hybrid, mix, bypass
Entity Types7 defaultPERSON, ORGANIZATION, LOCATION, CONCEPT, EVENT, TECHNOLOGY, PRODUCT
Embedding DimsConfigurable1536 (OpenAI), 768 (Ollama/LM Studio)

Terminal window
# Clone and run with Ollama (free, local LLM)
git clone https://github.com/raphaelmansuy/edgequake.git && cd edgequake && make dev

Apache-2.0