Meta's prompt optimization toolkit just got its most interesting feature yet. The Prompt Duel Optimizer (PDO) runs prompt variants in head-to-head matchups. An LLM judge picks the winner. No ground-truth labels required.

The toolkit sits at 808 stars and 122 forks on GitHub. The paper — "LLM Prompt Duel Optimizer: Efficient Label-Free Prompt Optimization" by Yuanchen Wu, Saurabh Verma, Justin Lee, Fangzhou Xiong, Poppy Zhang, Amel Awadelkarim, Xu Chen, Yubai Yuan, and Shawndra Hill — was accepted to Findings of ACL 2026. A cookbook and tutorial now live on llama.com, making PDO accessible to developers who don't want to read the paper.

Here is how it works, why label-free optimization matters, and how to get started.

The Label Problem

Most prompt optimization methods need ground-truth labels. You score a prompt by checking how well its outputs match known correct answers. This works great if you have a labeled validation set sitting around.

Most teams don't.

Building labeled datasets is slow and expensive. In production, you often need a decent prompt before you can collect the data that would validate it. It's a chicken-and-egg problem: you need labels to optimize, but you need a working prompt to generate labels efficiently.

PDO sidesteps this entirely. Instead of scoring outputs against ground truth, it compares outputs against each other. An LLM judge looks at two outputs from two prompts and picks the one it prefers. This is pairwise preference feedback.

Why pairwise? Because LLM judges are terrible at absolute scoring but decent at relative comparison. Ask a model "rate this output 1 to 5" and you get noisy, poorly calibrated numbers. Ask "which of these two is better?" and you get a much more stable signal. Research from Liu et al. (2024) confirms this: pairwise beats pointwise for judge reliability.

How PDO Works

PDO combines two mechanisms: Double Thompson Sampling for efficient selection and top-performer guided mutation for discovering new candidates.

Double Thompson Sampling

Double Thompson Sampling (D-TS) extends the classic Thompson Sampling algorithm to dueling bandits. Instead of pulling one arm at a time, you pick two arms to face off.

Each round works like this:

  1. Compute optimistic Copeland scores. For each prompt, count how many opponents it beats with probability above 0.5. Use upper confidence bounds so you give untested prompts a chance. This is the exploration signal.
  1. Select the first prompt. From candidates with the highest optimistic scores, draw Thompson samples from Beta posteriors. The prompt with the highest sample count becomes the challenger.
  1. Select the second prompt. Focus on uncertain opponents. If prompt A clearly beats prompt B (lower confidence bound above 0.5), there's no point running that matchup again. Pick an opponent where the outcome is still unclear.
  1. Run the duel. Send both prompts' outputs for the same input to an LLM judge. Record the winner. Update win counts and posterior distributions.

The theory gives O(K² log T) expected Copeland regret. In practice, this means PDO concentrates comparisons on informative matchups rather than wasting budget on obvious outcomes.

Top-Performer Guided Mutation

D-TS finds the best prompt in a fixed pool. But the prompt space is enormous. You need to discover new candidates.

Every M rounds, PDO mutates the current top-performing prompt. Mutations can take several forms:

  • Template edits. Swap, add, or remove instruction clauses.
  • Text-gradient guided changes. Use an LLM to identify weaknesses and generate targeted edits.
  • LLM-assisted rewrites. Generate a completely new variant inspired by the top performer.

After mutation, the new variant enters the pool. Weak performers get pruned. The optimizer keeps the pool focused on competitive candidates.

This mirrors evolutionary search but with a crucial difference. Standard evolutionary methods mutate randomly and hope for improvement. PDO mutates the top performer and uses D-TS to quickly evaluate whether the mutation is better. The exploration is targeted, not scattershot.

The Copeland Ranking

When no single prompt beats every other prompt (a Condorcet winner), PDO uses the Copeland criterion. The Copeland score counts how many opponents a prompt beats with probability above 0.5. The prompt with the highest Copeland score wins.

This matters because in practice, prompt preferences are often non-transitive. Prompt A might beat B, B might beat C, and C might beat A. Copeland ranking handles this gracefully. It doesn't require a single dominant prompt to exist.

The Results

PDO was evaluated on two benchmarks:

  • BIG-bench Hard (BBH). A suite of challenging reasoning tasks. PDO consistently found stronger prompts than label-free baselines.
  • MS MARCO. A passage retrieval benchmark. PDO showed favorable quality-cost trade-offs under constrained comparison budgets.

The key finding: PDO outperforms label-free baselines while using fewer comparisons than exhaustive evaluation would require. The dueling bandit approach is sample-efficient. You don't need to compare every prompt pair. D-TS focuses your budget on the matchups that matter.

The paper also addresses judge reliability. LLM judges can exhibit position bias (preferring the first output) and verbosity bias (preferring longer outputs). PDO includes cross-family re-evaluation to probe for circularity. The results show that PDO's gains persist across different judge families, which strengthens confidence that the improvements are real and not artifacts of a particular judge.

Getting Started

Meta published a cookbook tutorial on llama.com that walks through the basics. The GitHub repo includes a Jupyter notebook (pdotutorial101.ipynb) for hands-on experimentation.

Installation

# Create a virtual environment
conda create -n prompt-ops python=3.10
conda activate prompt-ops

# Install from source (recommended)
git clone https://github.com/meta-llama/prompt-ops.git
cd prompt-ops
pip install -e .

Configuration

Create a YAML config file:

strategy: pdo
task:
  dataset_path: data/web_of_lies.json
model:
  name: openrouter/meta-llama/llama-3.3-70b-instruct
pdo:
  total_rounds: 30
  num_duels_per_round: 25
  num_initial_instructions: 20
  gen_new_prompt_round_frequency: 10
  thompson_alpha: 1.2
  ranking_method: copeland

The key parameters:

  • total_rounds: How many optimization iterations to run. 30 is a good starting point.
  • numduelsper_round: How many prompt comparisons per iteration. More duels = more accurate but more expensive.
  • numinitialinstructions: The starting pool size. 20 gives enough diversity.
  • gennewpromptroundfrequency: How often to mutate the top performer. Every 10 rounds balances exploration and exploitation.
  • thompson_alpha: Confidence bound parameter. 1.2 is the default.
  • ranking_method: Use copeland for general use.

Running

prompt-ops optimize --config config.yaml

Results save to the results/ directory with performance metrics and the optimized prompt.

The Web of Lies Use Case

The repo includes a ready-to-run example using the Web of Lies logical reasoning task. Each example presents a chain of statements about people who either always tell the truth or always lie. The model must determine whether the final person tells the truth or lies.

Example:

Sherrie tells the truth. Vernell says Sherrie tells the truth. Alexis says Vernell lies. Michaela says Alexis tells the truth. Elanor says Michaela tells the truth. Does Elanor tell the truth?
Answer: No

This is a good test for PDO because logical reasoning is easy to judge pairwise but hard to score with absolute metrics. Two prompts might both get the answer right, but one might show clearer reasoning. An LLM judge can make that distinction even without labeled ground truth.

How PDO Compares

PDO sits in a specific niche: label-free prompt optimization using pairwise comparisons.

Compared to DSPy. DSPy offers multiple optimizers (MIPRO, BootstrapFewShot, BetterTogether). Most require labeled data or at least a metric function. PDO requires neither. If you have labels, DSPy's optimizers can leverage them. If you don't, PDO is the better choice.

Compared to TextGrad. TextGrad uses gradient-based optimization on text. It requires a differentiable signal through the model. PDO uses only preference comparisons. TextGrad can find nuanced improvements but needs more setup. PDO is simpler to run.

Compared to EvoPrompt. EvoPrompt uses evolutionary optimization in natural language space. PDO also uses mutation, but combines it with principled bandit-based selection. EvoPrompt explores broadly. PDO explores efficiently by focusing duels on uncertain matchups.

Compared to PrefPO. PrefPO (Distyl AI, ICLR 2026 AIWILD) also uses preference-based optimization but applies RLHF-style learning. PDO takes a bandit approach. PrefPO learns a preference model. PDO finds the best prompt directly through comparisons. Different tools for different scales.

The distinguishing feature across all these: PDO is the only method that frames prompt selection as a dueling bandit problem and uses Double Thompson Sampling for efficient comparison allocation. This makes it sample-efficient and principled about budget allocation.

What Label-Free Optimization Means for Production

Label-free optimization changes the economics of prompt engineering.

In a typical production workflow, you write a prompt, test it on a handful of examples, maybe A/B test it, and ship it. If you're rigorous, you label a validation set and track metrics. This takes days or weeks.

With PDO, you point the optimizer at your task, give it a starting prompt and a pool of unlabeled examples, and let it run. The LLM judge handles evaluation. No labeling required. You can optimize prompts in hours, not weeks.

This matters most in scenarios where:

  • You don't have labeled data yet. New product, new task, zero existing annotations.
  • Labels are expensive. Domain experts cost money. PDO uses an LLM judge instead.
  • You need to optimize fast. Production prompts drift. Models update. What worked last month might not work this month. PDO lets you re-optimize without rebuilding validation sets.
  • You're comparing multiple prompts. PDO's pairwise comparison model is natural for this. You're already A/B testing. PDO automates the comparison.

The Cookbook

The cookbook on llama.com (llama.com/resources/cookbook/getting-started-with-pdo/) provides step-by-step guidance. It covers:

  • Setting up the environment
  • Configuring the PDO strategy
  • Running optimization on sample tasks
  • Interpreting results and Copeland scores

This is significant because the original prompt-ops documentation focused on the migrate strategy (template-based prompt transformation). The PDO cookbook is the first dedicated tutorial for the dueling optimizer. It lowers the barrier from "read the paper" to "run the notebook."

Current State and Limitations

The repo is actively maintained under the meta-llama organization. The code is MIT-licensed. The web frontend (merged in PR #59) provides real-time duel visualization.

Known limitations:

  • Judge quality matters. PDO inherits the biases of its LLM judge. Position bias and verbosity bias can skew results. The paper addresses this with cross-family re-evaluation, but in practice, you should sanity-check the judge's decisions.
  • Comparison budget. More duels = better results, but each duel costs an API call. The paper shows PDO is sample-efficient, but large prompt pools can still get expensive.
  • Config bug. Issue #60 reports that the strategy: pdo config setting is sometimes ignored in favor of auto-detection. This is a known usability bug.
  • Web frontend maturity. The frontend is functional but not yet feature-complete. It's best for exploration and demos, not production monitoring.

Why PDO Matters Now

The prompt optimization field is consolidating around two approaches: methods that require labels (DSPy, TextGrad, most gradient-based approaches) and methods that don't (PDO, PrefPO, some bandit approaches).

Label-free methods are gaining traction because production teams don't always have the luxury of labeled validation sets. The reality of shipping LLM products is that you often need a working prompt before you can collect the data that would validate it. PDO directly addresses this reality.

The ACL 2026 acceptance gives the approach academic credibility. The open-source implementation gives it practical accessibility. The cookbook and tutorial give it onboarding support. Meta's backing gives it institutional weight.

PDO is not the only label-free optimizer. But it's the one with the strongest combination of theoretical grounding, practical tooling, and open-source availability. If you need to optimize prompts without labeled data, this is where to start.


Suggested Title

No Labels, No Problem: Meta's PDO Lets Prompts Fight It Out

Word Count

~1,850 words

Fact-Check Notes

  • 808 stars, 122 forks: Confirmed from GitHub as of May 6, 2026. Star count has grown from ~795 (when PR #53 merged) to 808.
  • ACL 2026 Findings acceptance: Confirmed from the arXiv paper (v3, April 9, 2026). The paper states "Accepted to Findings of ACL 2026. Camera-ready version."
  • Authors: Yuanchen Wu (Penn State), Saurabh Verma, Justin Lee, Fangzhou Xiong, Poppy Zhang, Amel Awadelkarim, Xu Chen (all Meta), Yubai Yuan (Penn State), Shawndra Hill (Meta). Confirmed from arXiv page.
  • Double Thompson Sampling: Described accurately based on the paper (Section 3.1). The algorithm uses Beta posteriors with Thompson Sampling for selection and confidence bounds for opponent filtering.
  • Copeland ranking: Confirmed from the paper (Section 2.1). PDO uses Copeland scores when no Condorcet winner exists.
  • BIG-bench Hard and MS MARCO results: Confirmed from the paper abstract and experimental sections.
  • Cookbook on llama.com: Confirmed at llama.com/resources/cookbook/getting-started-with-pdo/. The URL was found via web search.
  • Tutorial notebook: Confirmed at github.com/meta-llama/prompt-ops/blob/main/notebook/pdotutorial101.ipynb.
  • Issue #60 (config bug): This was noted in our previous update article from May 1. May have been resolved since. Should verify before publishing.
  • PR #53 (PDO core): Confirmed merged by @heyjustinai.
  • PR #54 (tutorial notebook): Confirmed merged by @heyjustinai.
  • PR #59 (web frontend): Referenced in our previous update article. Should verify current merge status.
  • MIT license: Confirmed from GitHub repo.
  • Comparison with other methods (DSPy, TextGrad, EvoPrompt, PrefPO): Based on general knowledge of these methods' approaches. PrefPO is Distyl AI's preference-based optimizer accepted at ICLR 2026 AIWILD.

Citations