Introduction
Retrieval-Augmented Generation (RAG) has become the standard for grounding Large Language Models (LLMs) in external knowledge. However, current state-of-the-art frameworks like GraphRAG or LightRAG suffer from a significant "LLM dependency." These systems rely on powerful models to perform computationally expensive tasks during both indexing (e.g., generating high-level summaries of data clusters) and retrieval (e.g., complex query decomposition).
When developers attempt to deploy these systems on resource-constrained edge devices using Small Language Models (SLMs), performance often collapses. SLMs lack the "semantic bandwidth" required to handle the complex reasoning and long-context denoising inherent in these heavy architectures. MiniRAG addresses this fundamental architectural mismatch by shifting the burden of intelligence from the model's reasoning capabilities to the structure of the data index itself.
The MiniRAG Architecture
MiniRAG is a lightweight RAG framework specifically engineered to run SLMs on edge devices. It replaces complex, LLM-heavy indexing with a simple heterogeneous graph of text chunks and entities. The system's innovation lies in two primary components:
1. Semantic-Aware Heterogeneous Graph Indexing
Instead of requiring a model to summarize large "communities" of data, MiniRAG builds a graph with two simple node types: Text Chunks (raw segments of text) and Named Entities (people, places, concepts). By creating explicit edges between entities and their source chunks, the system preserves contextual integrity without needing the model to synthesize the entire corpus at once.
2. Topology-Enhanced Retrieval
The retrieval process is decomposed into deterministic steps that play to the strengths of SLMs, such as entity extraction, rather than their weaknesses, such as global summarization. The system uses the graph's topology to discover reasoning paths between query entities and potential answer entities, ranking them using a scoring function that combines semantic embeddings with structural importance.
Experimental Evaluation
The authors evaluated MiniRAG using two primary benchmarks:
- MultiHop-RAG: A standard benchmark for evaluating a system's ability to connect information across multiple documents.
- LiHuaWorld: A new, comprehensive benchmark introduced in this paper that simulates a year-long "digital life" (chats, emails, notes). It is designed to mimic realistic on-device scenarios like personal communication retrieval.
Key Results and Insights
MiniRAG demonstrates that explicit structural information can effectively compensate for limited semantic reasoning in smaller models. By baking connections into the index, the model does not have to "hallucinate" relationships at runtime.
- Superior Accuracy: MiniRAG achieved 1.3x to 2.5x higher effectiveness than other lightweight RAG alternatives when using SLMs like Phi-3.5-mini or Qwen2.5-3B.
- Extreme Efficiency: The system requires only 25% of the storage space compared to LightRAG. This efficiency makes it highly viable for mobile phones and IoT devices where memory is at a premium.
- Model Robustness: While other frameworks saw accuracy plummet by over 30% when switching from GPT-4o to an SLM, MiniRAG’s performance remained remarkably stable, with some performance drops as low as 0.8%.
Conclusion and Future Work
MiniRAG proves that it is possible to achieve state-of-the-art RAG performance on small models by storing less and relying more on graph topology. While the system significantly lowers the barrier for on-device deployment, its performance remains tethered to the SLM's initial entity extraction quality. Future research may explore even more compressed graph representations and fine-tuning SLMs specifically for the query mapping stage to further enhance accuracy on edge devices.
Summary updated