In-Context Prompt Optimization With Multi-Phase Mutation Search

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional prompt engineering for large language models is manual, time-consuming, requires significant human effort, and often results in suboptimal performance due to the separate optimization of instructions and examples, lacking computational efficiency.

Innovation Solution

An automated prompt optimization system employing multi-phase mutation, including global initialization, local feedback, global evolution, and local semantic mutations, to jointly optimize prompts, leveraging LLMs for gradient information and evolutionary algorithms to enhance search efficiency and convergence.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual prompt engineering is used, then prompts can be customized for specific tasks, but the process requires considerable time and effort

Engineering Contradiction:
Improveprompt performanceVSAvoidtime to generate prompt
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs self-service by automatically generating and optimizing prompts without human intervention. The automated prompt optimization system uses multi-phase mutation and evolutionary algorithms to autonomously create high-performance prompts, eliminating the need for manual prompt engineering while maintaining or improving prompt quality.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the manual mechanical process of prompt engineering with an automated computational system. Instead of human experts manually crafting prompts, the system uses algorithms including multi-phase mutation, local feedback mutation, global evolution mutation, and semantic mutation to automatically generate optimized prompts.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Reliability

If manual prompt tuning is performed to achieve improved performance, then prompt effectiveness increases, but significant human resources and expert knowledge are required

Engineering Contradiction:
Improveprompt effectivenessVSAvoidhuman resources required
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system autonomously performs prompt optimization without requiring human experts. It uses automated evaluation metrics and evolutionary algorithms to self-adjust and improve prompts, replacing the need for human resources and expert knowledge in the prompt tuning process.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system optimizes prompt parameters automatically through multi-phase mutation operations including semantic mutation, local feedback mutation, and global evolution mutation. These parameter changes are driven by automated fitness evaluation rather than human judgment, reducing dependency on expert knowledge.

Inventive Principle:
Principle #35Parameter changes

3Ease of manufacture

If separate optimization of instructions and examples is performed, then each component can be tuned independently, but the overall prompt performance becomes suboptimal

Engineering Contradiction:
Improveprompt customizationVSAvoidoverall prompt performance
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent merges the optimization of instructions and examples into a unified process. The multi-phase mutation system simultaneously optimizes both components together, evaluating their combined effectiveness through fitness functions and adjusting them as an integrated prompt structure rather than separate elements.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The automated optimization system performs multiple functions simultaneously: it generates candidate prompts, evaluates fitness, applies various mutation operations (semantic, local feedback, global evolution), and selects optimal prompts. This multi-functional approach handles both instructions and examples uniformly throughout the optimization process.

Inventive Principle:
Principle #6Universality (Multi-functionality)

4Productivity

If automated prompt generation is implemented, then efficiency increases, but balancing exploration and exploitation becomes challenging

Engineering Contradiction:
Improveprompt generation efficiencyVSAvoidoptimization process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the optimization process into distinct phases: semantic mutation phase, local feedback mutation phase, and global evolution mutation phase. Each phase focuses on specific aspects of optimization (semantic diversity, local refinement, global search), making the complex process more manageable and controllable while maintaining overall efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system maintains continuous optimization through iterative multi-phase mutation cycles. Rather than discrete separate steps, the phases continue sequentially and can repeat, with each phase building on previous results. This continuous action ensures both exploration and exploitation occur throughout the optimization process without interruption.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS20260004158A1Unified in-context prompt optimization for large language models
Publication Date: 2026.01.01 INTUIT INC
  • US20260004158A1 patent drawing
  • US20260004158A1 patent drawing
  • US20260004158A1 patent drawing

AI summary

Certain aspects of the disclosure provide unified in-context prompt optimization for large language models that achieves joint optimization of prompt instruction and examples. A multi-phase approach is provided that includes multiple mutation operations. Further, the approach alternates between optimization strategies for exploration for global search and exploitation for local search. Global initialization creates a diverse set of candidate prompts based on the availability of data and utilizing Lamarckian or semantic mutation. Local feedback mutation, global evolution mutation, and local semantic mutation can subsequently be employed iteratively to generate a revised set of candidate prompts. A prompt from the revised set of candidate prompts can be selected based on an evaluation of the candidate prompts. Subsequently, the selected prompt can be output for a machine-learning task.