From Errors to Rules: Iterative Prompt Optimization for Text Classification
For practitioners of text classification, the paper provides a complementarity framework linking task characteristics to optimal prompt optimization paradigm selection, though the proposed method is incremental.
The paper proposes Error-Guided Optimization (ERGO), an iterative prompt optimization method for text classification that diagnoses errors and generates decision rules, achieving 90.0% on TREC and 94.4% on CLINC150 in 3-5 iterations, but does not dominate overall; instead, it excels on tasks where errors concentrate in specific confused label pairs.
Prompt optimization for text classification spans diverse approaches, from demonstration selection to exploration-based search to error-driven diagnosis, each with known but incompletely characterized strengths and limitations. We conduct a comprehensive empirical study across diverse classification benchmarks (2 to 150 classes) comparing these paradigms through both quantitative evaluation and qualitative analysis of optimization traces, revealing that each paradigm excels on structurally different task types and that no single method dominates. Guided by these insights, we propose Error-Guided Optimization (ERGO), an error-driven method that iterates over the full training set in non-overlapping batches, diagnoses classification failures, and generates targeted decision rules through a diagnose-prescribe-rewrite feedback loop. ERGO achieves the best accuracy on tasks where errors concentrate in specific confused label pairs (which we term boundary-learnable tasks): TREC: 90.0%, CLINC150: 94.4%, converges in 3-5 iterations, and produces interpretable decision rules. While ERGO does not achieve the highest overall average, it fills a complementary role: demonstration-based ICL wins on coverage-dependent tasks, exploration-based search wins on many-class intent, and ERGO wins where decision boundaries are learnable from error patterns. We provide a complementarity framework linking task characteristics to optimal paradigm selection, offering practical guidance for practitioners.