← library
promptexample · tested☀️ Prompt managementv1 · published 2026-10-15 · updated 2026-11-03

Tune up a prompt with test cases

Diagnose a weak prompt, write test inputs, compare two rewrites against the original, and keep the winner.

By Uplift Duo

Run it as a prompt

Paste this into any AI agent, or fetch it: curl -s https://uplift.page/api/v1/prompts/prompt-tune-up/raw

prompt.md
# Tune up a prompt with test cases

Improve an existing prompt for a specific model and show the new version is better with test cases, not opinion.

## Input
- Current prompt: [CURRENT PROMPT]
- What it is for, and how it fails today (paste 1-3 bad outputs if you have them): [TASK AND FAILURES]
- Target model or tool: [TARGET MODEL]

## Steps
1. Diagnose: list what the current prompt leaves unclear (role, inputs, output format, length, edge cases, what to do when unsure) and which observed failure each gap explains.
2. Write 5 test inputs: 2 typical, 1 easy, 1 edge case, 1 adversarial (missing data, conflicting instructions, or input that tries to override the prompt). Give each an expected behaviour in one or two sentences.
3. Draft 2 rewrites that take different approaches (for example constraints-first vs. worked example). Fit the target model's conventions (system vs. user message, tags, structured output support) and keep any placeholders the original uses.
4. Run the original and both rewrites on all 5 inputs if you can call the model. If you cannot, reason through each and state clearly that nothing was executed. Run each test 3 times; count a pass only when at least 2 of 3 pass.
5. Score each version per test as pass / partial / fail against the expected behaviour. Pick the winner on passes, then on length.
6. Tighten the winner: remove lines that did not change any result.

## Rules
- Keep the original intent; add no new tasks.
- Prefer an explicit output format and an instruction for missing input over adjectives like "be thorough".
- Do not recommend sampling settings the target model does not expose.

## Output
1. The final prompt, ready to paste.
2. A change list: each change and the test it fixed.
3. The test table: input, expected, and result for original / A / B.
4. Known weaknesses that remain.

The full prompt

Improve an existing prompt for a specific model and show the new version is better with test cases, not opinion.

Input

  • Current prompt: [CURRENT PROMPT]
  • What it is for, and how it fails today (paste 1-3 bad outputs if you have them): [TASK AND FAILURES]
  • Target model or tool: [TARGET MODEL]

Steps

  1. Diagnose: list what the current prompt leaves unclear (role, inputs, output format, length, edge cases, what to do when unsure) and which observed failure each gap explains.
  2. Write 5 test inputs: 2 typical, 1 easy, 1 edge case, 1 adversarial (missing data, conflicting instructions, or input that tries to override the prompt). Give each an expected behaviour in one or two sentences.
  3. Draft 2 rewrites that take different approaches (for example constraints-first vs. worked example). Fit the target model's conventions (system vs. user message, tags, structured output support) and keep any placeholders the original uses.
  4. Run the original and both rewrites on all 5 inputs if you can call the model. If you cannot, reason through each and state clearly that nothing was executed. Run each test 3 times; count a pass only when at least 2 of 3 pass.
  5. Score each version per test as pass / partial / fail against the expected behaviour. Pick the winner on passes, then on length.
  6. Tighten the winner: remove lines that did not change any result.

Rules

  • Keep the original intent; add no new tasks.
  • Prefer an explicit output format and an instruction for missing input over adjectives like "be thorough".
  • Do not recommend sampling settings the target model does not expose.

Output

  1. The final prompt, ready to paste.
  2. A change list: each change and the test it fixed.
  3. The test table: input, expected, and result for original / A / B.
  4. Known weaknesses that remain.

Served from the uplift.page library and refreshed within 5 minutes of every update.