ELPO: Ensemble Learning Based Prompt Optimization for Large Language Models

Qing Zhang, Bing Xu, Xudong Zhang, Yifan Shi, Yang Li, Chen Zhang, Yik Chung Wu, Ngai Wong, Yijie Chen, Hong Dai, Xiansen Chen, Mian Zhang · DOI

Abstract

Large Language Models (LLMs) are highly sensitive to prompt variations, making manual prompt engineering a significant bottleneck for performance. While Automatic Prompt Optimization (APO) methods have been developed to automate this process, they often rely on single optimization strategies and suffer from search inefficiency. We introduce ELPO (Ensemble Learning Based Prompt Optimization), a framework that integrates multiple prompt generation strategies, efficient search algorithms (Bayesian and Multi-Armed Bandit), and a weighted ensemble voting mechanism. ELPO consistently outperforms state-of-the-art methods across diverse reasoning and classification tasks, demonstrating superior robustness and generalization.

Introduction

Large Language Models (LLMs) are notoriously "fragile"—minor tweaks to a prompt can lead to drastically different outputs. While Automatic Prompt Optimization (APO) has emerged to replace tedious manual engineering, existing methods often rely on a single optimization algorithm. This creates two major bottlenecks: algorithmic fragility, where no single strategy captures every nuance across different datasets (following the "No Free Lunch" theorem), and search inefficiency, where evaluating hundreds of candidates on entire training sets is computationally prohibitive.

The ELPO Framework

ELPO addresses these challenges through a three-pillar architecture designed to make prompt optimization both robust and efficient.

The ELPO framework architecture

1. Abundant Prompt Generation

Instead of relying on a single generator, ELPO employs three distinct methods to ensure a diverse candidate pool:

  • Bad-Case Reflection: Analyzes errors to generate self-reflective prompts.
  • Evolutionary Reflection: Uses mutation and zero-order generation to maintain population diversity.
  • Hard-Case Tracking (Novel): Dynamically monitors "hard cases"—inputs that frequently cause failures—to guide the LLM in creating specialized instructions.

To avoid the cost of evaluating every candidate, ELPO uses two screening mechanisms to identify high-potential prompts using only a fraction of the total evaluation budget:

  • Bayesian Search: Models the performance landscape using Gaussian Process Regression and selects candidates based on "Expected Improvement."
  • Multi-Armed Bandit (MAB) Search: Clusters prompts into "arms" and uses the Upper Confidence Bound (UCB) criterion to balance exploration and exploitation.

3. Ensemble Voting

Rather than selecting a single "best" prompt, ELPO utilizes a committee of top-performing, diverse prompts. A weighted voting mechanism, where weights are optimized based on validation performance, produces the final output. This approach mitigates the bias inherent in any single prompt.

Experimental Evaluation

ELPO was evaluated on six diverse benchmarks covering fake news detection (LIAR), spatial reasoning (BBH-navigate), hate speech detection (ETHOS), sarcasm detection (ArSarcasm), common sense reasoning (WSC), and mathematical word problems (GSM8K).

Performance comparison of ELPO against SOTA methods

As shown in the results, ELPO achieved significant gains over existing methods like APE, ProTeGi, and OPRO. Notable highlights include:

  • ArSarcasm: Improved the F1 score by 7.6 points over the next best baseline.
  • BBH-navigate: Achieved an F1 of 91.1, outperforming Chain-of-Thought (CoT) by 9.2 points.
  • GSM8K: Reached an accuracy of 96.0, surpassing specialized evolutionary methods like Promptbreeder (91.7).

Discussion and Conclusion

The success of ELPO underscores that diversity in prompt generation often trumps depth; ablation studies indicate that adding diverse generators provides a larger performance boost than simply increasing iterations of a single method. Furthermore, the "Committee Effect" of weighted voting consistently outperformed single-prompt baselines, suggesting that different prompts capture complementary sub-features of a task.

While ELPO represents a significant step forward in APO, future work will focus on expanding generation diversity through human-in-the-loop interventions and refining search robustness to handle even more extreme shifts in data distribution.

Summary updated

BibTeX
@misc{zhang2025elpo,
  author = {Qing Zhang and Bing Xu and Xudong Zhang and Yifan Shi and Yang Li and Chen Zhang and Yik Chung Wu and Ngai Wong and Yijie Chen and Hong Dai and Xiansen Chen and Mian Zhang},
  title = {{ELPO: Ensemble Learning Based Prompt Optimization for Large Language Models}},
  year = {2025},
  eprint = {2511.16122},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.16122},
}
Figure