Rethinking Prompt Optimizers: From Prompt Merits to Optimization
Zixiao Zhu, Hanzhang Zhou, Zijian Feng, Tianjiao Li, Chua Jia Jim Deryl, Mak Lee Onn, Gee Wah Ng, Kezhi Mao
TL;DR
This paper reframes prompt optimization around explicit, interpretable merits rather than implicit LLM-driven search, revealing that lightweight models can serve as effective optimizers when guided by clear design principles. It identifies four core merits—Clarity, Precision, Concise Chain-of-Thought, and Preserve Original Information—and builds a merit-guided prompt preference dataset using a lightweight LLM. MePO, a local, merit-guided prompt optimizer trained with Direct Preference Optimization, learns to transform raw prompts into merit-aligned prompts that improve both prompts and responses across diverse models and tasks. The results demonstrate strong downward and upward compatibility, scalability, and privacy-preserving deployment potential, with extensive ablations and analyses supporting the robustness of merit-based design for real-world use cases.
Abstract
Prompt optimization (PO) provides a practical way to improve response quality when users lack the time or expertise to manually craft effective prompts. Existing methods typically rely on LLMs' self-generation ability to optimize prompts. However, due to limited downward compatibility, the instruction-heavy prompts generated by advanced LLMs can overwhelm lightweight inference models and degrade response quality, while also lacking interpretability due to implicit optimization. In this work, we rethink prompt optimization through the lens of explicit and interpretable design. We first identify a set of model-agnostic prompt quality merits and empirically validate their effectiveness in enhancing prompt and response quality. We then introduce MePO, a merit-guided, locally deployable prompt optimizer trained on our merit-guided prompt preference dataset generated by a lightweight LLM. MePO avoids online optimization, reduces privacy concerns, and, by learning clear, interpretable merits, generalizes effectively to both large-scale and lightweight inference models. Experiments demonstrate that MePO achieves better results across diverse tasks and model types, offering a scalable and robust solution for real-world deployment. The code, model and dataset can be found in https://github.com/MidiyaZhu/MePO
