TY - GEN
T1 - Comparisons of Some Evolutionary Computation Algorithms for Prompt Optimization in Large Language Models
AU - LI, Jian-Yu
AU - JIN, Tian-Le
AU - ZHAN, Zhi-Hui
AU - KWONG, Sam
AU - ZHANG, Jun
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025/10
Y1 - 2025/10
N2 - Prompt engineering has become an effective tool for numerous large language models (LLMs)-based tasks. However, it is still a challenge to adaptively optimize the prompt for the target task, where gradients are inaccessible via APIs and the search space is highly complex. Due to the ability to robustly handle complex and multimodal landscapes, and to adaptively explore complex search spaces without explicit gradient information, evolutionary computation (EC) algorithms have garnered significant attention in black-box optimization. However, the performance of different EC algorithms for prompt optimization remains uncertain, which cannot provide guidance for algorithm selection and design in prompt optimization. To alleviate this, a series of investigative experiments are conducted in this paper to evaluate the efficiency of EC algorithms in prompt optimization, which results in three novel findings. First, different EC algorithms, including XNES, CMA-ES, DE, and PSO, are compared on various few-shot learning tasks. The findings indicate that XNES can outperform other algorithms, achieving faster or smoother convergence and higher final accuracy under high-dimensional settings. Second, the role of truncation strategies is also investigated. Results show that moderate bounds effectively help the algorithm balance exploration and exploitation, whereas overly small or large bounds diminish performance. Third, the influence of different k-shot values is examined on the optimization performance for few-shot tasks, which shows that k=32 consistently provides the best trade-off between convergence speed and final model accuracy. In conclusion, these investigations validate the efficacy of the investigated EC algorithms and highlight the advantages of XNES for complex prompt optimization. They further underscore the importance offering valuable guidance for future black-box prompt tuning scenarios. These insights pave the way for future work on more diverse and complex tasks with larger LLMs.
AB - Prompt engineering has become an effective tool for numerous large language models (LLMs)-based tasks. However, it is still a challenge to adaptively optimize the prompt for the target task, where gradients are inaccessible via APIs and the search space is highly complex. Due to the ability to robustly handle complex and multimodal landscapes, and to adaptively explore complex search spaces without explicit gradient information, evolutionary computation (EC) algorithms have garnered significant attention in black-box optimization. However, the performance of different EC algorithms for prompt optimization remains uncertain, which cannot provide guidance for algorithm selection and design in prompt optimization. To alleviate this, a series of investigative experiments are conducted in this paper to evaluate the efficiency of EC algorithms in prompt optimization, which results in three novel findings. First, different EC algorithms, including XNES, CMA-ES, DE, and PSO, are compared on various few-shot learning tasks. The findings indicate that XNES can outperform other algorithms, achieving faster or smoother convergence and higher final accuracy under high-dimensional settings. Second, the role of truncation strategies is also investigated. Results show that moderate bounds effectively help the algorithm balance exploration and exploitation, whereas overly small or large bounds diminish performance. Third, the influence of different k-shot values is examined on the optimization performance for few-shot tasks, which shows that k=32 consistently provides the best trade-off between convergence speed and final model accuracy. In conclusion, these investigations validate the efficacy of the investigated EC algorithms and highlight the advantages of XNES for complex prompt optimization. They further underscore the importance offering valuable guidance for future black-box prompt tuning scenarios. These insights pave the way for future work on more diverse and complex tasks with larger LLMs.
KW - Black-Box Optimization
KW - Prompt Engineering
KW - Evolutionary Computation
KW - Differential Evolution (DE)
KW - Particle Swarm Optimization (PSO)
KW - Large Language Models (LLMs)
UR - https://www.scopus.com/pages/publications/105033147604
U2 - 10.1109/SMC58881.2025.11342457
DO - 10.1109/SMC58881.2025.11342457
M3 - Conference paper (refereed)
T3 - Conference Proceedings - IEEE International Conference on Systems, Man and Cybernetics
SP - 4063
EP - 4068
BT - 2025 IEEE International Conference on Systems, Man, and Cybernetics (SMC): Proceedings
PB - IEEE
T2 - 2025 IEEE International Conference on Systems, Man, and Cybernetics
Y2 - 5 October 2025 through 8 October 2025
ER -