# US 2026/0099515 A1 · Automated prompt generator using differential evolution and chain of thought

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

- Number: US 2026/0099515 A1
- Document ID: US20260099515A1
- Status: Published application
- Kind: A1
- Application number: 18/906,759
- Filed: 2024-10-04
- Published: 2026-04-09
- Earliest claimed: 2024-10-04
- Assignees: Genpact USA, Inc.
- Applicants: Genpact USA, Inc.
- Inventors: Divyanshi Yadav; Varsha Rani; Prakash Selvakumar; Sreekanth Menon
- Web page: https://patentgrep.com/patent/US20260099515A1

## CPC

- G06F 16/3329: Natural language query formulation
- G06F 16/3326: {using relevance feedback from the user, e.g. relevance feedback on documents, documents sets, document terms or passages}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and system for automatically generating prompts is disclosed. In some embodiments, the method includes providing user input to large language models (LLMs) utilizing meta prompting to generate a set of prompts represented by vectors. The method includes the LLMs identifying differential vector(s) from the vectors, mutating the vectors with the differential vector(s), and using first algorithm(s) to determine mutated prompt vector(s). The method includes generating an intermediate prompt by combining the mutated prompt vector(s) with the set of prompts and selecting a prompt vector using second algorithm(s). The method also includes dividing a task of validating the intermediate prompt into subtasks. The method further includes performing the subtasks by the software-based agents as part of a chain of thought (CoT) process to validate the intermediate prompt and outputting suggestion(s), and generating a final prompt by refining the intermediate prompt using the suggestion(s).

## Claims

### Claim 1

A method for automatically generating prompts, the method comprising:
providing user input to one or more large language models (LLMs) utilizing meta prompting to generate a set of prompts represented by a plurality of vectors;
identifying, by the one or more LLMs, a plurality of differential vectors from pairs of prompt vectors selected from the plurality of vectors representing the set of prompts;
mutating, by the one or more LLMs, the plurality of vectors representing the set of prompts with the plurality of differential vectors and using one or more first algorithms to determine one or more mutated prompt vectors;
generating an intermediate prompt, using the one or more LLMs, by combining the one or more mutated prompt vectors with the plurality of vectors representing the set of prompts and selecting a prompt vector representing the intermediate prompt using one or more second algorithms;
dividing a task of validating the intermediate prompt into a plurality of subtasks to be respectively performed by each of a plurality of software-based agents;
performing the plurality of subtasks by the plurality of software-based agents as part of a chain of thought (CoT) process to validate the intermediate prompt and output one or more suggestions for prompt modification; and
generating a final prompt by refining the intermediate prompt using the one or more suggestions.

### Claim 2 (depends on 1)

The method of claim 1, wherein the one or more algorithms are applied to ensure each differential portion obtained from the one or more LLMs is included in the one or more mutated prompt vectors.

### Claim 3 (depends on 1)

The method of claim 1, wherein the one or more algorithms include an objective function.

### Claim 4 (depends on 1)

The method of claim 1, wherein outputting the one or more suggestions comprises:
using the one or more LLMs to execute the intermediate prompt on validation data and generate an execution result, wherein the validation data is different from the user input;
analyzing the intermediate prompt based on the execution result; and
outputting the one or more suggestions by the one or more LLMs from analyzing the intermediate prompt.

### Claim 5 (depends on 1)

The method of claim 1, wherein the set of prompts, the intermediate prompt, and the final prompt are generated based on the one or more LLMs receiving and recognizing domain-specific data using the CoT.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
dynamically creating a plurality of test cases using the one or more LLMs; and
evaluating the final prompt based on executing the final prompt on test data of the plurality of test cases.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
generating an evaluation score based on evaluation of the final prompt on the plurality of test cases; and
presenting the final prompt to a user when the evaluation score exceeds a threshold score.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
receiving user feedback to refine the final prompt when the evaluation score does not exceed the threshold score.

### Claim 9 (depends on 8)

The method of claim 8, wherein the final prompt is refined by adjusting hyperparameters of the LLMs or manually enhancing the final prompt with domain-related information.

### Claim 10 (depends on 1)

The method of claim 1, further comprising iterating one or more of steps including providing, identifying, mutating, generating the intermediate prompt, dividing, performing, and generating the final prompt.

### Claim 11

A system for automatically generating prompts, the system comprising:
a processor; and
a memory in communication with the processor and comprising instructions which, when executed by the processor, program the processor to:
provide user input to one or more large language models (LLMs) utilizing meta prompting to generate a set of prompts represented by a plurality of vectors;
identify, by the one or more LLMs, a plurality of differential vectors from pairs of prompt vectors selected from the plurality of vectors representing the set of prompts;
mutate, by the one or more LLMs, the plurality of vectors representing the set of prompts with the plurality of differential vectors and use one or more first algorithms to determine one or more mutated prompt vectors;
generate an intermediate prompt, using the one or more LLMs, by combining the one or more mutated prompt vectors with the plurality of vectors representing the set of prompts and selecting a prompt vector representing the intermediate prompt using one or more second algorithms;
divide a task of validating the intermediate prompt into a plurality of subtasks to be respectively performed by each of a plurality of software-based agents;
perform the plurality of subtasks by the plurality of software-based agents as part of a chain of thought (CoT) process to validate the intermediate prompt and output one or more suggestions for prompt modification; and
generate a final prompt by refining the intermediate prompt using the one or more suggestions.

### Claim 12 (depends on 11)

The system of claim 11, wherein the one or more algorithms are applied to ensure each differential portion obtained from the one or more LLMs is included in the one or more mutated prompt vectors.

### Claim 13 (depends on 11)

The system of claim 11, wherein the one or more algorithms include an objective function.

### Claim 14 (depends on 11)

The system of claim 11, wherein to output the one or more suggestions, the instructions further program the processor to:
use the one or more LLMs to execute the intermediate prompt on validation data and generate an execution result, wherein the validation data is different from the user input;
analyze the intermediate prompt based on the execution result; and
output the one or more suggestions by the one or more LLMs from analyzing the intermediate prompt.

### Claim 15 (depends on 11)

The system of claim 11, wherein the set of prompts, the intermediate prompt, and the final prompt are generated based on the one or more LLMs receiving and recognizing domain-specific data using the CoT.

### Claim 16 (depends on 11)

The system of claim 11, wherein the instructions further program the processor to:
dynamically create a plurality of test cases using the one or more LLMs; and
evaluate the final prompt based on executing the final prompt on test data of the plurality of test cases.

### Claim 17 (depends on 16)

The system of claim 16, wherein the instructions further program the processor to:
generate an evaluation score based on evaluation of the final prompt on the plurality of test cases; and
present the final prompt to a user when the evaluation score exceeds a threshold score.

### Claim 18 (depends on 17)

The system of claim 17, wherein the instructions further program the processor to receive user feedback to refine the final prompt when the evaluation score does not exceed the threshold score.

### Claim 19 (depends on 11)

The system of claim 11, wherein the instructions further program the processor to iterate one or more of steps including providing, identifying, mutating, generating the intermediate prompt, dividing, performing, and generating the final prompt.

### Claim 20

A computer program product for automatically generating prompts, the computer program product comprising a non-transitory computer readable medium having computer readable program code stored thereon, the computer readable program code configured to:
provide user input to one or more large language models (LLMs) utilizing meta prompting to generate a set of prompts represented by a plurality of vectors;
identify, by the one or more LLMs, a plurality of differential vectors from pairs of prompt vectors selected from the plurality of vectors representing the set of prompts;
mutate, by the one or more LLMs, the plurality of vectors representing the set of prompts with the plurality of differential vectors and use one or more first algorithms to determine one or more mutated prompt vectors;
generate an intermediate prompt, using the one or more LLMs, by combining the one or more mutated prompt vectors with the plurality of vectors representing the set of prompts and selecting a prompt vector representing the intermediate prompt using one or more second algorithms;
divide a task of validating the intermediate prompt into a plurality of subtasks to be respectively performed by each of a plurality of software-based agents;
perform the plurality of subtasks by the plurality of software-based agents as part of a chain of thought (CoT) process to validate the intermediate prompt and output one or more suggestions for prompt modification; and
generate a final prompt by refining the intermediate prompt using the one or more suggestions.
