LLM Hallucination Detection via Vector Embedding Similarity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language models (LLMs) are prone to generating inaccurate or false information due to their training on vast amounts of text data, lacking real-time knowledge and the ability to verify accuracy, leading to hallucinations that can have severe consequences in applications requiring up-to-date information.
Innovation Solution
A system and method using natural language processing (NLP) and similarity analysis with vector embeddings to detect hallucinations by converting natural language queries into structured data queries, leveraging recursive calls to LLMs with specialized prompts, and employing a hallucination score based on entities, context, and metadata to validate truthfulness and provide up-to-date information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If large language models are trained on vast amounts of text data, then their knowledge base is expanded, but they generate more hallucinations and inaccurate information
Solution Approach 1:
The system performs preliminary actions by retrieving relevant information from knowledge bases before the LLM generates responses. This pre-retrieval step ensures that the model has access to accurate, up-to-date information, reducing hallucinations while maintaining the benefits of large-scale training data
Solution Approach 2:
The patent introduces an intermediary verification system that includes a knowledge base and validation module. This intermediary layer mediates between the LLM's generative capabilities and factual accuracy, allowing the model to leverage its training while being constrained by verified information sources
2Productivity
If large language models operate without real-time verification, then processing speed is maintained, but hallucinations occur more frequently
Solution Approach 1:
The system performs preliminary information retrieval and verification before the LLM generates its response. This pre-computation of accurate information allows the model to maintain fast generation speeds while ensuring truthfulness, as the verification work is done in advance rather than during generation
Solution Approach 2:
The verification system operates autonomously alongside the LLM, self-managing the retrieval and validation processes without requiring manual intervention. This self-service approach maintains processing efficiency while ensuring accuracy through automated verification mechanisms
3Reliability
If hallucination detection systems are added to validate LLM outputs, then accuracy is improved, but system complexity increases
Solution Approach 1:
The verification system is designed with multi-functionality, serving multiple purposes: it retrieves information, validates accuracy, detects hallucinations, and provides explanations. This universal approach improves accuracy without proportionally increasing complexity, as a single system handles multiple verification tasks
Solution Approach 2:
The patent introduces an intermediary verification layer that sits between the user query and the LLM output. This mediator handles all verification complexities internally, presenting a simplified interface to users while managing the architectural complexity in the background
Data Source
AI summary
This disclosure describes detecting hallucination as a metric for determining the accuracy of responses from a large language model (LLM). Scores with and without an augmented system are compared. The similarity or dissimilarity may be mapped into a hallucination score. The hallucination score can accurately predict when an answer is likely to be a hallucination. This is accomplished using similarity analysis on the text between un-altered responses and altered responses.

