Abstract
The Large Language Models for Knowledge Engineering (LLMKE) pipeline addresses the challenge of Knowledge Base Completion by transforming unstructured LLM outputs into structured Wikidata entries. By integrating retrieval-augmented generation with sophisticated entity disambiguation strategies, the authors achieved a winning macro-averaged F1-score of 0.701 in the ISWC 2023 LM-KBC Challenge. This paper details the two-step methodology—knowledge probing and entity mapping—and analyzes the performance across diverse domains, demonstrating that while LLMs are powerful knowledge repositories, they require specialized pipelines to meet the rigors of formal knowledge engineering.
Introduction
Knowledge Graphs (KGs) such as Wikidata serve as critical infrastructure for structured web data. However, their maintenance is traditionally labor-intensive, requiring either massive collaborative efforts or brittle rule-based extraction. While Large Language Models (LLMs) offer a potential "knowledge repository" to automate this process, they suffer from hallucinations and lack the ability to output unique identifiers (QIDs) required for formal KGs. This study introduces the LLMKE pipeline to bridge this gap, focusing on predicting objects for given subjects and relations and linking them to Wikidata.
Methodology
The LLMKE pipeline consists of two primary stages designed to extract and then formalize knowledge.
1. Knowledge Probing
The authors evaluated three distinct methods for extracting facts from GPT-3.5-turbo and GPT-4:
- Question Prompting: Direct natural language queries (e.g., "Which countries border Brazil?").
- Triple Completion: Structured completion tasks (e.g., "River Thames, RiverBasinsCountry:").
- Retrieval-Augmented Context: A refinement process where the LLM's initial prediction is updated after being provided with the subject's Wikipedia introduction and infobox.
2. Wikidata Entity Mapping
To resolve the ambiguity of text outputs (e.g., distinguishing "Mercury" the planet from the element), three disambiguation strategies were implemented:
- Case-based: Hard-coded rules for constrained answer spaces.
- Keyword-based: Filtering candidates based on descriptive keywords (e.g., ensuring an "official language" entry contains the word "language").
- LM-based: Utilizing the LLM to select the most probable QID from a list of candidates and descriptions.
Experimental Setup
The study utilized the ISWC 2023 LM-KBC Challenge dataset, derived from Wikidata. The dataset encompasses 21 relation types across seven domains, including geography, sports, and chemistry, with 1,940 statements each for training, validation, and testing.
Results and Analysis
The LLMKE system secured first place in Track 2 of the challenge. Quantitative analysis shows that GPT-4 consistently outperformed GPT-3.5-turbo across all metrics. Notably, the "improved" disambiguation methods provided a consistent F1 boost of approximately 0.025–0.028 over the baseline search results, underscoring the importance of the mapping stage.
Domain-Specific Insights
Performance varied significantly by relation type. LLMs demonstrated near-perfect accuracy in domains with limited answer spaces or high-profile facts, such as Nobel Prize winners. Conversely, they struggled with "long-tail" data, such as the specific employers of less-prominent figures.
A key finding was the "knowledge gap" where LLMs occasionally provided more current information than Wikidata. For instance, GPT-4 correctly identified Exor as the parent company of Ferrari, reflecting recent changes found in Wikipedia that had not yet been updated in Wikidata. This suggests that LLMs could be powerful tools for Knowledge Base Maintenance and identifying outdated entries.
Discussion and Future Work
While LLMKE demonstrates significant progress, fully autonomous knowledge engineering remains elusive. Human-in-the-loop verification is still necessary to ensure integrity, particularly for deep disambiguation errors where entities are referred to by non-standard aliases. Future research will explore ensemble approaches to mitigate the specific "blind spots" of individual models and improve the robustness of the entity mapping stage.
Summary updated