Semantic Consistency Scoring with a Verifier LLM for Hallucination Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional hallucination detection techniques in large language models (LLMs) fail to accurately identify incorrect responses due to assumptions about consistency and do not account for inherent inaccuracies in the model or prompt generation, leading to unreliable detection of hallucinations.
Innovation Solution
Generate a set of semantically equivalent prompts and responses using both the target LLM and a verifier LLM, calculating a semantic consistency score based on question-level, model-level, and cross-model cross-question consistency scores to determine the accuracy of the initial response.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional self-check methods are used to detect hallucinations, then the detection process is simple and fast, but the accuracy and reliability of hallucination detection is poor
Solution Approach 1:
The patent introduces a verifier LLM as an intermediary component that independently evaluates the target LLM's responses. The verifier LLM receives the same prompt and generates its own response, then compares it with the target LLM's response to detect hallucinations. This intermediary approach allows for more reliable detection without requiring the target LLM to self-evaluate, thereby improving accuracy while managing complexity through a clear separation of roles.
Solution Approach 2:
The patent creates a copy of the target LLM in the form of the verifier LLM. Both models receive identical prompts and generate responses that are then compared to detect inconsistencies. This copying strategy enables the system to detect hallucinations by comparing parallel outputs from two models, improving detection reliability while maintaining a relatively simple overall structure.
2Reliability
If multiple semantically equivalent prompts are generated and evaluated, then the reliability of hallucination detection improves, but the computational cost and time required increase
Solution Approach 1:
The patent segments the evaluation process into distinct components: generating semantically equivalent prompts, generating responses from both target and verifier LLMs, and comparing the responses. By breaking down the detection task into these segmented steps, the system can efficiently manage computational resources and time while maintaining high reliability through comprehensive multi-prompt evaluation.
3Measurement precision
If semantic consistency scoring is performed across multiple models and prompts, then the precision of hallucination detection improves, but the device complexity and computational resources required increase
Solution Approach 1:
The verifier LLM serves as an intermediary that simplifies the comparison process between multiple models and prompts. Instead of requiring complex direct comparison algorithms, the verifier generates responses that naturally reflect semantic consistency, and the comparison is performed through straightforward response matching, thereby improving measurement precision while keeping system complexity manageable.
Data Source
AI summary
Systems and methods are disclosed for detecting hallucinations in large language models (LLMs). An example method includes receiving a first prompt for submission to the first LLM, generating, using the first LLM, a plurality of semantically equivalent prompts to the first prompt, generating, using the first LLM, a first response to the first prompt and a plurality of second responses to the plurality of semantically equivalent prompts, generating, using a second LLM, a plurality of third responses to the semantically equivalent prompts, generating a semantic consistency score for the first response based at least in part on the first prompt, the plurality of semantically equivalent prompts, the plurality of second responses, and the plurality of third responses, and determining whether or not the first response is an accurate response to the first prompt based at least in part on the semantic consistency score.


