# US 2026/0093791 A1 · Prompt refinement to improve accuracy of outputs from machine learning models

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

- Number: US 2026/0093791 A1
- Document ID: US20260093791A1
- Status: Published application
- Kind: A1
- Application number: 19/411,087
- Filed: 2025-12-05
- Published: 2026-04-02
- Earliest claimed: 2024-04-11
- Assignees: Citibank, N.A.
- Applicants: Citibank, N.A.
- Inventors: Nigil Satish Jeyashekar; Jason Engelbrecht; Zheyu Wang; Haolin Jin; Payal Jain; Tariq Husayn Maonah; Mariusz SATERNUS; Daniel Lewandowski; Biraj Krushna Rath; Stuart Murray; Philip Davies; Sourabh Deb
- Web page: https://patentgrep.com/patent/US20260093791A1

## CPC

- G06F 21/31: User authentication
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06F 21/6218: {to a system of files or objects, e.g. local or distributed file system or database}
- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Systems and methods for restructuring prompts in order to improve accuracy of outputs from models are disclosed herein. The system receives a user prompt indicating a request for data. The system generates a first and second output using a model, the first output generated based on the user prompt and the second output generated based on pseudocode. The system compares the first and second outputs to determine a match accuracy between the two outputs. If the two outputs sufficiently match, the system approves the user prompt. If the two outputs do not sufficiently match, the system initiates a prompt restructuring process, whereby the user prompt is restructured using pseudocode to improve the accuracy of the first output. The process is repeated iteratively until the restructured user prompt generates a first output that sufficiently matches the second output generated based on the pseudocode.

## Claims

### Claim 1

One or more non-transitory, computer-readable storage media comprising instructions recorded thereon, wherein the instructions, when executed by at least one data processor of a system, cause the system to:
receive, from a user, a user input indicating a request for output;
determine, based on analyzing the user input, a first output category associated with the user input, wherein the first output category is selected from a plurality of output categories comprising text-based output, visual output, or code-based output;
select, based on the first output category, a first artificial intelligence (AI) model from a plurality of AI models, wherein each AI model of the plurality of AI models is associated with a respective output category of the plurality of output categories;
generate a first output by inputting the user input into the first AI model to cause the first AI model to generate the first output based on the user input;
determine, based on analyzing the first output, that a second output category relates to further processing that is required for the user input, wherein the second output category is different from the first output category;
select, based on the second output category, a second AI model from the plurality of AI models, wherein the second AI model is different from the first AI model;
generate a prompt based on the user input and the first output;
generate a second output by inputting the prompt into the second AI model to cause the second AI model to generate the second output based on the prompt; and
transmit, to the user, a final output based on the first output and the second output.

### Claim 2 (depends on 1)

The one or more non-transitory, computer-readable storage media of claim 1, wherein the plurality of AI models comprises two or more of: a text generation model associated with the text-based output, an image generation model associated with the visual output, or a code generation model associated with the code-based output.

### Claim 3 (depends on 1)

The one or more non-transitory, computer-readable storage media of claim 1, wherein the instructions for determining the first output category further cause the system to analyze keywords in the user input to identify whether the user input requests text generation, image generation, or code generation.

### Claim 4 (depends on 1)

The one or more non-transitory, computer-readable storage media of claim 1, wherein the instructions for determining that the second output category relates to further processing that is required for the user input further cause the system to analyze the first output to identify (i) incomplete information or (ii) a need for additional processing in a different output format.

### Claim 5 (depends on 1)

The one or more non-transitory, computer-readable storage media of claim 1, wherein the instructions for generating the prompt further cause the system to combine the user input with at least a portion of the first output to generate an enhanced prompt for the second AI model.

### Claim 6 (depends on 1)

The one or more non-transitory, computer-readable storage media of claim 1, wherein the final output comprises a combination of the first output and the second output presented in a unified format to the user.

### Claim 7

A method comprising:
receiving, from a user, a user input indicating a request for output;
determining, based on analyzing the user input, a first output category associated with the user input, wherein the first output category is selected from a plurality of output categories comprising text-based output, visual output, and code-based output;
selecting, based on the first output category, a first model from a plurality of models, wherein each model of the plurality of models is associated with a respective output category of the plurality of output categories;
generating a first output by inputting the user input into the first model to cause the first model to generate the first output based on the user input;
determining, based on analyzing the first output, that a second output category relates to further processing required for the user input;
selecting, based on the second output category, a second model from the plurality of models, wherein the second model is different from the first model;
generating a prompt based on the user input and the first output;
generating a second output by inputting the prompt into the second model to cause the second model to generate the second output based on the prompt; and
transmitting, to the user, a final output based on the first output and the second output.

### Claim 8 (depends on 7)

The method of claim 7, wherein the plurality of models comprises two or more of: a text generation model associated with the text-based output, an image generation model associated with the visual output, or a code generation model associated with the code-based output.

### Claim 9 (depends on 7)

The method of claim 7, wherein determining the first output category further comprises analyzing keywords in the user input to identify whether the user input requests text generation, image generation, or code generation.

### Claim 10 (depends on 7)

The method of claim 7, wherein determining that the second output category relates to further processing that is required for the user input comprises analyzing the first output to identify (i) incomplete information or (ii) a need for additional processing in a different output format.

### Claim 11 (depends on 7)

The method of claim 7, wherein generating the prompt further comprises combining the user input with at least a portion of the first output to generate an enhanced prompt for the second model.

### Claim 12 (depends on 7)

The method of claim 7, wherein the final output comprises a combination of the first output and the second output presented in a unified format to the user.

### Claim 13 (depends on 7)

The method of claim 7, further comprising analyzing the user input to determine the first output category by processing natural language content of the user input.

### Claim 14

A system comprising:
a storage device; and
one or more processors communicatively coupled to the storage device storing instructions thereon that cause the one or more processors to:
receive, from a user, a user input indicating a request for output;
determine, based on analyzing the user input, a first output category associated with the user input, wherein the first output category is selected from a plurality of output categories comprising text-based output, visual output, and code-based output;
select, based on the first output category, a first model from a plurality of models, wherein each model of the plurality of models is associated with a respective output category of the plurality of output categories;
generate a first output by inputting the user input into the first model to cause the first model to generate the first output based on the user input;
determine, based on analyzing the first output, that a second output category relates to further processing required for the user input;
select, based on the second output category, a second model from the plurality of models, wherein the second model is different from the first model;
generate a prompt based on the user input and the first output;
generate a second output by inputting the prompt into the second model to cause the second model to generate the second output based on the prompt; and
transmit, to the user, a final output based on the first output and the second output.

### Claim 15 (depends on 14)

The system of claim 14, wherein the plurality of models comprises two or more of: a text generation model associated with the text-based output, an image generation model associated with the visual output, or a code generation model associated with the code-based output.

### Claim 16 (depends on 14)

The system of claim 14, wherein the instructions for determining the first output category further cause the one or more processors to analyze keywords in the user input to identify whether the user input requests text generation, image generation, or code generation.

### Claim 17 (depends on 14)

The system of claim 14, wherein the instructions for determining that the second output category relates to further processing that is required for the user input further cause the one or more processors to analyze the first output to identify (i) incomplete information or (ii) a need for additional processing in a different output format.

### Claim 18 (depends on 14)

The system of claim 14, wherein the instructions for generating the prompt further cause the one or more processors to combine the user input with at least a portion of the first output to generate an enhanced prompt for the second model.

### Claim 19 (depends on 14)

The system of claim 14, wherein the final output comprises a combination of the first output and the second output presented in a unified format to the user.

### Claim 20 (depends on 14)

The system of claim 14, wherein the instructions further cause the one or more processors to analyze the user input to determine the first output category by processing natural language content of the user input.
