Efficient and Accurate Prompt Optimization: the Benefit of Memory in Exemplar-Guided Reflection
Cilin Yan, Jingyun Wang, Lin Zhang, Ruihui Zhao, Xiaopu Wu, Kai Xiong, Qingsong Liu, Guoliang Kang, Yangyang Kang

TL;DR
This paper introduces a memory-augmented exemplar-guided reflection method for prompt optimization in large language models, significantly improving performance and efficiency by utilizing historical feedback and better exemplar retrieval.
Contribution
It proposes a novel memory-based mechanism for prompt optimization that leverages historical feedback and improves exemplar selection, outperforming previous methods.
Findings
Improves F1 score by 10.1 on LIAR dataset
Reduces optimization steps by half on ProTeGi
Outperforms state-of-the-art prompt optimization methods
Abstract
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 feedback 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsNatural Language Processing Techniques · Logic, programming, and type systems · AI-based Problem Solving and Planning
