Neural Network Response Hallucination Detection and Correction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Neural network models, such as large language models (LLMs), often produce hallucinations due to insufficient training data or input data errors, which existing methods like improving data quality or validation fail to completely prevent.

Innovation Solution

An electronic apparatus and method to detect hallucinations by assessing responses based on context within prompts, modifying responses to remove errors, and providing feedback for neural network model retraining.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If neural network models are trained with more data or improved data quality, then model performance improves, but hallucinations cannot be completely prevented

Engineering Contradiction:
Improvemodel performanceVSAvoidhallucination
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The patent applies preliminary action by detecting hallucinations before they affect the final output. The system assesses the response against the context from the prompt in advance, identifying hallucinations during the inference process rather than after training. This allows the system to prevent harmful outputs by catching issues early in the generation process.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by creating a mechanism that evaluates the response against the original prompt context and provides assessment results that can be used to modify or reject hallucinated outputs. The feedback loop assesses whether the response contains information not supported by the prompt context, enabling continuous improvement and correction of hallucinations in real-time.

Inventive Principle:
Principle #23Feedback

2Reliability

If validation of input data is increased, then data quality improves, but processing time and complexity increase

Engineering Contradiction:
Improvedata qualityVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by validating only the critical aspect of data quality - whether the response contains hallucinations relative to the prompt context - rather than performing comprehensive validation of all input data. This selective validation approach maintains reliability for the most important function (preventing hallucinations) while reducing overall processing time and computational complexity.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If hallucination detection is performed by assessing response against context, then detection accuracy improves, but computational resources increase

Engineering Contradiction:
Improvehallucination detection accuracyVSAvoidcomputational resources
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent applies segmentation by dividing the hallucination detection task into discrete assessable elements. Instead of analyzing the entire response at once, the system evaluates specific aspects of the response against the prompt context, breaking down the complex detection problem into manageable assessment units that can be processed more efficiently with reduced computational resources.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250335778A1Method of removing hallucination in result of inference by neural network model, and electronic apparatus for performing the same
Publication Date: 2025.10.30 SAMSUNG ELECTRONICS CO LTD
  • US20250335778A1 patent drawing
  • US20250335778A1 patent drawing
  • US20250335778A1 patent drawing

AI summary

A method of removing a hallucination in a result of inference by a neural network model may include obtaining a response of a neural network model based on a prompt provided to the neural network model; determining, based on a context comprised in the prompt, whether a hallucination has occurred in the response; and based on determining that the hallucination has occurred, modifying the response and outputting the modified response.