用多工具检索增强大模型,让知识图谱问答更准更通用。
BYOKG-RAG: Multi-Strategy Graph Retrieval for Knowledge Graph Question Answering
- 大模型生成关键实体和查询,由专用图工具精准定位
- 跨五类数据集平均提升4.5%准确率,对自定义图谱泛化更好
- 适合需要高精度、跨领域知识图谱问答的开发者使用
知识图谱问答(KGQA)因输入图结构与语义差异面临挑战。现有方法依赖大语言模型(LLM)代理进行图遍历与检索,但对遍历初始化敏感,易出现实体链接错误,且难以泛化到自定义知识图谱。我们提出BYOKG-RAG框架,通过协同结合LLM与专用图检索工具,增强KGQA性能。在该框架中,LLM生成关键图结构要素(如问题实体、候选答案、推理路径和OpenCypher查询),图工具将这些要素映射至知识图谱并检索相关上下文。检索到的上下文使LLM能迭代优化实体链接与检索,最终生成答案。通过在五个涵盖多种类型知识图谱的基准上实验,BYOKG-RAG相较第二优的检索方法提升4.5个百分点,并展现出更强的自定义图谱泛化能力。该框架已在https://github.com/awslabs/graphrag-toolkit开源。
原文摘要 · Abstract (English)
Knowledge graph question answering (KGQA) presents significant challenges due to the structural and semantic variations across input graphs. Existing works rely on Large Language Model (LLM) agents for graph traversal and retrieval; an approach that is sensitive to traversal initialization, as it is prone to entity linking errors and may not generalize well to custom ("bring-your-own") KGs. We introduce BYOKG-RAG, a framework that enhances KGQA by synergistically combining LLMs with specialized graph retrieval tools. In BYOKG-RAG, LLMs generate critical graph artifacts (question entities, candidate answers, reasoning paths, and OpenCypher queries), and graph tools link these artifacts to the KG and retrieve relevant graph context. The retrieved context enables the LLM to iteratively refine its graph linking and retrieval, before final answer generation. By retrieving context from different graph tools, BYOKG-RAG offers a more general and robust solution for QA over custom KGs. Through experiments on five benchmarks spanning diverse KG types, we demonstrate that BYOKG-RAG outperforms the second-best graph retrieval method by 4.5% points while showing better generalization to custom KGs. BYOKG-RAG framework is open-sourced at https://github.com/awslabs/graphrag-toolkit.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。