Table of Contents
Fetching ...

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

Rethinking Prompt Optimizers: From Prompt Merits to Optimization

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
Paper Structure (57 sections, 3 equations, 16 figures, 22 tables)

This paper contains 57 sections, 3 equations, 16 figures, 22 tables.

Figures (16)

  • Figure 1: Empirical analysis of prompt optimization behavior across model scales and optimization algorithms. (a) Raw and GPT-4 optimized prompts are drawn from the GSM8K cobbe2021training and lu2025fipo. (b) Basic and EvoPrompt examples, along with the optimization algorithm used, are adapted from guo2024connecting. (c) The optimized prompt is generated using our merit-guided instruction (Fig. \ref{['fig:prompt_optimization_prompt']}). We present DeepSeek-R1 (DS)'s prompt and response evaluations (Results are consistent with GPT-4o). Further details are provided in Appx.\ref{['informationstudy']}.
  • Figure 2: Key merits of high-performing prompts extracted from DeepSeek-R1 evaluations.
  • Figure 3: Response-level win rate comparison. 'Win' indicates that the merit-guided prompt's response received a higher score than that from the raw prompt.
  • Figure 4: Overall stages of merit-guided prompt optimization (MePO).
  • Figure 5: Key merits of high-performing prompts extracted from GPT-4o evaluations.
  • ...and 11 more figures