Abstract
Large Language Models (LLMs) frequently suffer from hallucinations, even when integrated into Retrieval-Augmented Generation (RAG) pipelines. This paper presents KALMV (Knowledge-Augmented Language Model Verification), a framework that introduces a specialized, small-scale verifier model to diagnose failure points in the RAG process. By distinguishing between retrieval errors and grounding errors, KALMV enables targeted iterative rectification, significantly improving factual accuracy with minimal computational overhead. Our results demonstrate that a 250M parameter verifier can effectively oversee models orders of magnitude larger, yielding up to a 3x improvement in F1 scores on standard benchmarks.
Introduction
Retrieval-Augmented Generation (RAG) has emerged as the primary strategy for grounding LLMs in external, up-to-date knowledge. However, the mere presence of external data does not guarantee factual correctness. Current systems suffer from two primary "suboptimalities":
- Retrieval Error: The system fetches information that is irrelevant or insufficient to answer the user's query.
- Grounding Error: The model retrieves the correct information but fails to incorporate it accurately, either ignoring the context or misinterpreting the facts.
Existing attempts to mitigate these issues often rely on "self-correction"—where the generator evaluates its own output—or simple heuristics like word overlap. These approaches are either computationally expensive, prone to the same biases as the generator, or too simplistic to capture nuanced semantic errors. KALMV addresses these gaps by decoupling verification from generation using a dedicated, instruction-tuned judge.
Methodology
KALMV is a plug-and-play framework designed to be compatible with any existing retriever-generator pipeline. It consists of three core components:
1. Instruction-Finetuned Verifier
Instead of a general-purpose LLM, KALMV utilizes a small, specialized model (e.g., FLAN-T5 Base). This model is trained specifically to categorize triplets consisting of a (Question, Knowledge, Answer) into three distinct labels: Retrieval Error, Grounding Error, or Correct. This specialization allows the model to outperform larger, general-purpose models on the specific task of fact-checking.
2. Ensemble Verification
To mitigate the inherent brittleness of small language models, KALMV employs an ensemble approach. The verifier is prompted with five distinct instruction variations. The final classification is determined by averaging these results, ensuring a more robust and stable verification process without the need to scale the model's parameter count.
3. Iterative Rectification
Once a failure is identified, KALMV triggers a targeted fix:
- If a Retrieval Error is flagged: The system discards the current context and attempts to retrieve a new set of facts from the knowledge base.
- If a Grounding Error is flagged: The system retains the retrieved facts but asks the generator to re-attempt the answer using different sampling parameters (e.g., top-k sampling) to find a more faithful interpretation of the text.
Experimental Setup
The framework was evaluated across two distinct task categories:
- Open-Domain QA (ODQA): Utilizing Natural Questions and HotpotQA, where the knowledge source is unstructured Wikipedia text.
- Knowledge Graph QA (KGQA): Utilizing WebQSP and Mintaka, where the knowledge source consists of structured facts from Wikidata.
To test the robustness of the verifier, the researchers also conducted cross-dataset evaluations, training the verifier on one domain (e.g., Wikipedia) and testing it on another (e.g., Knowledge Graphs).
Key Results and Discussion
Performance Gains
KALMV demonstrated substantial improvements across all benchmarks. On the Natural Questions dataset, using a 250M parameter base model, KALMV increased the F1 score from 18.06 to 52.98—a nearly three-fold improvement over standard RAG baselines. It consistently outperformed existing state-of-the-art frameworks, such as LLM-Augmenter, across various model sizes (Base, Large, and XL).
Efficiency and Latency
A critical advantage of KALMV is its low overhead. Because the verifier only needs to output a single token (A, B, or C) and is significantly smaller than the generator, the computational cost increase is marginal. In the WebQSP dataset, verification added only 3-5% to the total processing cost and was 34 times faster than generating a completely new answer from scratch.
The Power of Small Judges
The study reveals that specialization beats raw scale. A 250M parameter model can effectively verify the outputs of a 3B parameter model or even proprietary models like ChatGPT. Furthermore, the verifier showed strong generalization capabilities; a model trained on Wikipedia-based QA performed well on Knowledge Graph-based QA, suggesting it learns the underlying concepts of "relevance" and "grounding" rather than specific facts.
Conclusion
KALMV provides a highly efficient and effective method for reducing hallucinations in knowledge-augmented systems. By identifying why a model failed—distinguishing between bad search and bad writing—it allows for targeted, iterative improvements.
Future work will explore the potential for joint training, where the retriever and generator learn directly from the verifier's feedback. Additionally, extending this framework to multi-step reasoning tasks remains a priority, as current evaluations focus primarily on single-turn question answering.
Summary updated