TY - GEN
T1 - Efficient and Accurate Prompt Optimization
T2 - 63rd Annual Meeting of the Association for Computational Linguistics, ACL 2025
AU - Yan, Cilin
AU - Wang, Jingyun
AU - Zhang, Lin
AU - Zhao, Ruihui
AU - Wu, Xiaopu
AU - Xiong, Kai
AU - Liu, Qingsong
AU - Kang, Guoliang
AU - Kang, Yangyang
N1 - Publisher Copyright:
© 2025 Association for Computational Linguistics.
PY - 2025
Y1 - 2025
N2 - Automatic prompt engineering aims to enhance the generation quality of large language models (LLMs). Recent works utilize feedbacks generated from erroneous cases to guide the prompt optimization. During inference, they may further retrieve several semantically related exemplars and concatenate them to the optimized prompts to improve the performance. However, those works only utilize the feedbacks at the current step, ignoring historical and unseleccted feedbacks which are potentially beneficial. Moreover, the selection of exemplars only considers the general semantic relationship and may not be optimal in terms of task performance and matching with the optimized prompt. In this work, we propose an Exemplar-Guided Reflection with Memory mechanism (ERM) to realize more efficient and accurate prompt optimization. Specifically, we design an exemplar-guided reflection mechanism where the feedback generation is additionally guided by the generated exemplars. We further build two kinds of memory to fully utilize the historical feedback information and support more effective exemplar retrieval. Empirical evaluations show our method surpasses previous state-of-the-arts with less optimization steps, i.e., improving F1 score by 10.1 on LIAR dataset, and reducing half of the optimization steps on ProTeGi.
AB - Automatic prompt engineering aims to enhance the generation quality of large language models (LLMs). Recent works utilize feedbacks generated from erroneous cases to guide the prompt optimization. During inference, they may further retrieve several semantically related exemplars and concatenate them to the optimized prompts to improve the performance. However, those works only utilize the feedbacks at the current step, ignoring historical and unseleccted feedbacks which are potentially beneficial. Moreover, the selection of exemplars only considers the general semantic relationship and may not be optimal in terms of task performance and matching with the optimized prompt. In this work, we propose an Exemplar-Guided Reflection with Memory mechanism (ERM) to realize more efficient and accurate prompt optimization. Specifically, we design an exemplar-guided reflection mechanism where the feedback generation is additionally guided by the generated exemplars. We further build two kinds of memory to fully utilize the historical feedback information and support more effective exemplar retrieval. Empirical evaluations show our method surpasses previous state-of-the-arts with less optimization steps, i.e., improving F1 score by 10.1 on LIAR dataset, and reducing half of the optimization steps on ProTeGi.
UR - https://www.scopus.com/pages/publications/105021009769
U2 - 10.18653/v1/2025.acl-long.37
DO - 10.18653/v1/2025.acl-long.37
M3 - 会议稿件
AN - SCOPUS:105021009769
T3 - Proceedings of the Annual Meeting of the Association for Computational Linguistics
SP - 753
EP - 779
BT - Long Papers
A2 - Che, Wanxiang
A2 - Nabende, Joyce
A2 - Shutova, Ekaterina
A2 - Pilehvar, Mohammad Taher
PB - Association for Computational Linguistics (ACL)
Y2 - 27 July 2025 through 1 August 2025
ER -