An Ontology-Guided, Deduplication-Aware Extraction Layer for Knowledge Graph Construction from Heterogeneous Documents
Abstract
Large language models extract entities and relationships from unstructured documents fluently but inconsistently: type vocabularies fracture across documents, the same person surfaces under several name variants, relationships duplicate, and distinct individuals who share a name risk silent conflation. This paper presents the design, implementation, and empirical refinement of a production extraction layer that converts a live document stream into a validated knowledge graph aligned to a formal ontology. The system consumes document metadata from Kafka, routes PDF, spreadsheet, Office, and image content through handlers built for each format, and extracts entities and relationships in two passes using a locally hosted Qwen3.5-9B model tuned on the ontology. Its distinguishing component is ontology-guided extraction: the relevant slice of a curated ontology is retrieved live from a graph database by embedding similarity and injected into the extraction prompt, reducing catalog overhead by about 94 percent relative to static domain slices. Extracted results then pass through a refinement pipeline of five stages: deterministic cleaning, merging across chunks, a second pass for relationships, six deduplication algorithms that require no model inference, and an embedding resolution subsystem whose conflict guard no similarity score can override. Evaluation on intelligence corpora improved search recall from roughly 70 to 95 percent with no false merges, and corrected seven classes of silent quality defect, ranging from a bug that truncated source text by a single character to the systematic duplication of entities that carried title prefixes.
Create a lesson
Related papers
Knowledge Graph Re-engineering Along the Ontological Continuum (extended version)
Shared title terminologycs.AIEnrico Daga, Valentina Tamma, Terry Payne
From Shared Patterns to Individual Evidence: Two-Stage Reasoning for Emerging Entities in Temporal Knowledge Graphs
Shared title terminologycs.AIJinchuan Zhang, Lei Gao, Hongyu Jiang et al.
Evaluating Aviation Safety Knowledge Extraction with SmolLM2: From Zero-Shot to Retrieval-Grounded Prompting
Shared title terminologycs.AIAziida Nanyonga, Mustafa Tahsin Yilmaz, Amir Hussain et al.
Did the Model Forecast It, or Already Know It? Evaluating Large Language Models for Novel Drug-Target Prioritisation with a Temporal Knowledge-Graph Oracle
Shared title terminologycs.AIPui Chung Siu, Yuan Liang, Claudia Cabrera et al.
ExtractBench Pro: The Long Tail of Document Extraction
Shared title terminologycs.AIBoyang Zhang, Justin Xu, Adrian Lyjak et al.
SlicePlanner: Logic-Guided Agentic AI for Online QoS-Aware Network Slicing in Open RAN
Shared title terminologycs.AIAdhwaa Al-Chaab, Ayman Younis, Dario Pompili