Automated prompt optimization (APO) aims to improve large language model performance by refining prompt instructions. However, existing methods are largely constrained by fixed prompt templates, limited search spaces, or single-sided optimization that treats user questions as immutable inputs. In practice, question formulation and prompt design are inherently interdependent: clearer question structures facilitate focused reasoning and task understanding, while effective prompts reveal better ways to organize and restate queries. Ignoring this coupling fundamentally limits the effectiveness and adaptability of current APO approaches. We propose a unified multi-agent system (Helix) that jointly optimizes question reformulation and prompt instructions through a structured three-stage co-evolutionary framework. Helix integrates (1) planner-guided decomposition that breaks optimization into coupled question-prompt objectives, (2) dual-track co-evolution where specialized agents iteratively refine and critique each other to produce complementary improvements, and (3) strategy-driven question generation that instantiates high-quality reformulations for robust inference. Extensive experiments on 12 benchmarks against 6 strong baselines demonstrate the effectiveness of Helix, achieving up to 3.95% performance improvements across tasks with favorable optimization efficiency.
Figures & tables
Figure 1: Comparison of three strategies for pronoun disambiguation. Left: original question without prompt instructions yields an incorrect answer. Middle: adding a CoT prompt to the original question still fails. Right: Helix jointly optimizes question formulation and prompt instructions, producing the correct prediction.
Figure 2: Overview of the Helix framework including 6 LLM-based agents for joint optimization of question reformulation and prompt instructions. The ① Planner decomposes the task into a sequence of helix objectives, dual-helix co-evolution alternates between ② Prompt-Architect and ③ Question-Architect with ④ Mediator validation, and the ⑤ Question-Generator together with the ⑥ Question-Judge produces validated refined questions, which are paired with the optimized prompt and fed to the target LLM for inference.
Models
BBH
AGIEval
MMLU
MMLU-Pro
Math
Avg
D.QA
G.S.
F.F.
R.N.
S.U.
L.A.
C.B.
E.E.
M.T.
Hist
Phil
A.R.
Manual Prompting
No Prompt
53.20
52.40
77.40
82.80
78.80
35.09
89.58
76.55
88.32
55.12
54.11
86.61
69.17
CoT
74.80
54.80
82.00
87.20
80.00
33.22
91.36
82.07
90.06
57.74
57.31
87.40
73.16
Automated Prompt Optimization
APE
56.50
61.20
82.40
83.60
81.40
35.61
89.23
78.23
89.23
58.40
58.43
84.32
71.55
Table 1: Accuracy (%) comparison across 12 tasks. Helix with dual optimization ( Q-Opt + P-Opt ) consistently achieves the best performance across all benchmarks. Bold denotes the highest result for each task. Abbreviations: D.QA = Disambiguation QA, G.S. = Geometric Shapes, F.F. = Formal Fallacies, R.N. = Ruin Names, S.U. = Sports Understanding, L.A. = LSAT-AR, C.B. = College Biology, E.E. = Electrical Engineering, M.T. = Marketing, Hist = History, Phil = Philosophy, A.R. = AQuA-RAT.
Figure 3: Accuracy–cost trade-off across 12 tasks for different prompt optimization methods. Bubble size denotes the number of training samples, with Helix achieving the highest accuracy with the fewest API calls using only a single sample.
Figure 4: Prompt efficiency (PE) comparison on four representative BBH tasks, where Helix consistently achieves the highest performance per optimization cost.
helix
C.B.
M.T.
E.E.
Hist
Phil
Full
93.06
95.23
85.52
64.04
65.21
1 helix
85.42
87.34
77.85
55.82
56.73
Δ
(-7.64)
(-7.89)
(-7.67)
(-8.22)
(-8.48)
2 helices
89.58
91.45
81.38
59.11
59.88
Δ
(-3.48)
(-3.78)
(-4.14)
(-4.93)
(-5.33)
3 helices
93.06
95.23
83.79
61.47
62.05
Table 2: Accuracy (%) of helix number on MMLU and MMLU-Pro tasks. Δ denotes the performance drop relative to full Helix.
Model
∣Dtrain∣
C.B.
E.E.
M.T.
Hist
Phil
Avg
APE
100
89.23
78.23
89.23
58.40
58.43
74.70
OPRO
50
91.15
81.45
90.12
58.84
59.44
76.20
PE2
100
91.24
79.44
91.54
59.25
56.43
75.58
MARS
1
91.36
73.79
91.88
61.32
62.63
76.20
Helix
1
93.06
85.52
95.23
64.04
65.21
80.61
Helix
2
94.44
87.24
96.58
65.47
66.76
82.10
Table 3: Accuracy (%) of different training sample sizes ∣Dtrain∣ on MMLU and MMLU-Pro tasks.
Figure 5: Training-stage dual-helix co-evolution on the Formal Fallacies task. The Planner decomposes the task into sequential helix objectives with coupled question reformulation and prompt refinement goals. Prompt-Architect and Question-Architect iteratively critique and refine each other under Mediator validation, yielding aligned optimized prompts and transferable question reformulation strategies.
Figure 6: Inference-stage strategy-driven question generation on the Formal Fallacies task. The Question-Generator reformulates the original query following the learned strategy, while the -JudgeQuestion-Judge validates semantic preservation and structural quality, producing an optimized question for final model inference.
Variation
D.QA
G.S.
F.F.
R.N.
S.U.
Avg
Full
73.20
73.20
94.05
93.20
92.40
85.21
w/o Planner
66.00
68.40
85.20
89.80
84.60
78.80
Δ
(-7.20)
(-4.80)
(-8.85)
(-3.40)
(-7.80)
(-6.41)
w/o P-Arch
64.80
69.20
82.60
87.80
78.50
76.58
Δ
(-8.40)
(-4.00)
(-11.45)
(-5.40)
(-13.90)
(-8.63)
w/o Q-Arch
66.40
70.80
84.20
88.60
75.60
77.12
Table 4: Component ablation on BBH tasks (accuracy %). Δ denotes performance drop relative to the full Helix framework.
Appendix figures & tables56 assets
Supplementary material from the paper’s appendix.
Appendix
Tasks
ABBR.
Train
Test
Bigbench
Disambiguation QA
D.QA
1
249
Geometric Shapes
G.S.
1
249
Formal Fallacies
F.F.
1
249
Ruin Names
R.N.
1
249
Sports Understanding
S.U.
1
249
Appendix
Table 5: Data split of tasks. One instance for training, remaining instances for testing.
Models
BBH
AGIEval
MMLU ∗ 7 7 7 MMLU ∗ denotes average performance across MMLU and MMLU-Pro tasks.
AQuA-RAT
Avg
No Prompt
70.16
45.65
69.72
86.61
68.04
CoT
71.36
45.22
72.68
87.40
69.17
APE
72.45
43.44
71.21
85.92
68.26
OPRO
74.12
44.35
73.40
86.78
69.66
PE2
75.53
46.78
74.40
88.23
71.24
MARS
77.22
45.33
74.27
89.15
71.49
Appendix
Table 6: Performance comparison when using Gemini-2.5-Pro for all Helix agents, with Gemini-2.0-Flash as target LLM (accuracy %).
Method
GPT-3.5
GPT-4
GPT-4o
Avg
No Prompt
82.64
84.72
89.58
85.65
CoT
85.42
87.85
92.71
88.66
MARS
86.11
88.54
93.40
89.35
Helix
87.85
90.28
95.14
91.09
Appendix
Table 7: Performance comparison on MMLU tasks across different target LLMs (accuracy %). All Helix agents were implemented using GPT-4o. Results are averaged across C.B., E.E., and M.T. tasks.
Input Task Type: Formal Fallacies Task Description: Evaluate arguments to determine if they are deductively valid or invalid. Problems present arguments with multiple premises and a conclusion, requiring extraction of logical components, tracking of negations and logical operators, evaluation of whether the conclusion necessarily follows from the premises, and binary classification (valid/invalid). Expected Output Format: A letter answer in parentheses (e.g., ”(A)” for valid or ”(B)” for invalid) I want to optimize both the question presentation and the solving prompt to achieve the highest correctness rate on this type of problem.
Planner Split the task into detailed helix objectives for co-evolution of question presentation and prompt instructions. For example, for the Disambiguation QA task, the optimization is planned as follows: Total helices: 4. helix 1: Pronoun Highlighting ↔ Pronoun Identification, where the question goal is to visually highlight the pronoun to identify, the prompt goal is to direct immediate pronoun identification without search, and the connection is that highlighted pronouns enable prompts to skip search steps. helix 2: Antecedent Clarity ↔ Antecedent Filtering, where the question goal is to present potential antecedents clearly in context, the prompt goal is to guide systematic filtering based on grammatical agreement, and the connection is that clear noun visibility supports efficient antecedent filtering…
Prompt-Architect Prompt-Design: You are a prompt designer in the Helix framework. Your task is to design an improved prompt that achieves the prompt goal and works with the question strategy… Question-Critique: You are a question strategy critic in the Helix framework. Your task is to evaluate proposed question strategy to ensure it supports effective prompting…
Question-Architect Question-Design: You are a question designer in the Helix framework. Your task is to design an improved question strategy that achieves the question goal and works with the prompt… Prompt-Critique: You are a prompt critic in the Helix framework. Your task is to evaluate proposed prompt to ensure it works effectively with the question strategy…
Question-Generator You are a question modifier in the Helix framework. Your task is to apply a presentation strategy to an original question, creating a modified version that is clearer while preserving all original content…
Question-Judge You are a question quality judge in the Helix framework. Your task is to verify that a modified question follows the question strategy and preserves the original meaning…
Mediator You are the mediator in the Helix framework. Your task is to judge if the optimized prompt satisfies the prompt goal, if their connection works synergistically as planned…
Appendix
Table 8: Summary of agent prompts in the Helix framework. The examples are from the Formal Fallacies task of the BBH dataset.
Figure 7: Training process of Helix (Part 1/2): Planner-guided decomposition and dual-helix co-evolution Round 1. (Continued in Figure 8 )
Figure 8: Training process of Helix (Part 2/2): Dual-helix co-evolution Round 2.
Figure 9: Inference process of Helix (Part 1/2): Strategy-driven question generation Round 1. (Continued in Figure 10 )
Figure 10: Inference process of Helix (Part 2/2): Strategy-driven question generation Round 2.
Table 9: Optimized prompt for the Disambiguation QA task generated by Helix through dual-helix co-evolution.
Table 10: Optimized question strategy for the Disambiguation QA task generated by Helix through dual-helix co-evolution.
Table 11: Original question from the Disambiguation QA task before optimization.
Table 12: Optimized question for the Disambiguation QA task with the strategy applied.
Table 13: Optimized prompt for the Geometric Shapes task generated by Helix through dual-helix co-evolution.
Table 14: Optimized question strategy for the Geometric Shapes task generated by Helix through dual-helix co-evolution.
Table 15: Original question from the Geometric Shapes task before optimization.
Table 16: Optimized question for the Geometric Shapes task with the strategy applied.
Table 17: Optimized prompt for the Formal Fallacies task generated by Helix through dual-helix co-evolution.
Table 18: Optimized question strategy for the Formal Fallacies task generated by Helix through dual-helix co-evolution.
Table 19: Original question from the Formal Fallacies task before optimization.
Table 20: Optimized question for the Formal Fallacies task with the strategy applied.
Table 21: Optimized prompt for the Ruin Names task generated by Helix through dual-helix co-evolution.
Table 22: Optimized question strategy for the Ruin Names task generated by Helix through dual-helix co-evolution.
Table 23: Original question from the Ruin Names task before optimization.
Table 24: Optimized question for the Ruin Names task with the strategy applied.
Table 25: Optimized prompt for the Sports Understanding task generated by Helix through dual-helix co-evolution.
Table 26: Optimized question strategy for the Sports Understanding task generated by Helix through dual-helix co-evolution.
Table 27: Original question from the Sports Understanding task before optimization.
Table 28: Optimized question for the Sports Understanding task with the strategy applied.
Table 29: Optimized prompt for the LSAT-AR task generated by Helix through dual-helix co-evolution.
Table 30: Optimized question strategy for the LSAT-AR task generated by Helix through dual-helix co-evolution.
Table 31: Original question from the LSAT-AR task before optimization.
Table 32: Optimized question for the LSAT-AR task with the strategy applied.
Table 33: Optimized prompt for the College Biology task generated by Helix through dual-helix co-evolution.
Table 34: Optimized question strategy for the College Biology task generated by Helix through dual-helix co-evolution.
Table 35: Original question from the College Biology task before optimization.
Table 36: Optimized question for the College Biology task with the strategy applied.
Table 37: Optimized prompt for the Electrical Engineering task generated by Helix through dual-helix co-evolution.
Table 38: Optimized question strategy for the Electrical Engineering task generated by Helix through dual-helix co-evolution.
Table 39: Original question from the Electrical Engineering task before optimization.
Table 40: Optimized question for the Electrical Engineering task with the strategy applied.
Table 41: Optimized prompt for the Marketing task generated by Helix through dual-helix co-evolution.
Table 42: Optimized question strategy for the Marketing task generated by Helix through dual-helix co-evolution.
Table 43: Original question from the Marketing task before optimization.
Table 44: Optimized question for the Marketing task with the strategy applied.
Table 45: Optimized prompt for the History task generated by Helix through dual-helix co-evolution.
Table 46: Optimized question strategy for the History task generated by Helix through dual-helix co-evolution.
Table 47: Original question from the History task before optimization.
Table 48: Optimized question for the History task with the strategy applied.
Table 49: Optimized prompt for the Philosophy task generated by Helix through dual-helix co-evolution.
Table 50: Optimized question strategy for the Philosophy task generated by Helix through dual-helix co-evolution.
Table 51: Original question from the Philosophy task before optimization.
Table 52: Optimized question for the Philosophy task with the strategy applied.
Table 53: Optimized prompt for the AQuA-RAT task generated by Helix through dual-helix co-evolution.
Table 54: Optimized question strategy for the AQuA-RAT task generated by Helix through dual-helix co-evolution.
Table 55: Original question from the AQuA-RAT task before optimization.
Table 56: Optimized question for the AQuA-RAT task with the strategy applied.
Prompt optimization has become a practical way to improve the performance of Large Language Models (LLMs) without retraining. However, most existing frameworks treat evaluation as a black box, relying solely on outcome scores without explaining why prompts succeed or fail. Moreover, they involve repetitive trial-and-error refinements that remain implicit, offering limited interpretability or actionable guidance for systematic improvement. In this paper, we propose MA-SAPO: a new Multi-Agent Reasoning for Score Aware Prompt Optimization framework that links evaluation outcomes directly to targeted refinements. Specifically, in the Training Phase, multiple agents interpret evaluation scores, diagnose weaknesses, and generate concrete revision directives, which are stored as reusable reasoning assets. In the Test Phase, an analyzer agent retrieves relevant exemplars and assets for a new prompt, and a refiner agent applies evidence-based edits to improve the prompt and its response. By grounding optimization in structured reasoning, MA-SAPO ensures edits are interpretable, auditable, and controllable. Experiments on the HelpSteer1/2 benchmarks show that our framework consistently outperforms single-pass prompting, retrieval-augmented generation, and prior multi-agent methods across multiple evaluation metrics.
System prompt optimization improves agent behavior without modifying the underlying model, yielding human-readable, model-agnostic instructions. Existing methods build a prompt agent that refines task agents' system prompts, yet leave the prompt agent's own system prompt hand-engineered and fixed. We propose Self-Evolving Prompt Optimization (SePO), which treats the prompt agent's own system prompt as an optimization target alongside task agents' system prompts. SePO adopts a self-referential design. A single prompt agent improves both task agents' system prompts and its own under an open-ended evolutionary search that maintains an archive of candidate prompts as stepping stones. Training proceeds in two stages: pre-training evolves the prompt agent on a multi-task pool, and fine-tuning then applies it to a target task. Across five benchmarks spanning math (AIME'25), abstract reasoning (ARC-AGI-1), graduate-level science (GPQA), code generation (MBPP), and logic puzzles (Sudoku), SePO consistently outperforms Manual-CoT, TextGrad, and MetaSPO, improving the average accuracy by 4.49 points compared to Manual-CoT. The prompt optimization skill from pre-training also generalizes to tasks beyond the pre-training mixture, rather than memorizing per-task prompts.
Wangcheng Tao, Han Wu, Weng-Fai Wong
National University of Singapore · City University of Hong Kong
Automatic prompt optimization is a promising approach for adapting large language models (LLMs) to downstream tasks, yet existing methods typically search for a specific prompt specialized to a fixed task. This paradigm limits generalization across heterogeneous queries and prevents models from accumulating reusable prompting knowledge over time. In this paper, we propose MemAPO, a memory-driven framework that reconceptualizes prompt optimization as generalizable and self-evolving experience accumulation. MemAPO maintains a dual-memory mechanism that distills successful reasoning trajectories into reusable strategy templates while organizing incorrect generations into structured error patterns that capture recurrent failure modes. Given a new prompt, the framework retrieves both relevant strategies and failure patterns to compose prompts that promote effective reasoning while discouraging known mistakes. Through iterative self-reflection and memory editing, MemAPO continuously updates its memory, enabling prompt optimization to improve over time rather than restarting from scratch for each task. Experiments on diverse benchmarks show that MemAPO consistently outperforms representative prompt optimization baselines while substantially reducing optimization cost.
Guanbao Liang, Yuanchen Bei, Sheng Zhou +5
Zhejiang University · University of Illinois Urbana-Champaign · Alibaba Group