SIPDO: Closed-Loop Prompt Optimization via Synthetic Data Feedback

Yaoning Yu, Ye Yu, Peiyan Zhang, Kai Wei, Haojing Luo, Haohan Wang

Introduction

Large Language Models (LLMs) are notoriously sensitive to prompt phrasing; a minor tweak in instructions can lead to a massive swing in performance. While automated prompt engineering tools like APE or PromptAgent have emerged to tackle this, they predominantly suffer from a "static dataset" problem. They optimize a prompt to perform well on a fixed, pre-existing set of examples.

However, real-world input distributions are rarely static. A prompt that perfectly fits a curated test set often crumbles when faced with edge cases or slightly more complex logical twists. To address this, researchers introduce SIPDO (Self-Improving Prompts through Data-Augmented Optimization), a new framework that treats prompt engineering as a closed-loop "sparring match." By pairing a prompt optimizer with a synthetic data generator that creates increasingly difficult stress tests, SIPDO iteratively discovers and repairs prompt weaknesses, building robust prompts that generalize better to unseen data.

The SIPDO Framework

SIPDO operates as a two-agent system, functioning much like a teacher and a student engaged in continuous improvement.

  1. The Synthetic Data Generator (The "Teacher"): Instead of relying on a static dataset, this agent generates novel, synthetic examples. Crucially, it employs Progressive Difficulty. It begins with simple cases and, as the prompt's performance improves, it increases the "difficulty tier" ($c$) to discover new ways the model might fail.
  2. The Auto Prompt Optimizer (The "Student"): This agent takes the failure cases identified by the generator and executes a three-step refinement process:
  3. Error Analysis: Determines why the current prompt failed on the specific synthetic example.
  4. Recommendation: Suggests how the instructions should be modified to handle this edge case.
  5. Targeted Refinement: Edits the prompt and performs "local confirmation" against the failure, alongside "global confirmation" against previous successes to prevent catastrophic forgetting.
The SIPDO closed-loop framework featuring a Data Generator and an Auto Prompt Optimizer.

This architecture creates a continuous closed loop: the generator finds a vulnerability, the optimizer patches it, and the generator then searches for a deeper vulnerability. The paper supports this with a theoretical "Regularized Worst-case" guarantee, proving that training against this adversarial generator helps bound the error on real-world, unseen data.

Experimental Setup

The researchers evaluated SIPDO across several high-stakes reasoning and knowledge benchmarks to test its robustness:

  • BIG-Bench: Six diverse tasks including Penguins In a Table, Geometric Shapes, and Causal Judgment.
  • Logical Reasoning: ProofWriter (depth-5), FOLIO (first-order inference), and PrOntoQA.
  • MMLU (Massive Multitask Language Understanding): Expert-level subjects such as College Biology, Computer Science, and Machine Learning.

Key Insights and Results

SIPDO consistently outperformed baseline methods like Chain-of-Thought (CoT), APE, and PromptAgent across various models and tasks.

The Importance of a Difficulty Curriculum

A major insight from the paper is that simply generating more data isn't enough; a difficulty gradient is essential. If the generator produces examples that are too easy, the prompt stagnates. If they are too hard, the optimizer is overwhelmed. Monotonic growth in difficulty provides the rich gradient necessary for the prompt to evolve. An ablation study revealed that removing this progressive difficulty scaling caused performance to plummet—for GPT-4o, accuracy dropped by an average of 17.3%, proving that the "stress-test" loop is the engine of SIPDO's success.

Superior Performance Across Benchmarks

By specifically generating data to stress-test the prompt, SIPDO builds prompts that are significantly less fragile. The resulting prompts often naturally incorporate explicit "Problem Rules" and "Verification Processes" learned during the optimization loop.

  • MMLU Superiority: On the Machine Learning subject, SIPDO achieved 93.8% accuracy, significantly beating competitive baselines like TextGrad (88.4%) and REVOLVE (88.4%).
  • BIG-Bench Performance: Across multiple foundation models (including GPT-4o, GPT-4o-mini, and Gemini 1.5 Pro/Flash), SIPDO demonstrated the highest average accuracy. For instance, using GPT-4o-mini, SIPDO hit an average of 87.3%, comfortably surpassing the next best baseline, PromptAgent, at 85.2%.
Performance comparison of SIPDO against baseline methods across multiple LLMs on BIG-Bench tasks.

Furthermore, because the generator knows the "ground truth" of the synthetic data it creates, the system achieves this self-correction without requiring humans to label thousands of new examples.

Limitations and Future Directions

While highly effective, SIPDO does come with computational overhead. Running a two-agent loop with iterative refinements is inherently more expensive than single-shot prompting, though the authors note it is often more sample-efficient than search-heavy methods like PromptAgent. Additionally, the system relies on the generator not "hallucinating" incorrect labels for its synthetic data—a risk the authors mitigated by implementing a "three-voter check" where multiple agents verify the synthetic data's logic.

Looking forward, the authors suggest applying SIPDO to highly specialized, high-stakes domains like financial filings or clinical notes. In these areas, edge cases are frequent, and the cost of a fragile prompt is extremely high, making SIPDO's adversarial robustness particularly valuable.

Summary updated

BibTeX
@inproceedings{yu2026sipdo,
  author = {Yaoning Yu and Ye Yu and Peiyan Zhang and Kai Wei and Haojing Luo and Haohan Wang},
  title = {{SIPDO: Closed-Loop Prompt Optimization via Synthetic Data Feedback}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=kpT5rbbLdY},
}
Figure