HiRAG
A retrieval-augmented generation system that builds a hierarchical knowledge index over a document corpus, described in an EMNLP 2025 Findings paper.
HiRAG is a retrieval-augmented generation system that organizes a knowledge base hierarchically instead of as a flat set of chunks, described in the paper introducing it, which was accepted to EMNLP 2025 Findings. After installing the package, queries are run against an indexed knowledge base built from a corpus of documents.
It can be configured to use DeepSeek, ChatGLM or OpenAI as the underlying language model for generation, with example scripts and a YAML configuration file for API keys and model settings. An accompanying evaluation pipeline extracts context from question-answering datasets, inserts it into a graph database, runs different versions of HiRAG against it, and scores the generated answers against a naive RAG baseline across dimensions such as comprehensiveness, empowerment and diversity.