MiniRAG is a Python-based Retrieval-Augmented Generation framework designed for small models, with heterogeneous graph indexing and lightweight retrieval. It offers API, Docker, and PyPI deployment options, and provides a dataset LiHua-World for on-device RAG scenarios.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
MiniRAG is a Retrieval-Augmented Generation framework designed for small language models. It uses heterogeneous graph indexing and a lightweight topology-enhanced retrieval approach to enable efficient RAG with limited semantic capabilities.
How it works
The repository features a modular minirag package with components such as kg, llm, and storage. It emphasizes a semantic-aware heterogeneous graph indexing mechanism that combines text chunks and named entities in a unified structure, paired with graph-based knowledge retrieval.
Getting started
Install from source (Recommend):
cd MiniRAG
pip install -e .
Install from PyPI (Our code is based on LightRAG):
pip install lightrag-hku
Quick Start guidance:
- All the code can be found in the
./reproducedirectory. - Download the dataset you need and put it in the
./datasetdirectory. - The LiHua-World dataset is placed in
./dataset/LiHua-World/data/asLiHuaWorld.zip.
Then index the dataset with:
python ./reproduce/Step_0_index.py
python ./reproduce/Step_1_QA.py
Or initialize MiniRAG using ./main.py.
Recent releases
Latest two releases are:
- v0.0.2 (2025-02-27): MiniRAG w/ API, pypi, and more function
- v0.0.1 (2025-01-16): Full Changelog: https://github.com/HKUDS/MiniRAG/commits/v0.0.1
Traction
Stars: 1995; Forks: 257; Open issues: 36
Datasets
LiHua-World is designed for on-device RAG scenarios and includes one year of chat records with single-hop, multi-hop, and summary questions, along with manually annotated answers and supporting documents.
License and age
License: MIT; Created: 2025-01-11 Last push: 2025-10-16 Language: Python





