LLM Hallucination Detection via Vector Embedding Similarity

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvetraining data volumeVSAvoidinformation accuracy
Core Design Contradiction:
Quantity of substanceVSReliability

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

Inventive Principle:
Principle #10Preliminary action

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

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If large language models operate without real-time verification, then processing speed is maintained, but hallucinations occur more frequently

Engineering Contradiction:
Improveresponse generation speedVSAvoidtruthfulness of responses
Core Design Contradiction:
ProductivityVSReliability

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

Inventive Principle:
Principle #10Preliminary action

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

Inventive Principle:
Principle #25Self-service

3Reliability

If hallucination detection systems are added to validate LLM outputs, then accuracy is improved, but system complexity increases

Engineering Contradiction:
Improveresponse accuracyVSAvoidsystem architecture complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250103818A1Hallucination detection as a metric for determining accuracy of results for large language models in machine learning
Publication Date: 2025.03.27 BITVORE CORP
  • US20250103818A1 patent drawing
  • US20250103818A1 patent drawing

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.