SuperAPIAI Directory

MiniRAG

github.com · AI developer platforms

an extremely simple retrieval-augmented generation framework that enables small models to achieve good RAG performance through heterogeneous graph indexing and lightweight topology-enhanced retrieval.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

MiniRAG is a minimalist Retrieval-Augmented Generation (RAG) framework designed to enable Small Language Models (SLMs) to achieve good RAG performance. It was proposed by the HKUDS team, and the paper "MiniRAG: Making RAG Simpler with Small and Open-Sourced Language Models" was accepted by ACL2026.

Purpose As the demand for efficient, lightweight RAG systems grows, deploying small language models in existing RAG frameworks faces significant challenges: the limited semantic understanding and text processing capabilities of SLMs lead to severe performance degradation, hindering their widespread application in resource-constrained scenarios. MiniRAG is designed precisely to address these fundamental limitations, pursuing extreme simplicity and efficiency.

Key Capabilities MiniRAG introduces two key technologies:

  1. A semantics-aware heterogeneous graph indexing mechanism: it combines text chunks and named entities in a unified structure, reducing reliance on complex semantic understanding.
  2. A lightweight topology-enhanced retrieval method: it uses graph structures for efficient knowledge discovery without requiring advanced language capabilities. Official experiments show that even with SLMs, MiniRAG can achieve performance comparable to LLM-based methods while requiring only about 25% of the storage space.

Usage

  • Installation: Installing from source is recommended; it can also be installed via PyPI with the command pip install minirag-hku (the code is based on LightRAG and can be installed directly).
  • Datasets: Download the required datasets and place them in the ./dataset directory. The official LiHua-World dataset has been placed under ./dataset/LiHua-World/data/ as LiHuaWorld.zip; other datasets can be placed in ./dataset/xxx.
  • Indexing: Use the provided bash command to index the datasets, or use the code in ./main.py to initialize MiniRAG.
  • Deployment: Supports API and Docker deployment.
  • Database support: Supports more than 10 heterogeneous graph databases, including Neo4j, PostgreSQL, TiDB, etc.
  • Reproduction: All code can be found in the ./reproduce directory.

Applicable Scenarios MiniRAG is aimed at on-device RAG scenarios and is suitable for deployment environments that are resource-constrained and require lightweight, efficient retrieval-augmented generation.The official release contributes the LiHua-World benchmark dataset, which is used to evaluate the ability of lightweight RAG systems to handle complex queries in real on-device scenarios. The dataset contains one year of chat records from a virtual user LiHua, covering three types of questions: single-hop, multi-hop, and summarization, and each question is accompanied by manually annotated answers and supporting documents.

Limitations The materials do not provide specific performance figures, a list of supported models, hardware requirements, or pricing information. The official description mentions that in the performance comparison table, "/" indicates that the method has difficulty generating valid responses.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools