Constraint-Guided In-Context Learning for Domain-Specific Triplet Extraction

View at publisher
Authors: Wei Zhao, Shuaishuai Li
Cited by: 1
References: 6

Abstract

The automation of high-quality knowledge graph construction hinges on the precise extraction of relational triplets from unstructured text. While large language models (LLMs) offer potential solutions, current approaches remain limited in specialized domains due to their reliance on manual annotation and model fine-tuning. Crucially, the absence of explicit constraints on knowledge reasoning introduces significant uncertainty and errors in domain-specific triplet extraction. To address these gaps, this study proposes OntoP2KG, a novel framework integrating domain ontology constraints with structured prompt engineering. The method first identifies domain-subdomain attributes of input text, retrieves relevant concepts from ontologies and few-shot examples, and constructs a knowledge-enriched context. Subsequently, through structured prompts, the LLM is guided to perform accurate triplet extraction, followed by redundancy resolution based on graph embedding similarity and rule matching. Experimental results demonstrate that OntoP2KG significantly improves precision and recall in domain triplet extraction without requiring parameter fine-tuning, providing a robust path toward automated construction of domain-specific knowledge graphs.

Fields of Study & Subjects

Domain Adaptation and Few-Shot Learning Topic Modeling Constraint Satisfaction and Optimization

Publication details

Journal / source
2026 2nd International Conference on Electrical Automation and Artificial Intelligence (ICEAAI)
Publisher
IEEE
Pages
1244–1247
Publication date
16 January 2026