Prompt Refinement Using Pseudocode for Reliable Model Outputs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional systems lack a reliable method to assess model outputs and perform prompt refinement procedures, leading to inaccurate and unreliable outputs in machine learning models, especially in critical decision-making processes.

Innovation Solution

A system that compares model outputs based on user prompts with pseudocode-generated outputs, refining prompts through iterative restructuring until a match accuracy threshold is met, using a structured pseudocode approach to ensure accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional systems use standard prompt input methods, then the system is simple and easy to operate, but the output accuracy and reliability are insufficient

Engineering Contradiction:
Improveoutput accuracyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces pseudocode as an intermediary representation between the user's natural language prompt and the machine learning model. The prompt is first converted into structured pseudocode that captures the logical structure and key elements, then this pseudocode is used to generate a refined prompt. This intermediary step ensures that the essential meaning is preserved while improving accuracy and reliability of the model output.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary analysis and structuring of the prompt before it is processed by the machine learning model. By converting the prompt to pseudocode first, the system pre-processes and organizes the input information, identifying key elements and logical relationships in advance. This preliminary action allows for better prompt refinement and improves the reliability of the final output.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If the system performs iterative prompt refinement, then the output quality improves, but the processing time increases

Engineering Contradiction:
Improveoutput qualityVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements an iterative refinement process where the system generates an initial output, evaluates its quality against the pseudocode structure, and uses this feedback to refine the prompt. The pseudocode serves as a reference framework that provides feedback on whether the prompt adequately captures the required logical structure and key elements, allowing for targeted improvements in subsequent iterations.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent modifies prompt parameters iteratively based on the pseudocode structure. By changing specific parameters such as prompt wording, structure, and emphasis based on the pseudocode analysis, the system improves output quality while controlling the refinement process to avoid excessive iterations that would unnecessarily increase processing time.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If the system uses structured pseudocode approach, then the output accuracy improves, but the ease of operation decreases

Engineering Contradiction:
Improveoutput accuracyVSAvoiduser convenience
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent extracts the essential logical structure and key elements from the user's natural language prompt and represents them separately in pseudocode. This extraction separates the structural analysis from the natural language processing, allowing the system to work with the essential meaning in a structured format while still accepting natural language input from users, thus maintaining ease of operation while improving accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12524508B2Prompt refinement to improve accuracy of outputs from machine learning models
Publication Date: 2026.01.13 CITIBANK N A
  • US12524508B2 patent drawing
  • US12524508B2 patent drawing
  • US12524508B2 patent drawing

AI summary

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.