Introduction
While Large Language Models (LLMs) like GPT-4 have demonstrated remarkable proficiency in natural language tasks, they often struggle with generating structured data, such as semantic graphs composed of [subject, predicate, object] triples. This difficulty arises because LLMs are primarily trained on unstructured web text, leading to frequent omissions of key relationships or the "hallucination" of incorrect connections in text-to-graph (T2G) tasks. Existing solutions often rely on fine-tuning smaller models, which sacrifices the general reasoning power of LLMs. To address this, we introduce the PiVe (Prompting with Iterative Verification) framework, which bridges the "verification gap" by employing a specialized critic to guide LLM self-correction.
The PiVe Framework
PiVe operates as a closed feedback loop designed to refine graph outputs through iterative interaction between a primary LLM and a smaller, specialized verifier.
The process follows four distinct stages:
- Initial Prompting: The LLM receives source text and generates an initial graph.
- Verification: A specialized "Verifier Module" (based on T5 or Flan-T5) analyzes the source text alongside the LLM's output.
- Feedback Generation: If the verifier detects missing relationships, it generates a specific "corrective instruction" (e.g., "Add the triple [X, relation, Y]").
- Iteration: This instruction is appended to the prompt, and the LLM regenerates the graph. This cycle continues until the verifier signals the output is correct or a maximum iteration limit is reached.
Self-Supervised Verifier Training
A key innovation of PiVe is its training methodology for the Verifier Module, which avoids the need for manual labeling. The authors utilize a self-supervised perturbation strategy: high-quality text-graph pairs are intentionally "broken" by randomly deleting triples or removing triples that LLMs typically miss. The verifier is then trained to identify these missing components based on the source text, learning to provide precise corrective hints rather than vague instructions.
Experimental Evaluation
The framework was evaluated across three major graph-based benchmarks: KELM-sub (Wikidata-based), WebNLG+2020, and GenWiki. Additionally, the authors introduced GenWiki-HIQ (High Information Quality), a cleaned version of the GenWiki dataset produced by using the verifier module as a data augmentation tool to improve alignment between text and graphs.
Key Results
PiVe demonstrates consistent performance gains across all tested metrics, including Triple Match F1 (T_F1), Graph Match F1 (G_F1), and Graph Edit Distance (GED). Notably, the framework is model-agnostic, providing significant boosts to both ChatGPT and GPT-4.
On the KELM-sub dataset, PiVe boosted the Triple Match F1 from 13.50 to 23.11. The results indicate that providing fine-grained, triple-specific feedback is far more effective than general self-correction methods like "Self-Refine," which often saw performance drops as iterations increased without external verification.
Conclusion
PiVe proves that small, task-specific models can effectively audit and improve the outputs of much larger LLMs. By providing specific corrective instructions, PiVe improves graph generation quality by an average of 26%. Future work will focus on expanding the verifier's scope beyond missing triples to include errors in entity ordering and naming conventions, as well as extending the framework to other structured formats like SQL and JSON.
Summary updated