From Errors to Rules: Iterative Prompt Optimization for Text Classification
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 38 references that are in the map. First posted on arXiv 15 Jun 2026.
Builds on
21 of 38 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 542
- 2020Efficient Intent Detection with Dual Sentence Encoderscited by 433
- 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 386
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 366
9 more
- 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 298
- 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 243
- 2022Instruction Induction: From Few Examples to Natural Language Task Descriptionscited by 152
- 2020ETHOS: an Online Hate Speech Detection Datasetcited by 66
- 2025A Systematic Survey of Automatic Prompt Optimization Techniquescited by 63
- 2025A Survey of Automatic Prompt Engineering: An Optimization Perspectivecited by 41
- 2018Evolutionary Data Measures: Understanding the Difficulty of Text Classification Taskscited by 11
- 2024A Comparative Study of DSPy Teleprompter Algorithms for Aligning Large Language Models Evaluation Metrics to Human Evaluationcited by 7
- 2026Prompt Optimization Is a Coin Flip: Diagnosing When It Helps in Compound AI Systemscited by 3
Built on by
Not cited yet.