Abstract
Open-domain Relational Triplet Extraction (ORTE) is the foundation for mining structured knowledge without predefined schemas. Despite the impressive in-context learning capabilities of Large Language Models (LLMs), existing methods are hindered by their reliance on static, heuristic-driven prompting strategies. Due to the lack of reflection mechanisms required to internalize erroneous signals, these methods exhibit vulnerability in semantic ambiguity, often making erroneous extraction patterns permanent. To address this bottleneck, we propose a Knowledge Reconstruction-driven Prompt Optimization (KRPO) framework to assist LLMs in continuously improving their extraction capabilities for complex ORTE task flows. Specifically, we design a self-evaluation mechanism based on knowledge restoration, which provides intrinsic feedback signals by projecting structured triplets into semantic consistency scores. Subsequently, we propose a prompt optimizer based on a textual gradient that can internalize historical experiences to iteratively optimize prompts, which can better guide LLMs to handle subsequent extraction tasks. Furthermore, to alleviate relation redundancy, we design a relation canonicalization memory that collects representative relations and provides semantically distinct schemas for the triplets. Extensive experiments across three datasets show that KRPO significantly outperforms strong baselines in the extraction F1 score.
Introduction
The primary objective of Open-Domain Relational Triplet Extraction (ORTE) is to transform unstructured text into structured (subject, relation, object) triplets without relying on a predefined schema. While Large Language Models (LLMs) have shown promise in this area, they face significant challenges. Static prompts often fail to capture the linguistic diversity of real-world data, leading to stagnant performance. Furthermore, the absence of ground-truth labels in open-domain settings prevents models from learning from their mistakes. Finally, semantic fragmentation—where different prompts extract synonymous relations (e.g., "born in" vs. "birthplace")—results in redundant and disorganized knowledge graphs.
Methodology
The KRPO framework addresses these challenges through a closed-loop system that mimics human reflection. As illustrated in Figure 1, the framework consists of four integrated modules:
- Knowledge Restoration: The LLM takes an extracted triplet and "restores" it into a natural language sentence.
- Self-Evaluation via NLI: The system employs Natural Language Inference (NLI) to compare the restored sentence against the original input. If the original text entails the restored sentence, the extraction is deemed correct, providing an intrinsic feedback signal.
- Gradient-based Prompt Optimization: KRPO utilizes "textual gradients" where the LLM acts as a prompt engineer. It analyzes NLI scores and errors to iteratively refine the extraction instructions (meta-prompts).
- Relation Canonicalization: To maintain knowledge graph integrity, a Cross-Encoder and dynamic memory identify and merge semantically equivalent relations.
Experimental Evaluation
The framework was evaluated on three benchmark datasets: WebNLG (high-quality DBpedia mappings), REBEL (large-scale Wikipedia-derived corpus), and Wiki-NRE (cross-distribution relational evaluation).
Key Results
KRPO consistently outperforms the state-of-the-art Embedding-based EDC baseline across all datasets. Notably, on WebNLG, KRPO achieved a +10.4% improvement in "Strict" F1 score. As shown in Figure 2, the performance gains are consistent across different metrics (Partial, Strict, and Exact), indicating that the framework enhances both precision and faithfulness to the source text.
An interesting finding is that smaller models, such as Mistral-7B, benefit significantly from KRPO, helping to bridge the performance gap between smaller, more efficient models and larger counterparts like GPT-4o.
Conclusion and Future Work
KRPO introduces a robust mechanism for LLMs to self-correct and optimize their extraction strategies in open-domain environments. While the iterative loop introduces additional computational overhead during the "warm-up" phase and depends on the accuracy of the underlying NLI model, it represents a significant step toward autonomous knowledge mining. Future research will focus on optimizing feedback aggregation and extending this restoration-reflection loop to other complex reasoning tasks.
Summary updated