Skip to main content
QUICK REVIEW

[论文解读] KG-Agent: An Efficient Autonomous Agent Framework for Complex Reasoning over Knowledge Graph

Jinhao Jiang, Kun Zhou|arXiv (Cornell University)|Feb 17, 2024
AI-based Problem Solving and Planning被引用 12
一句话总结

KG-Agent 提供一个自主的基于大型语言模型的代理,可以使用多功能工具箱和记忆在知识图谱上进行推理,使得一个小型的 7B 模型在 KGQA 与 ODQA 任务上以最小的微调数据即可超越更大基线。

ABSTRACT

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.

研究动机与目标

  • 激发在知识图谱(KG)上针对超出标准提示的复杂问题改进推理能力。
  • 提出一个自主的基于 LLM 的代理,它通过迭代选择工具并更新记忆,在没有人类输入的情况下对 KG 进行推理。
  • 利用从 KGQA 数据集综合得到的基于代码的指令微调数据来训练一个紧凑的 LLM(7B)用于 KG 推理。
  • 在领域内的 KGQA 数据集上展示出色的表现,并在领域外的开放域问答任务中取得具有竞争力的零-shot 结果。
  • 突出在不同 KG 上的泛化能力以及向新领域的迁移性。

提出的方法

  • 引入一个具备提取、逻辑和语义工具的多功能工具箱,用于操作 KG 数据和中间结果。
  • 通过将类似 SQL 的查询落实到一系列映射到工具箱操作的函数调用链,从 KGQA 数据集综合 KG 推理程序。
  • 使用来自推理程序的基于代码的指令数据对一个小型 LLM(LLaMA-2-7B)进行微调,以执行 KG 推理步骤。
  • 开发一个自主推理循环,其中基于 LLM 的规划者选择工具,执行器在 KG 上执行工具调用,知识记忆存储问题、工具箱、当前 KG 信息和推理历史。
  • 整合记忆更新,在每次工具执行后更新历史记录和 KG 信息,从而实现对 KG 的逐步自主推理。

实验结果

研究问题

  • RQ1一个自主的、以工具箱驱动的基于 LLM 的代理是否能在没有人类设计计划的情况下,对知识图谱进行复杂的多跳推理?
  • RQ2对于一个小型 LLM,需要多少指令微调数据和模型规模才能在 KGQA 任务上超越更大的 LLM 基线?
  • RQ3整合知识记忆和迭代工具选择是否能提升对 KG 任务的推理可靠性?
  • RQ4KG-Agent 在不同的知识图谱和领域中的迁移能力有多大(领域内与领域外任务)?

主要发现

  • 在有 10K 个指令微调样本的情况下,使用 KG-Agent 的 7B LLM(LLaMA-2-7B)在领域内的 KGQA 数据集上超越基线。
  • KG-Agent 在 CWQ 与 GrailQA 数据集上取得改善,并在领域外的问答基准上显示出可用的零-shot 表现。
  • 自主的工具选择与记忆更新循环使多跳 KG 推理在不依赖强大的闭源 LLM API 的情况下成为可能。
  • 所提出的工作流程对另一个 KG(基于 MetaQA/Wikidata 的)可转移性表现稳健,并展示了领域迁移能力。
  • 有限的指令数据(10K)足以获得有竞争力的性能,而超出阈值的增加回报递减,表明数据多样性很重要。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。