Abstract
Large Language Models (LLMs) frequently generate factually incorrect "hallucinations" during complex multi-step reasoning. This paper introduces Knowledge Graph-based Retrofitting (KGR), an autonomous framework that enables LLMs to verify and revise their own draft responses by querying external Knowledge Graphs (KGs). By grounding intermediate reasoning steps rather than just the initial query, KGR significantly improves factual accuracy across various benchmarks.
Introduction
While Large Language Models (LLMs) demonstrate remarkable fluency, they are prone to "hallucinations"—generating plausible-sounding but factually incorrect statements. Traditional Retrieval-Augmented Generation (RAG) systems attempt to mitigate this by fetching external data based on the user's initial prompt. However, a critical gap exists: hallucinations often emerge during the model's internal reasoning process. For instance, an LLM might correctly identify a subject but hallucinate a specific attribute (e.g., a birthdate) that was not part of the original query. Standard "retrieve-before-generation" methods fail to capture these intermediate errors. This research proposes Knowledge Graph-based Retrofitting (KGR) to verify and correct facts as they are generated during the reasoning chain.
Methodology: The KGR Pipeline
The KGR framework treats the LLM's initial output as a "draft" subject to autonomous editing. The process follows a five-step pipeline:
- Claim Extraction: The LLM decomposes its draft response into atomic factual claims.
- Entity Detection & KG Retrieval: Key entities within these claims are identified, and their "local subgraphs" are retrieved from a Knowledge Graph (e.g., Wikidata).
- Fact Selection: The LLM filters the retrieved triples (subject-predicate-object) to retain only those relevant to the draft claims, reducing noise.
- Claim Verification: The original claims are cross-referenced against the selected KG facts.
- Response Retrofitting: The LLM rewrites the response, incorporating corrected information.
This process is inherently iterative; if a revised response introduces new entities, the loop can repeat to ensure the entire reasoning chain remains grounded.
Experimental Evaluation
The researchers evaluated KGR using three LLMs—ChatGPT, text-davinci-003, and Vicuna-13B—across three diverse benchmarks:
- Simple Question: Straightforward, single-hop facts.
- Mintaka: Complex, multilingual reasoning tasks.
- HotpotQA: Multi-hop reasoning requiring the connection of multiple information pieces.
Key Results
KGR consistently outperformed vanilla LLMs, Chain-of-Thought (CoT) prompting, and web-search-based correction methods. Notably:
- On HotpotQA, ChatGPT's F1 score improved from 31.6 to 39.2.
- On Mintaka, KGR achieved an F1 of 60.8, significantly higher than the vanilla score of 56.1.
- KGR outperformed Question-relevant Knowledge Retrieval (QKR)—the standard pre-generation retrieval method—by 6.2 F1 points on Mintaka, highlighting the superiority of retrofitting for complex reasoning.
Discussion and Insights
The core innovation of KGR is reasoning-level grounding. By verifying claims about entities discovered during reasoning, KGR catches errors that traditional RAG misses. The framework is entirely autonomous, requiring no human labeling.
However, the authors identified a precision-recall tradeoff: retrieving excessive KG data can introduce noise that confuses the model. Optimal performance was achieved using small "chunks" of highly relevant triples. Furthermore, while model-agnostic, KGR faces challenges with entity granularity (e.g., detecting overly common words) and increased computational latency due to its multi-step nature.
Conclusion
KGR represents a significant step toward more reliable LLMs by shifting the focus from query-level retrieval to reasoning-level verification. Future work will aim to refine entity detection and fact selection to improve efficiency and noise resistance.
Summary updated