Retrieval Augmented Generation (RAG) has emerged as a successful process for improving Large Language Model (LLM) outputs. However, conventional RAG systems often struggle with queries requiring hierarchical or relational reasoning because they typically retrieve context from flat document stores.
The HG-RAG Framework
According to research published on ArXiv, HG-RAG (Hierarchy-Guided RAG) introduces a framework that performs graph-traversal over hierarchical knowledge graphs. The retrieval pipeline functions by first resolving a named entity anchor from the query. It then expands the context in three specific ways:
- Upward: Through parent nodes.
- Laterally: Through relational neighbors.
- Downward: Through child nodes when necessary.
Evaluation and Findings
The HG-RAG framework was evaluated against a dense retrieval baseline across three world scales, ranging from 18 to 800 nodes. The evaluation utilized four distinct query types: local fact, hierarchical, neighborhood, and multi-hop reasoning.
Results indicate that HG-RAG consistently outperforms flat retrieval baselines in hierarchical, relational, and multi-hop tasks. Furthermore, the framework demonstrates a reduction in hallucinations while maintaining locality coherence, providing a more structured context for the language model to process.