MiniRAG  by HKUDS

RAG framework for small language models

created 6 months ago
1,276 stars

Top 31.8% on sourcepulse

GitHubView on GitHub
Project Summary

MiniRAG is an open-source framework designed to simplify Retrieval-Augmented Generation (RAG) for Small Language Models (SLMs). It addresses the performance degradation often seen with SLMs in traditional RAG systems by employing a novel heterogeneous graph indexing and lightweight topology-enhanced retrieval approach. This makes RAG more accessible for resource-constrained environments and on-device applications.

How It Works

MiniRAG utilizes a two-pronged approach: a semantic-aware heterogeneous graph indexing mechanism that unifies text chunks and named entities, and a lightweight topology-enhanced retrieval method that leverages graph structures. This design reduces the reliance on complex semantic understanding, enabling SLMs to achieve strong RAG performance by efficiently discovering knowledge through graph relationships.

Quick Start & Requirements

  • Install via pip: pip install lightrag-hku or pip install -e . from source.
  • Requires Python.
  • The LiHua-World dataset is available in ./dataset/LiHua-World/data/.
  • Official documentation and reproduction scripts are available in the repository.

Highlighted Details

  • Achieves comparable performance to LLM-based methods with SLMs.
  • Requires only 25% of the storage space compared to other methods.
  • Supports 10+ heterogeneous graph databases, including Neo4j and PostgreSQL.
  • Offers API and Docker deployment options.

Maintenance & Community

The project is actively developed with recent updates in February 2025. It acknowledges foundational work from nano-graphrag and LightRAG.

Licensing & Compatibility

The project is released under the MIT license, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The performance table indicates that some methods struggle to generate effective responses for certain models and datasets, with '/' denoting such cases. The project is based on recent research, with a citation provided for the arXiv preprint.

Health Check
Last commit

1 month ago

Responsiveness

1 week

Pull Requests (30d)
4
Issues (30d)
4
Star History
227 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems) and Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind).

LightRAG by HKUDS

1.0%
19k
RAG framework for fast, simple retrieval-augmented generation
created 10 months ago
updated 1 day ago
Feedback? Help us improve.