Published April 13, 2023 | Version v1
Conference paper Open

Improving Language Model Predictions via Prompts Enriched with Knowledge Graphs

  • 1. KNAW Humanities Cluster
  • 2. Université de Nantes
  • 3. KIZ Karlsruhe
  • 4. University of Oxford
  • 5. King's College London
  • 6. Rensselaer Polytechnic Institute

Description

Despite advances in deep learning and knowledge graphs (KGs), using language models for natural language understanding and question answering remains a challenging task. Pre-trained language models (PLMs) have shown to be able to leverage contextual information, to complete cloze prompts, next sentence completion and question answering tasks in various domains. Unlike structured data querying in e.g. KGs, mapping an input question to data that may or may not be stored by the language model is not a simple task. Recent studies have highlighted the improvements that can be made to the quality of information retrieved from PLMs by adding auxiliary data to otherwise naive prompts. In this paper, we explore the effects of enriching prompts with additional contextual information leveraged from the Wikidata KG on language model performance. Specifically, we compare the performance of naive vs. KG-engineered cloze prompts for entity genre classification in the movie domain. Selecting a broad range of commonly available Wikidata properties, we show that enrichment of cloze-style prompts with Wikidata information can result in a significantly higher recall for the investigated BERT and RoBERTa large PLMs. However, it is also apparent that the optimum level of data enrichment differs between models.

Files

Klingon_DL4KG (3).pdf

Files (908.3 kB)

Name Size Download all
md5:8ae0197ceb3d599bac088506a18821ac
908.3 kB Preview Download

Additional details

Funding

Polifonia – Polifonia: a digital harmoniser for musical heritage knowledge 101004746
European Commission