HG-RAG: Hierarchy-Guided Retrieval-Augmented Generation for Structured Knowledge Graphs

HG-RAG: Hierarchy-Guided Retrieval-Augmented Generation for Structured Knowledge Graphs

HG-RAG:面向结构化知识图谱的层次引导检索增强生成

Abstract: Retrieval Augmented Generation (RAG) has proven to be a widely successful process at improving the quality of outputs from a Large Language Model (LLM) for wider context. However, RAG systems typically retrieve context from flat document stores, which struggles when queries require hierarchical or relational reasoning across structured knowledge.

摘要: 检索增强生成(RAG)已被证明是一种非常成功的流程,能够通过提供更广泛的上下文来提升大语言模型(LLM)的输出质量。然而,传统的 RAG 系统通常从扁平的文档存储中检索上下文,当查询需要跨结构化知识进行层次化或关系推理时,这种方法往往难以奏效。

I present HG-RAG (Hierarchy-Guided RAG), a framework that performs graph-traversal over a hierarchical knowledge graph to deliver structured context to a language model. My retrieval pipeline resolves a named entity anchor from the query, then expands context upward through parent nodes, laterally through relational neighbors, and downward through child nodes when needed.

我提出了 HG-RAG(层次引导式 RAG),这是一个通过在层次化知识图谱上执行图遍历,从而为语言模型提供结构化上下文的框架。我的检索流水线首先从查询中解析出一个命名实体锚点,然后根据需要向上通过父节点、横向通过关系邻居、向下通过子节点来扩展上下文。

I evaluate HG-RAG against a dense retrieval baseline across three world scales (18-800 nodes) with four query types: local fact, hierarchical, neighborhood, and multi-hop. Results show HG-RAG consistently outperforms the flat baseline on hierarchical, relational, and multi-hop reasoning tasks, while reducing hallucination and maintaining locality coherence.

我在三个不同规模(18-800 个节点)的世界模型中,针对四种查询类型(局部事实、层次化、邻域和多跳查询),将 HG-RAG 与密集检索基线进行了对比评估。结果表明,HG-RAG 在层次化、关系型和多跳推理任务中始终优于扁平基线,同时减少了幻觉并保持了局部连贯性。