Prompts / Research and analysis
Fix Prompts With Smallest Failure-Driven Edit
You get a focused, low-risk fix for a prompt that is failing some of the time, instead of a full rewrite. It works because the edit is driven by the most common failure and checked against cases that already work.
The prompt
Act as a careful prompt engineer who improves prompts using evidence from test results, not guesswork.
Task: Review the current prompt and its test results, find the single most common failure pattern, and propose the smallest edit that fixes it without breaking the cases that already pass.
Current prompt:
{current_prompt}
Passing examples:
{passing_cases}
Failing examples:
{failing_cases}
Steps:
1. Group the failing examples by cause, such as missing format, wrong tone, ignored constraint or invented facts. Count each group and name the largest one as the dominant pattern.
2. Read the passing examples and note which parts of the current prompt are clearly working, so you leave them untouched.
3. Write one minimal change, ideally one or two sentences added or reworded, that targets only the dominant pattern.
4. Check the change against every passing example and say whether it could cause a regression. If it could, narrow the edit.
5. State how to confirm the fix: which failing cases should now pass and which passing cases to re-run.
Output: Four headed sections: "Failure groups" (a short table with counts), "Dominant pattern", "Proposed edit" (a before and after of only the changed lines), and "Risk and retest" (three bullet points maximum). No rewriting of the whole prompt.
Change the parts in curly braces. Use it after you have run a prompt on at least 10 to 20 real cases and have a mix of passes and failures to show.
What happened when we ran it
We sent
Act as a careful prompt engineer who improves prompts using evidence from test results, not guesswork. Task: Review the current prompt and its test results, find the single most common failure pattern, and propose the smallest edit that fixes it without breaking the cases that already pass. Current prompt: You are a support assistant for Brightleaf Plants, an online plant shop. Reply to the customer's email in a friendly tone. Answer their question using the policy notes provided. Keep the reply under 120 words and sign off as the Brightleaf team. Passing examples: Case 1: Customer asked how often to water a fern. Reply was friendly, 85 words, accurate and signed off correctly. Case 2: Customer asked about delivery times to Scotland. Reply gave 3 to 5 working days from the policy notes, 70 words, signed correctly. Case 3: Customer thanked us for a quick delivery. Reply was warm, short and signed correctly. Failing examples: Case 4: Customer asked for a refund on a dead cactus. Reply promised a full refund, but the policy only allows replacement within 14 days. Case 5: Customer asked if we ship to France. Reply said yes with a 2 day delivery time, but the policy notes do not cover France. Case 6: Customer asked for a refund on a damaged pot. Reply offered a refund and a 20 percent discount, neither of which is in the policy notes. Case 7: Customer asked for a care guide PDF. Reply was 180 words, over the limit. Steps: 1. Group the failing examples by cause, such as missing format, wrong tone, ignored constraint or invented facts. Count each group and name the largest one as the dominant pattern. 2. Read the passing examples and note which parts of the current prompt are clearly working, so you leave them untouched. 3. Write one minimal change, ideally one or two sentences added or reworded, that targets only the dominant pattern. 4. Check the change against every passing example and say whether it could cause a regression. If it could, narrow the edit. 5. State how to confirm the fix: which failing cases should now pass and which passing cases to re-run. Output: Four headed sections: "Failure groups" (a short table with counts), "Dominant pattern", "Proposed edit" (a before and after of only the changed lines), and "Risk and retest" (three bullet points maximum). No rewriting of the whole prompt.
The model replied
Run on Claude Sonnet 5.5, 24 Nov 2026. Automatic check: 3 out of 5.
Mentioned for
Claude, ChatGPT, Gemini
Where it came from
Found on GitHub, shared by awslabs: awslabs/ai-eval-studio.
This is our own version of the idea, written and tested by us. The original may differ.