MiniRAG
An open-source RAG framework answers questions over your data with small language models, graph-based retrieval, and self-hosted Docker deployment.
MiniRAG is a Python framework for developers building question-answering tools over their own data with small language models. It targets on-device applications where larger models and heavier retrieval systems are difficult to use.
- Connected retrieval: It links text passages with the people, places, and other entities they mention, then uses those connections to find context for an answer.
- Small-model support: Its retrieval approach reduces reliance on a model's ability to interpret complex text; evaluated models include Phi-3.5-mini-instruct, GLM-Edge-1.5B-Chat, Qwen2.5-3B-Instruct, and MiniCPM3-4B.
- Evaluation data: The included LiHua-World dataset lets developers test questions over fictional chat records, including answers that require combining several passages or summarizing information, with manually annotated answers and supporting documents.
MiniRAG is open source under the MIT license and builds on LightRAG code. It supports self-hosted Docker deployment and API access, with database integrations including Neo4j, PostgreSQL, and TiDB. The project also evaluates gpt-4o-mini, which uses a cloud service rather than running on-device.