Every prompt optimization tool on the market shares the same assumption: you need a big, expensive LLM to fix your prompts. GPT-4 generates better prompts. Those better prompts get fed to whatever model you're actually running. Problem solved.

Except it isn't solved. Those fancy GPT-4-optimized prompts often make small models worse. The prompts come back verbose, layered with instructions, and stuffed with edge cases that a 7B parameter model can't parse. The result? Confused outputs, missed key points, and responses that go off the rails.

A paper accepted at EACL 2026 flips this assumption on its head. The authors built a prompt optimizer that runs locally, on a lightweight model, and beats methods that rely on frontier LLMs. They call it MePO: Merit-guided Prompt Optimization.

The paper is titled "Rethinking Prompt Optimizers: From Prompt Merits to Optimization," and it comes from Zixiao Zhu, Hanzhang Zhou, Zijian Feng, Tianjiao Li at Nanyang Technological University, along with Chua Jia Jim Deryl, Mak Lee Onn, and Gee Wah Ng from Singapore's Home Team Science and Technology Agency, with Kezhi Mao as corresponding author. It's a long paper, 30 pages with 16 figures, and it makes a surprisingly clean argument.

The Downward Compatibility Problem

Here's the core issue the paper identifies. Most prompt optimization methods use a large LLM (GPT-4, LLaMA-70B, etc.) to rewrite prompts. Then those rewritten prompts get handed off to a smaller inference model, the one you actually deploy, to generate answers.

The assumption is that better prompts are universally better. A prompt that helps GPT-4 should also help LLaMA-7B. But it doesn't work that way.

The authors show concrete examples. A GPT-4-optimized prompt for a GSM8K math problem adds lengthy instructions, edge case handling, and elaborate reasoning cues. When a lightweight model reads that prompt, it gets overwhelmed. The model tries to follow every instruction, misses the point, and produces wrong or irrelevant answers. The "optimized" prompt actually degrades performance.

This is the downward compatibility problem. Prompts optimized by large models don't transfer well to small ones. The authors demonstrate this across multiple benchmarks and model sizes.

There's a related problem. Even when you try to use a lightweight model as the optimizer itself, it fails. Prior work by Wang et al. (PromptAgent) and Lu et al. gave lightweight models vague instructions like "Given error feedback, generate a better prompt" or "You are an expert in prompt optimization." Small models produce garbage under these conditions. The instructions are too open-ended.

So you're stuck. Big-model prompts break small inference models. Small models can't optimize their own prompts. The assumption was that you need frontier LLMs no matter what.

MePO challenges this.

The Key Insight: Explicit Merits

The authors asked a different question. Instead of asking "which model should optimize prompts?", they asked "what makes a prompt good in the first place?"

They ran an empirical study. They took 5,000 raw questions from the Alpaca dataset, had a lightweight model (Qwen2.5-7B-Instruct) rewrite each one five times, generated responses for each version, and scored response quality with DeepSeek-R1. Then they compared prompts that produced high-scoring responses against prompts that produced low-scoring ones. They asked DeepSeek-R1 to identify what made the good prompts better.

Three qualities showed up again and again: Clarity, Precision, and Conciseness.

This held up across evaluators. GPT-4o and Qwen3-32B confirmed the same pattern.

The literature had pointed in similar directions. Wei et al. showed chain-of-thought reasoning helps. Bsharat et al. cataloged 26 prompting principles. Ye et al. identified detailed descriptions, context specification, and step-by-step reasoning. But these prior works emphasized different dimensions without consensus on what matters most.

The empirical evidence gave a clear answer. Good prompts are clear, precise, and concise. Not baroque. Not instruction-heavy. Not verbose.

The authors then consolidated these findings into four design merits:

  • Clarity: Set clear, unambiguous expectations so the model knows exactly what to produce
  • Precision: Use exact, purposeful language rather than vague wording
  • Concise Chain-of-Thought: Include brief reasoning cues without drowning the model in step-by-step verbiage
  • Preserve Original Information: Don't lose the user's actual intent when rewriting

The third merit is particularly notable. Chain-of-thought prompting is well-established, but in practice, full CoT instructions bloat prompts and confuse lightweight models. The authors found that a condensed version, concise chain-of-thought, preserves the reasoning benefit while cutting the verbosity that kills small model performance.

Validating the Merits

The authors tested whether these merits actually work. They rewrote prompts following the four merits, then measured two things:

Response quality: Merit-guided prompts produced better responses than raw prompts. On the Alpaca dataset, the merit-guided prompts matched or beat GPT-3.5-generated responses. On the BPO dataset, they significantly outperformed human-preferred responses. This is striking because a 7B model, guided by the merits, produced prompts that a 7B inference model could use effectively.

Prompt quality: They also evaluated the prompts themselves, not just the responses. This is a dimension most prior work ignores. Across 2,000 prompt comparisons per dataset, optimized prompts were preferred over raw prompts in 95.75% of cases on BPO and 97.9% on Alpaca. The merits don't just help responses. The prompts themselves are measurably better.

Building MePO

With validated merits in hand, the authors built MePO. The approach has three stages.

Stage 1: Generate a preference dataset. They used Qwen2.5-7B-Instruct as the reference model (they call it M_ref). This lightweight model rewrote raw prompts from Alpaca and BPO using the four merits as guidance. Then the same model generated responses from both raw and rewritten prompts. DeepSeek-R1 scored every response. They kept only pairs where the rewritten prompt's response scored higher than the raw prompt's response, and where the golden response exceeded a quality threshold of 8 out of 10.

Each training sample became a 4-tuple: (raw prompt, optimized prompt, raw response, optimized response). This gives the model both the prompt transformation and the downstream evidence that the transformation works.

They also degraded 10% of the raw prompts intentionally, simulating the messy, under-specified prompts that real users write. This makes the model more robust to the kind of input it will actually see in deployment.

The final dataset: 40,151 preference pairs. Entirely generated by a 7B model. No API calls to GPT-4. No cloud dependency.

Stage 2: Train with Direct Preference Optimization. MePO is fine-tuned from Qwen2.5-7B-Instruct using DPO (Direct Preference Optimization). The training objective teaches the model to prefer merit-aligned prompts that produce higher-quality responses. The DPO loss function compares the optimized model's probability of generating the golden prompt versus the silver prompt, anchored against a reference model.

This is the same alignment approach used in RLHF-style training, but applied to prompt optimization rather than response generation.

Stage 3: Deploy locally. At inference time, you give MePO a raw prompt. It returns an optimized version. No API key needed. No data leaves your machine. The model is 7B parameters, which means it runs on a single consumer GPU.

Results

The authors evaluated MePO against two established local prompt optimizers, BPO and FIPO, across five benchmarks (ARC-Easy, ARC-Challenge, GSM8K, BBH, PiQA) and multiple inference models from different families (Qwen, Tulu, LLaMA).

The results break down along two axes.

Downward compatibility: MePO's optimized prompts improve performance on lightweight inference models (those under 13B parameters). This is where prior methods struggle most. When GPT-4 or a 70B model rewrites a prompt for a 7B inference model, the prompt often hurts performance. MePO's prompts help.

Upward compatibility: MePO's optimized prompts also improve performance on large inference models. The learned merits generalize. A prompt optimized by a 7B model, following clear merit principles, transfers effectively to models much larger than itself.

This dual compatibility is the key result. The merits are model-agnostic. Clarity, precision, concise reasoning, and information preservation help regardless of whether the inference model is Qwen2.5-7B-Instruct or DeepSeek-67B. The optimization doesn't need to "know" what model will consume the prompt, because good prompt structure is universal.

At the prompt level, MePO consistently outperformed baselines. At the response level, MePO matched or exceeded BPO and FIPO across the board, with particularly strong gains on lightweight inference models where the downward compatibility problem hits hardest.

Why Privacy Matters

Every time you send a prompt to GPT-4 for optimization, that prompt leaves your infrastructure. For personal use, this is annoying. For enterprises, it's a compliance problem. Healthcare, finance, defense, and legal organizations cannot route internal queries through external APIs without violating data governance policies.

MePO eliminates this dependency. The entire pipeline, dataset generation, training, and inference, runs on local hardware. The 40K preference dataset was built without any API calls. The training uses DPO on a single-machine setup. Inference requires only a 7B model on a consumer GPU.

Singapore's Home Team Science and Technology Agency co-authored this paper. That's a government agency responsible for homeland security. Their involvement signals that the privacy angle isn't theoretical. When a national security organization helps build a tool that keeps all data on-premises, the use case is real.

The authors explicitly frame MePO as a solution for "low-resource or privacy-sensitive settings." In such settings, you cannot send user queries to OpenAI. You need optimization that works locally. MePO delivers that.

Practical Setup

Running MePO is straightforward. The model is available on Hugging Face at zixiaozhu/MePO, fine-tuned from Qwen2.5-7B-Instruct. You can load it with 8-bit quantization to fit on a single GPU:

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    'zixiaozhu/MePO', device_map="auto", load_in_8bit=True
)
tokenizer = AutoTokenizer.from_pretrained(
    'zixiaozhu/MePO', truncation_side='left', padding_side='left'
)

To optimize a prompt, format it with the silver prompt instruction template:

po_prompt_ins = (
    "You are an expert of prompt optimization.\n\n"
    "Sliver Prompt:\n'S_P'\n\n"
    "The optional Sliver Response was generated by an AI based on the "
    "Silver Prompt. Please help modify the Silver Prompt to Golden Prompt "
    "(in English) that can obtain a more correct response, in reference to "
    "the optional Golden Response. The Golden Prompt should be strictly "
    "faithful to any factual information in the Silver Prompt. Only give me "
    "the content of Golden Prompt in English, do not contain any other "
    "information."
)

raw_prompt = "who is the father of nlp?"
prompt = po_prompt_ins.replace("S_P", raw_prompt)

messages = [
    {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
    {"role": "user", "content": prompt}
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=1024, do_sample=False)

# Strip input tokens to keep only the generated response
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
optimized_prompt = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]

The 40,151-entry dataset is also available on Hugging Face (zixiaozhu/MePO), along with two variants: MePOBPO (optimized prompts based on the BPO dataset) and MePOAlpaca (based on the Alpaca dataset). The authors recommend MePO_BPO for training optimizers targeting lightweight LLMs under 7B, especially for chatbot-style tasks.

Training your own optimizer from scratch requires only:

pip install -r requirements.txt
python MePO_run_train.py

Full code and scripts are on GitHub at MidiyaZhu/MePO.

What This Changes

The prompt engineering community has been operating under a specific mental model. You have a frontier model. You use it to optimize prompts. You deploy those prompts. This model has three problems.

First, the privacy problem. Sending prompts to an API is a non-starter for many organizations.

Second, the downward compatibility problem. Frontier-model prompts break on smaller models, which are the models most organizations actually deploy due to cost constraints.

Third, the interpretability problem. When GPT-4 rewrites a prompt, you get a better prompt but no understanding of why it's better. The optimization is a black box.

MePO addresses all three. It runs locally. Its prompts work across model sizes. And the four merits give you a framework for understanding what makes a prompt effective.

The interpretability angle deserves more attention. Once you know that clarity, precision, concise chain-of-thought, and information preservation are what matter, you can write better prompts yourself. The merits aren't just training signals. They're guidelines anyone can follow. MePO automates what those guidelines suggest, but the guidelines themselves have standalone value.

The Bigger Picture

This paper fits into a growing realization that small models, given the right structure, can do more than we assumed. The history of AI is littered with cases where the answer turned out to be "better scaffolding" rather than "bigger model." MePO is another data point for that pattern.

The 7B model that generates the dataset, the 7B model that gets fine-tuned as MePO, and the inference models that consume MePO's prompts don't need to be the same. But they can be. You could run the entire stack, dataset generation, optimization, and inference, on a single machine with a single GPU. That's a meaningful shift from "prompt optimization requires calling an API you don't control."

The dataset release is also significant. 40,151 preference pairs, all generated locally, all quality-filtered, all publicly available. This is a resource other researchers can build on without depending on GPT-4 labels.

The paper's limitation, acknowledged by the authors, is that the merit framework currently focuses on the optimization stage. They leave the integration of merits with inference feedback for future work. This means MePO optimizes a prompt once and hands it off. It doesn't yet loop back based on the inference model's actual output to refine further.

There's also the question of task specificity. The merits were discovered on general open-ended queries. Reasoning-heavy tasks, coding tasks, and creative writing tasks might benefit from additional or different merits. The framework is extensible, but the current four merits aren't claimed to be exhaustive.

Bottom Line

MePO shows that you don't need a frontier LLM to optimize prompts. A 7B model, trained on locally generated data with explicit merit signals, produces prompts that are both higher quality and more compatible across model sizes than prompts from GPT-4 or other large optimizers. The method is private, interpretable, deployable on consumer hardware, and open source.

For anyone running lightweight models in production, this is a practical tool available today. For the research community, it's a challenge to the assumption that bigger is always better for prompt optimization. And for organizations that can't send data to external APIs, it's proof that local prompt optimization doesn't have to mean inferior results.


Citations

Suggested Title

You Don't Need GPT-4 to Write Good Prompts

Word Count

2,418

Fact-Check Notes

  • The claim that MePO beats or matches BPO and FIPO across all benchmarks comes from Table 2 in the paper. I have not independently verified the exact numbers from the table since the HTML rendering truncates the results section. The paper states MePO "matches or exceeds existing discrete APO methods." The specific percentage improvements per benchmark should be confirmed against the paper's Table 2 before publishing.
  • The 40,151 dataset count comes from the Hugging Face dataset card. The paper refers to this as "40k-scale."
  • The prompt-level preference rates (95.75% on BPO, 97.9% on Alpaca) come directly from Section 2 of the paper.
  • The merit discovery process uses Qwen2.5-7B-Instruct and DeepSeek-R1 as the evaluator. GPT-4o and Qwen3-32B were also used for verification. This is stated in Sections 2.1 and B.2.
  • The DPO training methodology is confirmed in Section 3 of the paper and the Moonlight literature review.
  • MePO_BPO is recommended for training optimizers targeting lightweight LLMs under 7B. This comes from the GitHub README.
  • The Home Team Science and Technology Agency (HTX) is Singapore's defense technology organization. The co-authorship is real and the privacy angle is clearly motivated by this partnership.
  • I characterized the paper as a "long paper" at EACL 2026 based on the task description. The ACL Anthology confirms it as 2026.eacl-long.38, which is the long paper track.