Abstract
Automatic Prompt Optimization (APO) has emerged as a popular paradigm for automating the tedious process of prompt engineering. By using a powerful Large Language Model (LLM) as an optimizer to refine prompts for a target model, researchers aim to achieve superior performance with minimal manual intervention. However, this study critically examines whether these LLM-based optimizers truly understand the underlying causes of model errors. Our investigation reveals that current optimizers often rely on prior biases and "educated guesses" rather than genuine reflection. To address these limitations, we introduce Automatic Behavior Optimization (ABO), a framework that shifts the focus from natural language wording to explicit behavioral control through step-by-step instructions and demonstrations.
Introduction
Prompt engineering is often described as a "black magic"—highly sensitive to small changes and requiring extensive trial-and-error. The advent of LLM-based optimizers promised to systematize this process. In a typical APO setup, a "coach" LLM analyzes the failures of a target model and suggests prompt revisions. Despite the popularity of this approach, the actual efficacy and reasoning capabilities of these optimizers have remained under-explored. This study investigates the mechanisms behind LLM-based prompt optimization and identifies why current methods frequently plateau.
Methodology and Stress Testing
To isolate the performance of the LLM optimizer, the authors established a Unified Setting, controlling for variables such as search strategy and initialization. They then subjected the optimizers to two primary stress tests:
- Reflection on Pseudo Errors: Optimizers were provided with "fake" error examples where the target model had actually succeeded. This tested whether the optimizer would hallucinate problems based on its own biases.
- Feedback Clustering: Using GPT-4 to categorize thousands of feedback strings, the researchers measured the diversity and repetition of the advice provided by the optimizers.
Automatic Behavior Optimization (ABO)
Based on the findings that optimizers struggle with vague feedback and instruction-following, the authors proposed ABO. This method differs from standard APO by:
- Generating step-by-step instructions for the task.
- Providing Instruction-following Demonstrations (one-shot examples) to guide the target model's execution.
- Pinpointing specific failure steps in reasoning chains rather than offering general linguistic refinements.
Key Insights: The Limits of Reflection
The "Educated Guess" Trap
LLM optimizers exhibit significant bias. Instead of reflecting on the specific error at hand, they often suggest fixes based on their prior knowledge of the task. For instance, in counting tasks, an optimizer might repeatedly suggest "being careful with plurals" regardless of whether that was the actual cause of the error.
Repetitive Feedback and the Instruction-Following Gap
The study identified a high Average Step Repetition Rate (ASRR), where optimizers suggest the same advice across multiple iterations. Furthermore, even when an optimizer produces a semantically improved prompt, target models—especially smaller ones—often fail to follow the increasingly complex instructions, leading to new types of errors.
Key Results
The evaluation across BigBench tasks (Object Counting, Navigate, Snarks, and Question Selection) demonstrated that standard reflection-based methods often perform no better than simple iterative resampling (Iterative-APE). As shown in the performance curves, many existing optimizers like OPRO and PromptAgent reach a performance ceiling relatively quickly, often failing to significantly outperform random variations.
In contrast, the proposed ABO method achieved significant breakthroughs by focusing on behavioral control:
- Llama-2-70B-chat (Object Counting): Accuracy improved from a baseline of 42.5% (Zero-shot CoT) to 88.5%.
- GPT-3.5-Turbo (Navigate): Accuracy reached 98.5%, up from 58.0%.
These results suggest that optimizing the behavioral execution of a model is far more effective than searching for the "perfect wording" in natural language space.
Conclusion
While LLMs are powerful tools, their current role as prompt optimizers is limited by a lack of genuine error reflection and a tendency to repeat biased advice. The success of Automatic Behavior Optimization (ABO) highlights a path forward: moving away from vague prompt refinement toward structured, step-by-step behavioral control. Future research will focus on scaling ABO to a broader range of tasks and automating the generation of high-quality demonstrations.
Summary updated