Dynamic LLM Prompt Construction to Reduce Hallucinations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models (LLMs) such as GPT-3 and GPT-4 are prone to hallucinations, leading to the fabrication of facts, which can be problematic in business settings, necessitating extensive human verification of generated text.

Innovation Solution

A dynamic construction of language model prompts using a summarization model to generate summaries, a scoring model to extract topic-specific data, and a language model to produce accurate output text by incorporating curated factual data.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If LLMs generate text autonomously, then productivity is improved, but reliability deteriorates due to hallucinations and fabrication of facts

Engineering Contradiction:
Improvetext generation speedVSAvoidfact accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary actions by gathering relevant factual data from multiple sources before the LLM generates text. This includes querying knowledge bases, searching documents, and collecting verified information in advance, so that accurate facts are already available when text generation occurs, preventing hallucinations while maintaining productivity

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An intermediary verification layer is introduced between the LLM and the final output. This intermediary component checks generated text against gathered factual data, validates claims, and ensures accuracy before presenting results to users, thus improving reliability without sacrificing the LLM's generative capabilities

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If LLMs are used for business applications, then productivity is improved, but loss of time increases due to required human verification

Engineering Contradiction:
Improvetext generation speedVSAvoidverification time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system implements self-service by enabling the LLM to automatically verify its own generated text against pre-gathered factual data. The model checks its own outputs for accuracy, validates its claims, and corrects errors autonomously, eliminating or reducing the need for human verification and thus reducing time loss while maintaining productivity

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12462095B2Dynamic construction of large language model prompts
Publication Date: 2025.11.04 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12462095B2 patent drawing
  • US12462095B2 patent drawing
  • US12462095B2 patent drawing

AI summary

Example solutions for reducing the likelihood of hallucinations by language models, such as large language models (LLMs) are disclosed. By injecting a sufficient range and quantity of curated factual data into a prompt, the likelihood of a hallucination by an LLM may be reduced. This enables language models to be used in a wider range of settings, in which fabrication of facts is problematic, while reducing the need for a human to carefully check the generated text for accuracy. Examples include: generating a summary of a transcript using a summarization model; extracting topic-specific data from stored data using a scoring model; dynamically generating a language model prompt using the topic-specific data and the summary; and generating an output text using a language model and the language model prompt.