LLM Decoding Constraint Term for Hallucination Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing large language models (LLMs) for text generation often produce inaccurate or non-factual outputs, known as hallucination, and may generate toxic or unreasonable text.
Innovation Solution
A decoding mechanism is introduced that adds a constraint term to the decoding logits to generate text outputs with specific desired behaviors, such as reducing toxicity or including desired keywords, thereby improving factual correctness.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If large language models generate text outputs with given instructions, then text generation capability is improved, but factual accuracy deteriorates due to hallucination
Solution Approach 1:
The patent implements a feedback mechanism where the generated text is evaluated against factual constraints, and the decoding process is adjusted based on this feedback. The system computes a constraint term that provides feedback signals to guide the decoding towards factually accurate outputs while maintaining generation capability.
Solution Approach 2:
The patent modifies the decoding parameters by adding a constraint term to the logit distribution. This parameter change allows the model to balance between generating fluent text and adhering to factual constraints, resolving the contradiction between productivity and reliability.
2Reliability
If constraint term is added to decoding logits, then factual accuracy is improved, but decoding complexity increases
Solution Approach 1:
The patent performs preliminary action by pre-computing the constraint term based on the input prompt and factual knowledge before the actual decoding process. This allows the constraint to be integrated efficiently into the decoding logits without requiring complex real-time computations during text generation.
3Reliability
If decoding mechanism is adjusted with constraints, then hallucination is reduced, but generation flexibility decreases
Solution Approach 1:
The patent implements a dynamic constraint application where the strength and type of constraints are adjusted based on the specific decoding context and the model's confidence. This allows the system to maintain flexibility in generation while reducing hallucination, adapting the constraint level to each generation step.
Data Source
AI summary
In view of the need to improve text generation technology, embodiments described herein provide a neural network model that generates a text output with constraints to achieve desired output behavior, such as reduced toxicity or hallucinations, and inclusion of certain keywords.


