Extract, Define, Canonicalize: An LLM-based Framework for Knowledge Graph Construction

Bowen Zhang, Harold Soh
4/5/2024
cs.CLcs.AIcs.LG

Official code: clear-nus/edc (197 stars, MIT, last commit 2024-08-13).

Abstract

In this work, we are interested in automated methods for knowledge graph creation (KGC) from input text. Progress on large language models (LLMs) has prompted a series of recent works applying them to KGC, e.g., via zero/few-shot prompting. Despite successes on small domain-specific datasets, these models face difficulties scaling up to text common in many real-world applications. A principal issue is that, in prior methods, the KG schema has to be included in the LLM prompt to generate valid triplets; larger and more complex schemas easily exceed the LLMs' context window length. Furthermore, there are scenarios where a fixed pre-defined schema is not available and we would like the method to construct a high-quality KG with a succinct self-generated schema. To address these problems, we propose a three-phase framework named Extract-Define-Canonicalize (EDC): open information extraction followed by schema definition and post-hoc canonicalization. EDC is flexible in that it can be applied to settings where a pre-defined target schema is available and when it is not; in the latter case, it constructs a schema automatically and applies self-canonicalization. To further improve performance, we introduce a trained component that retrieves schema elements relevant to the input text; this improves the LLMs' extraction performance in a retrieval-augmented generation-like manner. We demonstrate on three KGC benchmarks that EDC is able to extract high-quality triplets without any parameter tuning and with significantly larger schemas compared to prior works. Code for EDC is available at https://github.com/clear-nus/edc.

View on arXivView PDF

Code Implementations(1)

clear-nus/edcOfficial100%
MIT
19737Shell, PythonApr 2, 20242 years agoMIT

Similar Papers

Cite this paper

@article{zhang2024extract,
  title  = {Extract, Define, Canonicalize: An LLM-based Framework for Knowledge Graph Construction},
  author = {Bowen Zhang and Harold Soh},
  year   = {2024},
  eprint = {2404.03868},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.03868v2}
}

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/2404.03868.svg)](https://codeofpaper.com/paper/2404.03868)

Discussion