Wikontic: A Tool for Building Knowledge Graphs from Text Aligned with the Wikidata Ontology

Alla Chepurova, Aydar Bulatov, Mikhail Burtsev, Yuri Kuratov

TL;DR

This paper introduces Wikontic, a novel pipeline for automatically constructing Knowledge Graphs (KGs) from unstructured text. By integrating Large Language Models (LLMs) with the structured rigor of Wikidata's ontology, Wikontic addresses the common issues of redundancy and inconsistency in LLM-generated KGs, producing compact, verifiable, and actionable knowledge representations.

What Problem Does This Paper Address?

The vast majority of human knowledge is locked away in unstructured text. While Large Language Models (LLMs) are adept at extracting information from this text, their internal representations are often opaque, prone to "hallucinations," and lack verifiable grounding. Knowledge Graphs (KGs) offer a structured alternative, enabling transparent reasoning and reliable information retrieval. However, building high-quality KGs from text is challenging. Existing methods often struggle with:

  • Redundancy and Inconsistency: The same entities and relations can be expressed in numerous ways (e.g., "NYC" vs. "New York City"), leading to fragmented and duplicated information.
  • Lack of Ontology Grounding: Without a guiding schema, extracted triples can be semantically ambiguous or structurally invalid, undermining the benefits of KGs.
  • Manual Schema Design: Many approaches require significant human effort to define entity types and relation schemas, limiting scalability and flexibility.

Wikontic aims to bridge this gap by creating a robust, automated pipeline for KG construction that is both flexible and grounded in a comprehensive ontology.

Methods

Wikontic employs a multi-stage pipeline to extract and refine knowledge from text:

  1. Candidate Triplet Extraction: LLMs are used to extract subject-relation-object triples. Crucially, these triples are enriched with subject/object entity types and contextual qualifiers (like time or location), capturing more nuanced information than simple triples.
  2. Ontology-aware Triplet Backbone Refinement: This is a core innovation. Extracted entity types are mapped to Wikidata's ontology using vector search over labels and aliases. The pipeline then leverages Wikidata's schema (type hierarchies and relation constraints) to rewrite triples, ensuring they are semantically aligned and structurally valid according to the ontology.
  3. Subject and Object Name Refinement: To combat redundancy, this stage canonicalizes entity mentions. It links new mentions to existing entities in the KG using embedding similarity and LLM verification. Approved matches adopt the canonical label, while original mentions are stored as aliases. This process keeps the KG compact and promotes entity reuse.
  4. KG Storage and Retrieval: The constructed KG is stored in a database, with dense retrieval indexes facilitating efficient deduplication and entity linking. For multi-hop question answering (QA), relevant entities are extracted, linked to the KG, and expanded to a 5-hop neighborhood to provide grounded context for LLMs.

Wikontic also features a user-friendly web interface for text upload, KG visualization, and multi-hop QA.

Datasets

The paper does not explicitly list datasets used for training or evaluation of the Wikontic pipeline itself. However, it heavily relies on Wikidata as the foundational ontology for grounding and schema enforcement.

Key Insights and Ideas

  • Bridging LLM Flexibility with Ontological Rigor: The paper highlights the power of combining the generative capabilities of LLMs with the structured, verifiable knowledge encoded in a large-scale ontology like Wikidata. This synergy allows for both broad coverage and semantic precision.
  • Ontology as a Constraint and Guide: Instead of just extracting facts, Wikontic uses Wikidata's schema not only to validate extracted triples but also to guide the refinement process, ensuring that the generated KGs adhere to established knowledge structures.
  • The Importance of Canonicalization and Alias Tracking: The "Subject and Object Name Refinement" step is critical for creating coherent KGs. By systematically linking different mentions of the same entity and managing aliases, Wikontic significantly reduces graph fragmentation and redundancy.
  • Actionable Knowledge for LLMs: The ultimate goal is to transform ambiguous text into structured, interpretable, and actionable knowledge that can reliably ground LLMs, improving their performance in tasks like retrieval-augmented generation (RAG) and question answering.

Key Results

The paper emphasizes the qualitative improvements of Wikontic over prior methods. It states that Wikontic produces:

  • Compact and coherent graphs: Due to effective entity deduplication and ontology alignment.
  • Schema-aware construction: Without manual schema design.
  • Verifiable and interpretable knowledge: By grounding extractions in Wikidata.

While specific quantitative metrics (like precision/recall on KG construction tasks) are not detailed in the provided text, the authors position Wikontic as uniquely integrating entity canonicalization, alias tracking, and automatic ontology enforcement, which are presented as significant advancements over existing frameworks that offer only partial deduplication or lack ontology grounding.

Limitations and Future Work

Limitations:

  • The paper does not detail specific quantitative evaluations or benchmarks against other KG construction tools.
  • The reliance on Wikidata means the ontology's scope and potential biases are inherited.

Future Work:

  • Extending Wikontic's capabilities to support additional ontologies and domains.
  • Broadening the scope of transparent, verifiable knowledge integration.

Summary updated

Abstract

Knowledge Graphs (KGs) provide structured, verifiable representations that ground facts and supply large language models (LLMs) with reliable real-world information. Building high-quality KGs from open-domain text remains difficult due to redundancy, inconsistency, and lack of ontology grounding. We present Wikontic, a pipeline that extracts triples from text with LLMs and refines them through ontology-based typing, schema validation, and entity deduplication, yielding compact and coherent graphs. Unlike prior frameworks that lack ontology grounding or perform only partial deduplication, Wikontic uniquely integrates entity canonicalization, alias tracking, and automatic enforcement of Wikidata’s ontology, enabling robust schema-aware construction without manual schema design. Its web interface lets users upload text, visualize graphs, and perform multi-hop question answering. By combining LLM flexibility with Wikidata’s ontological rigor, Wikontic transforms ambiguous text into structured, interpretable, and actionable knowledge.
BibTeX
@inproceedings{chepurova2026wikontic,
  author = {Alla Chepurova and Aydar Bulatov and Mikhail Burtsev and Yuri Kuratov},
  title = {{Wikontic: A Tool for Building Knowledge Graphs from Text Aligned with the Wikidata Ontology}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i48.42341},
}

Loading related content...

Figure