arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2404.10384cs.CLcs.AIcs.IR
收藏

高效知识路径推理:知识图谱引导大语言模型进行领域问答

Reasoning on Efficient Knowledge Paths:Knowledge Graph Guides Large Language Model for Domain Question Answering

State Key Laboratory of Media Convergence Production Technology and Systems(媒体融合生产技术与系统国家重点实验室);Institute of Computer Science and Technology, Peking University(北京大学计算机学院)

Yuqi Wang, Boran Jiang, Yi Luo, Dawei He, Peng Cheng, Liangcai Gao

AI总结:

本文提出RoK方法,利用知识图谱引导大语言模型进行领域问答,通过优化推理路径选择和基于思维链与PageRank的子图检索,减少LLM调用次数,并在三个数据集上达到与SOTA相同的效果。

摘要:

大语言模型(LLMs),如GPT3.5、GPT4和LLAMA2,在许多任务上表现惊人,甚至超越人类专家。然而,在许多领域特定的评估中,由于相关语料训练不足,这些LLM常常遭受幻觉问题的困扰。此外,微调大型模型可能面临诸如LLM不是开源的或构建高质量领域指令困难等问题。因此,像知识图谱这样的结构化知识数据库可以更好地为LLM提供领域背景知识,并充分利用LLM的推理和分析能力。在之前的一些工作中,当通过问题检索子图时,LLM被多次调用来判断当前三元组是否适合包含在子图中。特别是对于需要多跳推理路径的问题,频繁调用LLM将消耗大量计算资源。此外,在选择推理路径时,每一步都会调用一次LLM,如果其中一步选择错误,将导致后续步骤中错误的累积。在本文中,我们集成并优化了一个基于LLM从知识图谱中选择推理路径的流程,这可以减少对LLM的依赖。此外,我们提出了一种基于思维链(CoT)和PageRank的简单有效的子图检索方法,该方法可以返回最可能包含答案的路径。我们在三个数据集上进行了实验:GenMedGPT-5k [14]、WebQuestions [2]和CMCQA [21]。最后,RoK可以证明,使用更少的LLM调用可以达到与之前SOTA模型相同的结果。

英文摘要:

Large language models (LLMs), such as GPT3.5, GPT4 and LLAMA2 perform surprisingly well and outperform human experts on many tasks. However, in many domain-specific evaluations, these LLMs often suffer from hallucination problems due to insufficient training of relevant corpus. Furthermore, fine-tuning large models may face problems such as the LLMs are not open source or the construction of high-quality domain instruction is difficult. Therefore, structured knowledge databases such as knowledge graph can better provide domain background knowledge for LLMs and make full use of the reasoning and analysis capabilities of LLMs. In some previous works, LLM was called multiple times to determine whether the current triplet was suitable for inclusion in the subgraph when retrieving subgraphs through a question. Especially for the question that require a multi-hop reasoning path, frequent calls to LLM will consume a lot of computing power. Moreover, when choosing the reasoning path, LLM will be called once for each step, and if one of the steps is selected incorrectly, it will lead to the accumulation of errors in the following steps. In this paper, we integrated and optimized a pipeline for selecting reasoning paths from KG based on LLM, which can reduce the dependency on LLM. In addition, we propose a simple and effective subgraph retrieval method based on chain of thought (CoT) and page rank which can returns the paths most likely to contain the answer. We conduct experiments on three datasets: GenMedGPT-5k [14], WebQuestions [2], and CMCQA [21]. Finally, RoK can demonstrate that using fewer LLM calls can achieve the same results as previous SOTAs models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑