Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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.

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

Related benchmarks

TaskDatasetResultRank
Knowledge Graph Question AnsweringCWQ
Hit@172.2
212
Knowledge Graph Question AnsweringWebQSP
Hit@183.3
174
Multi-hop Knowledge Graph Question AnsweringWebQSP
Hits@183.3
69
Multi-hop Knowledge Graph Question AnsweringCWQ
Hits@172.2
64
Knowledge Base Question AnsweringWebQSP
Hits@183.3
53
Knowledge Base Question AnsweringGrailQA
Hits@186.1
40
Question AnsweringMetaQA 2-hop
Accuracy32.51
39
Question AnsweringMetaQA 3-hop
Accuracy4.07
39
Question AnsweringWebQSP
Accuracy42.6
35
Knowledge Base Question AnsweringCWQ (ComplexWebQuestions)
Hits@1 Accuracy72.2
32
Showing 10 of 33 rows

Other info

Follow for update