hhy-huang/HiRAG
[EMNLP'25 findings] This is the official repo for the paper, HiRAG: Retrieval-Augmented Generation with Hierarchical Knowledge.
What it solves
HiRAG addresses the limitations of standard Retrieval-Augmented Generation (RAG) by utilizing hierarchical knowledge to improve the comprehensiveness, diversity, and overall quality of generated answers, particularly when compared to naive RAG and other GraphRAG implementations.
How it works
HiRAG organizes knowledge into a hierarchical structure, allowing the system to retrieve information at different levels of granularity. It supports several retrieval modes:
- Hierarchical (hi): The primary approach using the hierarchical knowledge structure.
- Local: Retrieves only local knowledge.
- Global: Retrieves only global knowledge.
- Bridge: Retrieves only bridge knowledge that connects different levels of the hierarchy.
The system can be integrated with various LLM APIs such as DeepSeek, OpenAI, and ChatGLM for the generation phase.
Who it’s for
Developers and researchers looking to implement a more sophisticated RAG system that can handle complex queries requiring both high-level summaries and detailed local information.
Highlights
- Hierarchical Knowledge Base: Moves beyond flat retrieval to a structured approach.
- Multi-mode Retrieval: Offers flexible options to retrieve local, global, or bridge knowledge.
- Broad LLM Compatibility: Works with third-party APIs like DeepSeek, OpenAI, and ChatGLM.
- Strong Performance: Demonstrates significant improvements over Naive RAG and other GraphRAG frameworks in terms of answer comprehensiveness and diversity.