arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.11163cs.CL
收藏

KG-Agent:一种用于知识图谱复杂推理的高效自主智能体框架

KG-Agent: An Efficient Autonomous Agent Framework for Complex Reasoning over Knowledge Graph

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);School of Information, Renmin University of China(中国人民大学信息学院);NLP Center, BOSS Zhipin(BOSS直聘NLP中心);Career Science Lab, BOSS Zhipin(BOSS直聘职业科学实验室)

Jinhao Jiang, Kun Zhou, Wayne Xin Zhao, Yang Song, Chen Zhu, Hengshu Zhu, Ji-Rong Wen

AI总结:

本文提出KG-Agent框架,通过集成LLM、工具箱、执行器与记忆并设计迭代机制,使小型LLM自主进行知识图谱多跳推理,仅需10K样本微调LLaMA-7B即超越现有最先进方法。

摘要:

本文旨在提升大型语言模型(LLMs)在知识图谱(KGs)上的推理能力以回答复杂问题。受现有设计LLMs与KG交互策略的方法启发,我们提出了一种基于LLM的自主智能体框架,称为KG-Agent,它使小型LLM能够主动做出决策,直到完成在KG上的推理过程。在KG-Agent中,我们集成了LLM、多功能工具箱、基于KG的执行器和知识记忆,并开发了一种自主选择工具并更新记忆以进行KG推理的迭代机制。为保证有效性,我们利用编程语言来表述KG上的多跳推理过程,并合成了一个基于代码的指令数据集来微调基础LLM。大量实验表明,仅使用10K样本微调LLaMA-7B,在域内和域外数据集上即可超越使用更大LLM或更多数据的最先进方法。我们的代码和数据将公开发布。

英文摘要:

In this paper, we aim to improve the reasoning ability of large language models (LLMs) over knowledge graphs (KGs) to answer complex questions. Inspired by existing methods that design the interaction strategy between LLMs and KG, we propose an autonomous LLM-based agent framework, called KG-Agent, which enables a small LLM to actively make decisions until finishing the reasoning process over KGs. In KG-Agent, we integrate the LLM, multifunctional toolbox, KG-based executor, and knowledge memory, and develop an iteration mechanism that autonomously selects the tool then updates the memory for reasoning over KG. To guarantee the effectiveness, we leverage program language to formulate the multi-hop reasoning process over the KG, and synthesize a code-based instruction dataset to fine-tune the base LLM. Extensive experiments demonstrate that only using 10K samples for tuning LLaMA-7B can outperform state-of-the-art methods using larger LLMs or more data, on both in-domain and out-domain datasets. Our code and data will be publicly released.

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

↑