Context-Driven LLM Fine-Tuning for Noisy RAG Retrieval
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Large language models (LLMs) face challenges such as hallucinations, reliance on out-of-date information, and the opaqueness of untraceable thought processes, which hinder their widespread use and acceptance, and existing Retrieval Augmented Generation (RAG) systems struggle with noise in contextual information, leading to incorrect responses.
Innovation Solution
A context-driven fine-tuning method for LLMs using a preference ranking system and automatically-generated training datasets, which includes generating grounded, ungrounded, and incorrect responses to enhance faithfulness and answer similarity, and instruct the LLM to abstain from generating responses when necessary, without human labeling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If RAG systems incorporate retrieval augmentation to improve response accuracy, then response accuracy is improved, but noise in contextual information deteriorates performance
Solution Approach 1:
The patent converts the harmful noise in retrieved context into beneficial training data by automatically generating preference datasets that include both correct and incorrect responses. The noise and incorrect contexts are used to train the model to recognize and reject harmful information, transforming the problem of noise into an opportunity to improve robustness through automated preference learning without human labeling.
Solution Approach 2:
The system implements feedback mechanisms where the LLM generates responses to prompts with retrieved context, and then automatically evaluates these responses to generate preference datasets. This feedback loop allows the model to learn from its own performance and improve its ability to handle noisy contexts through iterative training on generated preference data.
2Ease of operation
If RAG systems rely on prompts to steer LLM responses, then response control is improved, but factual errors and hallucinations increase
Solution Approach 1:
The patent enables the LLM to self-evaluate and self-correct by automatically generating preference datasets without external human labeling. The model uses its own generated responses to create training data that reinforces factual accuracy and reduces hallucinations, allowing it to improve its own performance through self-service learning rather than relying solely on external prompt engineering.
Solution Approach 2:
The system performs preliminary training using automatically generated preference datasets before final deployment. By pre-training the model on curated preference data that includes correct responses and examples of incorrect responses to avoid, the model is prepared to reduce factual errors and hallucinations during actual operation, improving reliability before it serves end users.
3Measurement precision
If human labeling is used to create training datasets, then training quality is improved, but time and resource consumption increase
Solution Approach 1:
The patent implements self-service by having the LLM automatically generate its own training data without requiring human annotators. The model generates responses to prompts, evaluates these responses against retrieved context, and creates preference datasets autonomously. This eliminates the time-consuming process of human labeling while maintaining training quality through automated evaluation and preference learning.
Solution Approach 2:
The system creates copies of training data by automatically generating synthetic preference datasets that replicate the quality and structure of manually labeled data. These synthetic copies are generated by the LLM itself, providing sufficient training material without the need for expensive human annotation, thereby reducing time and resource consumption while maintaining adequate training quality.
Data Source
AI summary
Techniques for fine-tuning a machine-learned model for reliable retrieval augmented generation are provided. In one technique, a question for a large language model (LLM) is identified. A context data item that is in an incorrect context relative to the question is also identified. The question and the context data item are input into the LLM, resulting in the LLM generating a response. A training instance that comprises the question, the context data item, a deny response as a correct answer, and the response as a rejected answer is generated. A machine-learned model (e.g., the LLM) is fine-tuned based on the training instance.


