Skip to main content
QUICK REVIEW

[Paper Review] LLM2KB: Constructing Knowledge Bases using instruction tuned context aware Large Language Models

Anmol Nayak, Hari Prasad Timmapathini|arXiv (Cornell University)|Aug 25, 2023
Topic ModelingComputer Science4 citations
TL;DR

This paper presents LLM2KB, a system that constructs knowledge bases using instruction-tuned, context-aware large language models (Llama-2-13b-chat and StableBeluga-13B) via parameter-efficient fine-tuning with LoRA. By leveraging Wikipedia page contexts retrieved via Dense Passage Retrieval (DPR), the model achieves an average F1 score of 0.6185 on 21 relations in the LM-KBC 2023 challenge, demonstrating effective knowledge base construction with minimal parameter updates.

ABSTRACT

The advent of Large Language Models (LLM) has revolutionized the field of natural language processing, enabling significant progress in various applications. One key area of interest is the construction of Knowledge Bases (KB) using these powerful models. Knowledge bases serve as repositories of structured information, facilitating information retrieval and inference tasks. Our paper proposes LLM2KB, a system for constructing knowledge bases using large language models, with a focus on the Llama 2 architecture and the Wikipedia dataset. We perform parameter efficient instruction tuning for Llama-2-13b-chat and StableBeluga-13B by training small injection models that have only 0.05 % of the parameters of the base models using the Low Rank Adaptation (LoRA) technique. These injection models have been trained with prompts that are engineered to utilize Wikipedia page contexts of subject entities fetched using a Dense Passage Retrieval (DPR) algorithm, to answer relevant object entities for a given subject entity and relation. Our best performing model achieved an average F1 score of 0.6185 across 21 relations in the LM-KBC challenge held at the ISWC 2023 conference.

Motivation & Objective

  • To develop an efficient, scalable method for constructing knowledge bases using large language models.
  • To address the high computational cost of fine-tuning large models by employing parameter-efficient techniques like LoRA.
  • To improve factual knowledge extraction from Wikipedia by integrating context-aware retrieval via Dense Passage Retrieval (DPR).
  • To evaluate the performance of instruction-tuned LLMs on open-domain knowledge base construction, particularly on relations requiring factual recall.
  • To investigate the impact of training data generation strategies and model architecture on relation extraction performance.

Proposed method

  • Fine-tuned Llama-2-13b-chat and StableBeluga-13B using Low-Rank Adaptation (LoRA), updating only 0.05% of the base model parameters.
  • Generated training samples using a prompt engineering strategy that incorporates Wikipedia page contexts for subject entities retrieved via Dense Passage Retrieval (DPR).
  • Designed instruction-tuned prompts to guide the LLM in predicting object entities for a given subject and relation, using context-aware in-context learning.
  • Trained models on two data generation methods: one using only the training set and another using both training and validation sets for sample generation.
  • Evaluated model performance using macro-averaged precision, recall, and F1 scores on the test set of the LM-KBC 2023 challenge.
  • Used Wikidata API to validate predicted object entities, filtering out hallucinated or non-existent entities.
Figure 1: LLM2KB System Architecture.
Figure 1: LLM2KB System Architecture.

Experimental results

Research questions

  • RQ1Can parameter-efficient fine-tuning with LoRA effectively adapt large language models for knowledge base construction without full fine-tuning?
  • RQ2How does incorporating context from Wikipedia passages retrieved via DPR affect the factual accuracy of relation predictions?
  • RQ3What is the performance difference between instruction-tuned Llama-2-13b-chat and StableBeluga-13B on open-domain knowledge base construction tasks?
  • RQ4How do different data generation strategies (training-only vs. training+validation) impact model generalization and F1 scores?
  • RQ5Why do certain relations like 'PersonHasNumberOfChildren' and 'SeriesHasNumberOfEpisodes' show low performance despite context injection?

Key findings

  • The best-performing model, Llama-2-13b-chat fine-tuned with method 1 data generation, achieved an average F1 score of 0.6185 across 21 relations in the LM-KBC 2023 challenge.
  • The Llama-2-13b-chat model outperformed the StableBeluga-13B model when trained with the same data generation method, indicating architectural or fine-tuning sensitivity.
  • The relation 'PersonHasNoblePrize' achieved the highest F1 score (0.9567), while 'PersonHasEmployer' had the lowest (0.2555), indicating strong model bias toward certain relations.
  • Relations requiring numeric answers, such as 'PersonHasNumberOfChildren' and 'SeriesHasNumberOfEpisodes', showed poor performance (F1 < 0.5), as the models often lacked context or relied on memorized facts.
  • The model exhibited hallucination issues, generating plausible but non-existent object entities that failed to resolve via Wikidata API.
  • Minor prompt variations during inference led to significant performance drops, indicating fragility in prompt engineering.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.