Prompt Tuning & Iteration
Tuning prompts with a scoreboard
Iterating on prompts is a scientific loop: hypothesis → change → eval → decide. Variable-by-variable A/B and regression suites turn prompt tuning from artistic to measurable.
What you will learn
- Run an eval-driven prompt iteration loop
- Isolate one variable per change
- Decide ship vs revert by numbers
What is this?
Prompt tuning is the process of improving a prompt measurably: run a golden eval, change one variable (phrasing, examples, format), re-evaluate, and keep changes that lift scores. Combined with versioning, this becomes the discipline that keeps prompt quality high across model upgrades.
Why do you need it?
- Eval-driven iteration compounds; vibes-driven 'tweaks' collect randomly.
- One-variable-at-a-time keeps causality clean enough to learn from.
- Prompt deltas are cheap to test and replay.
- A regression suite amortizes every future model-upgrade decision.
Mental model
A kitchen recipe refined through tastings
Prompt tuning
You don't change salt, temperature and plating at once and guess why the dish changed. The tasting panel (eval) scores each single change; the recipe (prompt) versions up when scores rise. Perfection is dozens of small measured adjustments.
How it works
- Detach a golden eval set with a clear metric.
- Baseline: run the current prompt. Record number.
- Change ONE variable; re-run. Compare.
- Ship winning delta; log it; revert on regression.
- Repeat vs a budget (changes per release).
The tuning loop.
In production
- Weekly tuning on sampled traffic for chat support prompts.
- Model-upgrade gates rerun the suite to catch prompt detuning.
- Feature A/B: the same prompt tuned per model version in prod config.
Best practices
- Always baseline first; never 'improve' without a number.
- Change one thing per experiment.
- Keep a prompt changelog with metrics (before → after).
- Re-check regressions on the FULL suite, not the happy path.
Common mistakes
- Tuning on a handful of eyeballed examples.
- Multiple concurrent edits making attribution impossible.
- Skipping the eval after the actual model upgrade.
- Never reverting — clinging to a trend line of one experiment.
Common issues
Eval set too small to measureHigh variance rundown
Enlarge golden set or aggregate multiple runs.
Prompt tuned but prod still badGolden set ≠ production distribution
Sample real traffic into the golden set.
Debugging tips
- Prompt change 'feels' better but eval flat → revert; the product didn't move.
- Regression but phrasing 'shouldn't matter' → it does; the suite caught it.
- Model upgrade flipped scores → prompt was tuned on the old distribution; re-tune.
Interview checkpoint
Quick quiz
The rule for prompt edits is…
A prompt tuned for model A is automatically tuned for model B.