# US 2026/0087363 A1 · Large language model (llm) hallucination reduction by adverserial prompt refinement

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0087363 A1
- Document ID: US20260087363A1
- Status: Published application
- Kind: A1
- Application number: 18/894,386
- Filed: 2024-09-24
- Published: 2026-03-26
- Earliest claimed: 2024-09-24
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Qiang GAN; Chungheong GOOI; Chujie HE; Robert Tyler Kazuo DESJARDINS
- Web page: https://patentgrep.com/patent/US20260087363A1

## CPC

- G06F 40/16: Automatic learning of transformation rules, e.g. from examples
- G06N 3/094: Adversarial learning
- G06F 40/186: Templates
- G06F 40/216: using statistical methods
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/30: Semantic analysis
- G06F 40/35: Discourse or dialogue representation
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F 40/56: Natural language generation
- G06N 3/0475: Generative networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Solutions disclosed herein provide for the reduction of hallucinations by language models, such as large language models (LLMs), by adversarial prompt refinement. A generator prompt template, including at least a generator prompt reference section, of a user is received from a computing device. The generator prompt template is provided as an input to a language model, the language model having an LLM-based generator, an LLM-based judger, and an LLM-based reproducer. Within the LLM-based generator, a generated response is generated from the generator prompt template. The generated response is then evaluated for a hallucination by the LLM-based judger. Based on that evaluation, a final generator prompt template is generated using an adversarial generator prompt template refinement process. For example, the adversarial generator prompt template refinement process may utilize an evolutionary prompt optimization process. The final generator prompt template, having a reduced hallucination risk, is then deployed to the LLM-based generator.

## Claims

### Claim 1

A system for LLM hallucination reduction, comprising:
a memory containing computer-readable instructions executable by a processor; and
a Large Language Model (LLM) system implemented at the processor, comprising:
an LLM-based adversarial prompt refiner configured to generate a final generator prompt template using an adversarial generator prompt template refinement process, the LLM-based adversarial prompt refiner comprising:
an LLM-based generator configured to receive a generator prompt template of a user from a computing device, wherein the generator prompt template includes at least a generator prompt reference section, and generate one or more generated responses from the generator prompt template or one or more reproduced generator prompt templates,
an LLM-based judger configured to generate a judgment indicator indicating a presence or an absence of one or more hallucinations for each generated response of the one or more generated responses, compare each judgement indicator with a configurable threshold value, and deploy the final generator prompt template, wherein the final generator prompt template is based on at least the generator prompt template or reproduced generator prompt template corresponding to the generated response of the one or more generated responses having the judgment indicator lesser than or equal to the configurable threshold value; and
an LLM-based reproducer configured to, in response to the judgement indicator comparison, generate one or more reproduced generator prompt templates.

### Claim 2 (depends on 1)

The system of claim 1, wherein evaluating each generated response of the one or more generated responses for one or more hallucinations within the LLM-based judger comprises:
accepting as inputs at the LLM-based judger, the generated response, and the generator prompt reference section;
generating a judger instance from the inputs and a judger prompt template; and
generating from the judger instance, a judgment indicator, and a judgment explanation, wherein the judgment indicator indicates a presence or an absence of one or more hallucinations in the generated response, wherein the judgment explanation indicates how the LLM-based judger determined whether the generated response included a hallucination, and wherein the judgment explanation is based on at least the generator prompt reference section.

### Claim 3 (depends on 1)

The system of claim 1, wherein the adversarial generator prompt template refinement process further comprises an evolutionary prompt template optimization process, the evolutionary prompt template optimization process comprising:
initializing an initial population of one or more reproduced generator prompt templates within the LLM-based reproducer, wherein the initial population of one or more reproduced generator prompt templates is generated from the generator prompt template, and wherein each reproduced generator prompt template of the initial population includes one or more mutations;
generating within the LLM-based generator from the initial population of one or more reproduced generator prompt templates, one or more generated responses, wherein each generated response of the one or more generated responses corresponds to each reproduced generator prompt template of the one or more reproduced generator prompt templates;
generating a judgment indicator within the LLM-based judger for each generated response the one or more generated response;
comparing each judgment indicator against the configurable threshold value;
selecting one or more reproduced generator prompt templates corresponding to the one or more generated responses having an improved judgment indicators; and
creating one or more generations of one or more reproduced generator prompt templates until a judgment indicator is equal to or lesser than the configurable threshold value.

### Claim 4 (depends on 3)

The system of claim 3, wherein the creating of each generation of the one or more generations comprises repeating a series of operations, the series of operations comprising:
reproducing the selected one or more reproduced generator prompt templates, wherein each reproduced generator prompt template of one or more reproduced generator prompt templates includes a one or more mutations;
generating the judgment indicator for each reproduced generator prompt template of the one or more reproduced generator prompt templates, wherein each judgment indicator is based on at least the generated response for each reproduced generator prompt template;
selecting one or more reproduced generator prompt templates having an improved judgment indicator;
comparing the judgment indicator against the configurable threshold value; and
based on at least the comparison, terminating the series of operations when the judgment indicator for a generated response is equal to or lesser than the configurable threshold value;
selecting a generated response having the judgment indicator equal to or lesser than the configurable threshold value; and
outputting the final generator prompt template, wherein the final generator prompt template is the selected generated response.

### Claim 5 (depends on 4)

The system of claim 4, wherein each mutation of the one or more mutations comprise at least one unique mutation.

### Claim 6 (depends on 4)

The system of claim 4, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
terminating the series of operations after a configurable number of generations;
selecting a generated response having an improved judgment indicator; and
outputting the final generator prompt template, wherein the final generator prompt template is the reproduced generator prompt template corresponding to the selected generated response.

### Claim 7 (depends on 4)

The system of claim 4, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
organizing the one or more reproduced generator prompt templates into pairs; and
exchanging an attribute between each reproduced generator prompt template of each pair.

### Claim 8

A method for hallucination reduction, comprising:
receiving a generator prompt template of a user from a computing device as an input to a Large Language Model (LLM), wherein the generator prompt template includes at least a generator prompt reference section, and wherein the LLM comprises an LLM-based adversarial prompt refiner configured to generate a final generator prompt template using an adversarial generator prompt template refinement process, the adversarial generator prompt template refinement process comprising:
generating within an LLM-based generator, one or more generated responses from the generator prompt template or reproduced generator prompt templates;
generating within an LLM-based judger, a judgment indicator indicating a presence or an absence of one or more hallucinations for each generated response of the one or more generated responses;
comparing within the LLM-based judger, each judgement indicator with a configurable threshold value;
deploying from the LLM-based judger, the final generator prompt template, wherein the final generator prompt template is based on at least the generator prompt template or reproduced generator prompt template corresponding to the generated response of the one or more generated responses having the judgment indicator lesser than or equal to the configurable threshold value; and
generating one or more reproduced generator prompt templates, within an LLM-based reproducer, in response to the judgement indicator comparison.

### Claim 9 (depends on 8)

The method of claim 8, wherein evaluating each generated response of the one or more generated responses for one or more hallucinations within the LLM-based judger comprises:
accepting as inputs at the LLM-based judger, the generated response, and the generator prompt reference section;
generating a judger instance from the inputs and a judger prompt template; and
generating from the judger instance, a judgment indicator, and a judgment explanation, wherein the judgment indicator indicates a presence or an absence of one or more hallucinations in the generated response, wherein the judgment explanation indicates how the LLM-based judger determined whether the generated response included a hallucination, and wherein the judgment explanation is based on at least the generator prompt reference section.

### Claim 10 (depends on 8)

The method of claim 8, wherein the adversarial generator prompt template refinement process further comprises an evolutionary prompt template optimization process, the evolutionary prompt template optimization process comprising:
initializing an initial population of one or more reproduced generator prompt templates within the LLM-based reproducer, wherein the initial population of one or more reproduced generator prompt templates is generated from the generator prompt template, and wherein each reproduced generator prompt template of the initial population includes one or more mutations;
generating within the LLM-based generator from the initial population of one or more reproduced generator prompt templates, one or more generated responses, wherein each generated response of the one or more generated responses corresponds to each reproduced generator prompt template of the one or more reproduced generator prompt templates;
generating a judgment indicator within the LLM-based judger for each generated response the one or more generated response;
comparing each judgment indicator against the configurable threshold value;
selecting one or more reproduced generator prompt templates corresponding to the one or more generated responses having an improved judgment indicators; and
creating one or more generations of one or more reproduced generator prompt templates until a judgment indicator is equal to or lesser than the configurable threshold value.

### Claim 11 (depends on 10)

The method of claim 10, wherein the creating of each generation of the one or more generations comprises repeating a series of operations, the series of operations comprising:
reproducing the selected one or more reproduced generator prompt templates, wherein each reproduced generator prompt template of one or more reproduced generator prompt templates includes a one or more mutations;
generating the judgment indicator for each reproduced generator prompt template of the one or more reproduced generator prompt templates, wherein each judgment indicator is based on at least the generated response for each reproduced generator prompt template;
selecting one or more reproduced generator prompt templates having an improved judgment indicator;
comparing the judgment indicator against the configurable threshold value; and
based on at least the comparison, terminating the series of operations when the judgment indicator for a generated response is equal to or lesser than the configurable threshold value;
selecting a generated response having the judgment indicator equal to or lesser than the configurable threshold value; and
outputting the final generator prompt template, wherein the final generator prompt template is the selected generated response.

### Claim 12 (depends on 11)

The method of claim 11, wherein each mutation of the one or more mutations comprise at least one unique mutation.

### Claim 13 (depends on 11)

The method of claim 11, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
terminating the series of operations after a configurable number of generations;
selecting a generated response having an improved judgment indicator; and
outputting the final generator prompt template, wherein the final generator prompt template is the reproduced generator prompt template corresponding to the selected generated response.

### Claim 14 (depends on 11)

The method of claim 11, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
organizing the one or more reproduced generator prompt templates into pairs; and
exchanging an attribute between each reproduced generator prompt template of each pair.

### Claim 15

A method for LLM hallucination reduction, comprising:
receiving a generator prompt template of a user from a computing device as an input to a Large Language Model (LLM), wherein the generator prompt template includes at least a generator prompt reference section, and wherein the LLM comprises an LLM-based adversarial prompt refiner configured to generate a final generator prompt template using an adversarial generator prompt template refinement process, the adversarial generator prompt template refinement process comprising:
generating within an LLM-based generator, one or more generated responses from the generator prompt template or reproduced generator prompt templates;
generating within an LLM-based judger, a judgment indicator indicating a presence or an absence of one or more hallucinations for each generated response of the one or more generated responses;
comparing within the LLM-based judger, each judgement indicator with a configurable threshold value;
deploying from the LLM-based judger, the final generator prompt template, wherein the final generator prompt template is based on at least the generator prompt template or reproduced generator prompt template corresponding to the generated response of the one or more generated responses having the judgment indicator lesser than or equal to the configurable threshold value; and
generating one or more reproduced generator prompt templates, within an LLM-based reproducer, in response to the judgement indicator comparison wherein each reproduced generator prompt template of one or more reproduced generator prompt templates includes a one or more mutations.

### Claim 16 (depends on 15)

The method of claim 15, wherein evaluating each generated response of the one or more generated responses for one or more hallucinations within the LLM-based judger comprises:
accepting as inputs at the LLM-based judger, the generated response, and the generator prompt reference section;
generating a judger instance from the inputs and a judger prompt template; and
generating from the judger instance, a judgment indicator, and a judgment explanation, wherein the judgment indicator indicates a presence or an absence of one or more hallucinations in the generated response, wherein the judgment explanation indicates how the LLM-based judger determined whether the generated response included a hallucination, and wherein the judgment explanation is based on at least the generator prompt reference section.

### Claim 17 (depends on 15)

The method of claim 15, wherein the adversarial generator prompt template refinement process further comprises an evolutionary prompt template optimization process, the evolutionary prompt template optimization process comprising:
initializing an initial population of one or more reproduced generator prompt templates within the LLM-based reproducer, wherein the initial population of one or more reproduced generator prompt templates is generated from the generator prompt template, wherein each reproduced generator prompt template of the initial population includes one or more mutations and wherein each mutation of the one or more mutations comprise at least one unique mutation;
generating within the LLM-based generator from the initial population of one or more reproduced generator prompt templates, one or more generated responses, wherein each generated response of the one or more generated responses corresponds to each reproduced generator prompt template of the one or more reproduced generator prompt templates;
generating a judgment indicator within the LLM-based judger for each generated response the one or more generated response;
comparing each judgment indicator against the configurable threshold value;
selecting one or more reproduced generator prompt templates corresponding to the one or more generated responses having an improved judgment indicators; and
creating one or more generations of one or more reproduced generator prompt templates until a judgment indicator is equal to or lesser than the configurable threshold value.

### Claim 18 (depends on 17)

The method of claim 17, wherein the creating of each generation of the one or more generations comprises repeating a series of operations, the series of operations comprising:
reproducing the selected one or more reproduced generator prompt templates, wherein each reproduced generator prompt template of one or more reproduced generator prompt templates includes a one or more mutations, and wherein each mutation of the one or more mutations comprise at least one unique mutation;
generating the judgment indicator for each reproduced generator prompt template of the one or more reproduced generator prompt templates, wherein each judgment indicator is based on at least the generated response for each reproduced generator prompt template;
selecting one or more reproduced generator prompt templates having an improved judgment indicator;
comparing the judgment indicator against the configurable threshold value; and
based on at least the comparison, terminating the series of operations when the judgment indicator for a generated response is equal to or lesser than the configurable threshold value;
selecting a generated response having the judgment indicator equal to or lesser than the configurable threshold value; and
outputting the final generator prompt template, wherein the final generator prompt template is the selected generated response.

### Claim 19 (depends on 18)

The method of claim 18, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
terminating the series of operations after a configurable number of generations;
selecting a generated response having an improved judgment indicator; and
outputting the final generator prompt template, wherein the final generator prompt template is the reproduced generator prompt template corresponding to the selected generated response.

### Claim 20 (depends on 15)

The method of claim 15, wherein creating each generation of the one or more generations of reproduced generator prompts further comprises:
organizing the one or more reproduced generator prompt templates into pairs; and
exchanging an attribute between each reproduced generator prompt template of each pair.
