arXiv:2504.02112cs.LG2025-04被引 5

提出自适应图遍历方法PolyG,提升GraphRAG对多样化问题的回答质量与效率。

PolyG: Adaptive Graph Traversal for Diverse GraphRAG Questions

  • 根据四类问题模式动态分解并选择不同图遍历策略。
  • 在PolyBench基准上生成答案质量更高,响应延迟低、令牌消耗少。
  • 适合需要高效精准知识检索的应用场景,如智能客服、医疗问答。

GraphRAG通过从外部知识图谱中检索相关事实来增强大语言模型(LLM)的问答能力。然而,现有GraphRAG方法主要在知识图谱问答(KGQA)基准上评估,这些基准偏向少数特定问题模式,无法反映真实世界问题的多样性。为此,我们提出一个完整的四类问题分类体系,并据此构建PolyBench新基准,涵盖全面的图谱问题类型。基于该基准发现,现有方法在有效性(答案质量)和/或效率(响应时间或令牌使用量)上表现不足,因其采用固定遍历策略或由LLM自由探索进行事实检索。不同问题模式需要不同的图遍历策略与上下文构建方式。为此,我们提出PolyG,一种基于所提问题分类体系的自适应GraphRAG方法。其基于统一接口与执行引擎,动态提示LLM生成图数据库查询,为每个分解后的基础问题获取上下文。相比SOTA GraphRAG方法,PolyG在生成质量上具有更高的胜率,同时保持低响应延迟与低令牌成本。代码与基准已开源:https://github.com/Liu-rj/PolyG。

原文摘要 · Abstract (English)

GraphRAG enhances large language models (LLMs) to generate quality answers for user questions by retrieving related facts from external knowledge graphs. However, current GraphRAG methods are primarily evaluated on and overly tailored for knowledge graph question answering (KGQA) benchmarks, which are biased towards a few specific question patterns and do not reflect the diversity of real-world questions. To better evaluate GraphRAG methods, we propose a complete four-class taxonomy to categorize the basic patterns of knowledge graph questions and use it to create PolyBench, a new GraphRAG benchmark encompassing a comprehensive set of graph questions. With the new benchmark, we find that existing GraphRAG methods fall short in effectiveness (i.e., quality of the generated answers) and/or efficiency (i.e., response time or token usage) because they adopt either a fixed graph traversal strategy or free-form exploration by LLMs for fact retrieval. However, different question patterns require distinct graph traversal strategies and context formation. To facilitate better retrieval, we propose PolyG, an adaptive GraphRAG approach by decomposing and categorizing the questions according to our proposed question taxonomy. Built on top of a unified interface and execution engine, PolyG dynamically prompts an LLM to generate a graph database query to retrieve the context for each decomposed basic question. Compared with SOTA GraphRAG methods, PolyG achieves a higher win rate in generation quality and has a low response latency and token cost. Our code and benchmark are open-source at https://github.com/Liu-rj/PolyG.

图谱检索自适应策略LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。