Enhancing Text-based Knowledge Graph Completion with Zero-Shot Large Language Models: A Focus on Semantic Enhancement

Rui Yang, Jiahao Zhu, Jianping Man, Li Fang, Yi Zhou
10/12/2023
cs.CLcs.AI

Official code: sjlmg/CP-KGC (18 stars, last commit 2024-12-09).

Abstract

The design and development of text-based knowledge graph completion (KGC) methods leveraging textual entity descriptions are at the forefront of research. These methods involve advanced optimization techniques such as soft prompts and contrastive learning to enhance KGC models. The effectiveness of text-based methods largely hinges on the quality and richness of the training data. Large language models (LLMs) can utilize straightforward prompts to alter text data, thereby enabling data augmentation for KGC. Nevertheless, LLMs typically demand substantial computational resources. To address these issues, we introduce a framework termed constrained prompts for KGC (CP-KGC). This CP-KGC framework designs prompts that adapt to different datasets to enhance semantic richness. Additionally, CP-KGC employs a context constraint strategy to effectively identify polysemous entities within KGC datasets. Through extensive experimentation, we have verified the effectiveness of this framework. Even after quantization, the LLM (Qwen-7B-Chat-int4) still enhances the performance of text-based KGC methods \footnote{Code and datasets are available at \href{https://github.com/sjlmg/CP-KGC}{https://github.com/sjlmg/CP-KGC}}. This study extends the performance limits of existing models and promotes further integration of KGC with LLMs.

View on arXivView PDF

Code Implementations(1)

sjlmg/CP-KGCOfficial100%

Can Text-based Knowledge Graph Completion Benefit From Zero-Shot Large Language Models?

180PythonNov 9, 20231 years ago

Similar Papers

Cite this paper

@article{yang2023enhancing,
  title  = {Enhancing Text-based Knowledge Graph Completion with Zero-Shot Large Language Models: A Focus on Semantic Enhancement},
  author = {Rui Yang and Jiahao Zhu and Jianping Man and Li Fang and Yi Zhou},
  year   = {2023},
  eprint = {2310.08279},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.08279v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.08279.svg)](https://codeofpaper.com/paper/2310.08279)

Discussion