LLMs for knowledge graph construction and reasoning: recent capabilities and future opportunities

Yuqi Zhu, Xiaohan Wang, Jing Chen, Shuofei Qiao, Yixin Ou, Yunzhi Yao, Shumin Deng, Huajun Chen, Ningyu Zhang

Abstract

Large Language Models (LLMs) like GPT-4 have revolutionized natural language processing, but their utility in structured knowledge domains remains a subject of intense research. This paper evaluates the performance of the GPT family on Knowledge Graph (KG) construction and reasoning. While LLMs currently lag behind specialized, fine-tuned models in raw extraction tasks, they excel as reasoning assistants and demonstrate a robust ability to generalize to unseen, synthetic knowledge. We also discuss AutoKG, a multi-agent framework designed to automate the KG lifecycle.

Introduction

Knowledge Graphs (KGs) are essential for applications requiring structured data, such as search engines and recommendation systems. Traditionally, KG construction is a labor-intensive process involving domain experts and specialized models fine-tuned on specific datasets. The emergence of LLMs raises a critical question: can these general-purpose models replace specialized pipelines for building and reasoning over KGs? Furthermore, it is vital to distinguish whether LLM performance stems from genuine reasoning or mere memorization of training data.

Benchmarking LLM Capabilities

The researchers conducted a multi-faceted evaluation of three models—text-davinci-003, ChatGPT, and GPT-4—across eight diverse datasets covering relation extraction (RE), event detection (ED), link prediction (LP), and question answering (QA).

Performance comparison of LLMs across various Knowledge Graph tasks, highlighting the gap between general-purpose models and fine-tuned SOTA.

Key Findings

  • Reasoning vs. Extraction: LLMs are currently better at reasoning with existing knowledge (Link Prediction and QA) than extracting new knowledge from raw text. For example, on the FreebaseQA dataset, both ChatGPT and GPT-4 outperformed the previous supervised SOTA by 16% in a zero-shot setting.
  • The Construction Gap: Despite these gains, LLMs still trail fine-tuned SOTA models in extraction tasks. On the Re-TACRED dataset, the fine-tuned SOTA achieves 91.4 F1, while GPT-4 (one-shot) reached only 22.5.
  • GPT-4 Superiority: GPT-4 represents a significant leap over ChatGPT. In zero-shot relation extraction on the DuIE2.0 dataset, GPT-4 scored 31.03 F1, nearly tripling ChatGPT’s 10.3.

Generalization and the VINE Benchmark

To address the concern that LLMs might simply be "parrots" of their training data, the authors introduced the Virtual Knowledge Extraction (VINE) benchmark. This task uses synthetic entities and relations (e.g., a made-up relation like decidiaster) that the model could not have encountered before. GPT-4 successfully extracted 80% of these "virtual" triples, whereas ChatGPT only managed 27%, suggesting that GPT-4 has a robust underlying understanding of linguistic structures.

Future Opportunities: The AutoKG Framework

To overcome current limitations such as knowledge cutoffs and token limits, the authors propose AutoKG. This framework utilizes a multi-agent community where different LLM agents—such as a KG Administrator, Domain Expert, and Data Engineer—collaborate to build a KG, using external tools to bypass the model's knowledge cutoff date.

The AutoKG framework: A multi-agent community collaborating with external sources to automate Knowledge Graph construction and reasoning.

Conclusion and Limitations

While LLMs show immense promise, several hurdles remain for a fully automated "AutoKG" future. These include token limits for enterprise-scale KGs and the risk of hallucinations, which can compromise factual integrity. The study concludes that while LLMs can significantly accelerate the process as "inference assistants," human oversight remains essential for validation. Future research will likely explore multimodal reasoning and more efficient multi-agent collaboration.

Summary updated

BibTeX
@article{zhu2024llms,
  author = {Yuqi Zhu and Xiaohan Wang and Jing Chen and Shuofei Qiao and Yixin Ou and Yunzhi Yao and Shumin Deng and Huajun Chen and Ningyu Zhang},
  title = {{LLMs for knowledge graph construction and reasoning: recent capabilities and future opportunities}},
  journal = {WWW},
  year = {2024},
  doi = {10.1007/s11280-024-01297-w},
}
Figure