🤖 AI Summary
Knowledge graphs (KGs) suffer from pervasive incompleteness, limiting their utility in AI applications. To address this, we propose KG-LLM—a novel framework that, for the first time, directly encodes KG triples as natural language prompts incorporating semantic descriptions of both entities and relations, enabling end-to-end KG completion using lightweight open-source large language models (e.g., LLaMA-7B, ChatGLM-6B). Leveraging prompt engineering and supervised fine-tuning, KG-LLM achieves state-of-the-art performance on multiple benchmark datasets for triple classification and relation prediction. Crucially, fine-tuned open models consistently outperform closed-source counterparts—including GPT-4—demonstrating the efficacy, interpretability, and generalizability of this low-cost, prompt-driven KG completion paradigm.
📝 Abstract
Knowledge graphs play a vital role in numerous artificial intelligence tasks, yet they frequently face the issue of incompleteness. In this study, we explore utilizing Large Language Models (LLM) for knowledge graph completion. We consider triples in knowledge graphs as text sequences and introduce an innovative framework called Knowledge Graph LLM (KG-LLM) to model these triples. Our technique employs entity and relation descriptions of a triple as prompts and utilizes the response for predictions. Experiments on various benchmark knowledge graphs demonstrate that our method attains state-of-the-art performance in tasks such as triple classification and relation prediction. We also find that fine-tuning relatively smaller models (e.g., LLaMA-7B, ChatGLM-6B) outperforms recent ChatGPT and GPT-4.