不需训练,用知识图谱提升大模型推理准确性
KARPA: A Training-free Method of Adapting Knowledge Graph as References for Large Language Model's Reasoning Path Aggregation
- 让大模型先全局规划推理路径,再匹配相关知识
- 在多个数据集上达到顶尖准确率,推理速度更快
- 无需微调,适配各种大模型,适合知识增强场景
大语言模型在各类任务中表现卓越,但常受幻觉和知识时效性影响。利用知识图谱作为外部知识源成为可行方案,但现有基于知识图谱问答的方法通常依赖逐步决策,限制了大模型的全局规划与推理能力,或需要在特定知识图谱上进行微调或预训练。为此,我们提出知识图谱辅助推理路径聚合框架(KARPA),充分利用大模型的全局规划能力,实现高效精准的知识图谱推理。KARPA包含三个步骤:利用大模型的全局规划能力预先生成关系路径,通过嵌入模型匹配语义相关的路径,再对这些路径进行推理生成答案。与现有方法不同,KARPA避免逐步遍历,无需额外训练,且可适配多种大模型架构。大量实验结果表明,KARPA在知识图谱问答任务中达到当前最优性能,兼具高效率与高准确率。代码将开源于GitHub。
原文摘要 · Abstract (English)
Large language models (LLMs) demonstrate exceptional performance across a variety of tasks, yet they are often affected by hallucinations and the timeliness of knowledge. Leveraging knowledge graphs (KGs) as external knowledge sources has emerged as a viable solution, but existing methods for LLM-based knowledge graph question answering (KGQA) are often limited by step-by-step decision-making on KGs, restricting the global planning and reasoning capabilities of LLMs, or they require fine-tuning or pre-training on specific KGs. To address these challenges, we propose Knowledge graph Assisted Reasoning Path Aggregation (KARPA), a novel framework that harnesses the global planning abilities of LLMs for efficient and accurate KG reasoning. KARPA operates in three steps: pre-planning relation paths using the LLM's global planning capabilities, matching semantically relevant paths via an embedding model, and reasoning over these paths to generate answers. Unlike existing KGQA methods, KARPA avoids stepwise traversal, requires no additional training, and is adaptable to various LLM architectures. Extensive experimental results show that KARPA achieves state-of-the-art performance in KGQA tasks, delivering both high efficiency and accuracy. Our code will be available on Github.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。