MiniRAG
M
Minirag
Overview :
MiniRAG is a retrieval-augmented generation system designed for small language models, aimed at simplifying RAG processes and enhancing efficiency. It addresses the performance limitations of small models within traditional RAG frameworks through a semantically aware heterogeneous graph indexing mechanism and lightweight topological enhanced retrieval methods. This model shows significant advantages in resource-constrained scenarios, such as on mobile devices or edge computing environments. Its open-source nature allows for easy adoption and improvement within the developer community.
Target Users :
The target audience primarily includes researchers and developers in the field of natural language processing, as well as academics and industry professionals interested in lightweight RAG systems. MiniRAG is an ideal choice for those looking to deploy RAG systems in resource-constrained environments or teams needing rapid prototyping and experimentation.
Total Visits: 474.6M
Top Region: US(19.34%)
Website Views : 56.9K
Use Cases
Deploying a RAG system on mobile devices to provide users with fast and accurate question-answering services.
Utilizing MiniRAG for real-time text generation tasks in edge computing environments, such as automatic summarization and content creation.
Using MiniRAG as a benchmark model for lightweight RAG systems in academic research, focusing on algorithm optimization and performance evaluation.
Features
Provides a heterogeneous graph indexing mechanism that combines text blocks and named entities, reducing reliance on complex semantic understanding.
Employs lightweight topological enhanced retrieval methods, leveraging graph structures for efficient knowledge discovery without requiring advanced language capabilities.
Achieves performance comparable to larger language models when using small language models.
Requires only 25% of storage space, significantly reducing deployment costs.
Offers a comprehensive benchmark dataset, LiHua-World, for evaluating lightweight RAG systems in real device scenarios.
Supports both source code installation and installation via PyPI, facilitating quick onboarding for developers.
Has a clear code structure that is easy to understand and extend, enabling developers to engage in secondary development.
How to Use
1. Clone the MiniRAG repository from GitHub to your local machine.
2. Install MiniRAG from the source code using the command `pip install -e .` or install it from PyPI using `pip install lightrag-hku`.
3. Download the required LiHua-World dataset and place it in the `./dataset/LiHua-World/data/` directory.
4. Index the dataset using the command `python ./reproduce/Step_0_index.py`.
5. Run `python ./reproduce/Step_1_QA.py` for question-answering tasks, or use the code in `main.py` to initialize MiniRAG.
6. Adjust parameters and configurations as needed for model training and optimization.
AIbase
Empowering the Future, Your AI Solution Knowledge Base
© 2025AIbase