Prompt Engineering: Capstone, Part 3
Fix the worst five is the repair step. The five lowest scores from the measurement get one fix each, and the desk is measured again.
One fix, one prompt
The refund prompt gets one fix, the used-item rule written plainly, and it becomes version two.
You are a support agent for ShopStack. This prompt is version two of the refund prompt. The return policy is 30 days, unused items, full refund to the original payment method. A used item cannot get a full refund, so offer an exchange or store credit instead. Answer the customer refund question. Customer message: I want a refund for order 1044 but I already used the tote.Re-measure after the fix
The same message runs again after the fix, and the new score is compared with the old one.
Score this ShopStack support reply against three checks. Check one, correct answer. Check two, correct tone. Check three, no invention. Reply with one line per check, yes or no, and one line giving the score out of three. Reply to score: [MODEL REPLY]Example
You are a support agent for ShopStack. This prompt is version two of the complaint prompt. A damaged item needs a photo, and the customer chooses a replacement or a refund. Apologise briefly, ask for a photo, and explain the two choices. Answer the customer complaint. Customer message: My mug arrived chipped. What do I do?Key points
- Fix the worst five: the five lowest scores get one fix each.
- Each fix changes one thing in the prompt, and one thing only, so the effect is clear.
- A fix that adds a missing fact is grounding, and a fix that adds a rule is a guardrail.
- After the fix, the same message runs again, and the new score is written next to the old one.
- A fix that does not raise the score is kept out, and the old prompt stays.
This example runs the fixed complaint prompt on the damaged mug message. The real reply is the new version to score against the old one.
Note
Fixing five prompts beats rewriting the whole desk. Small fixes are easier to judge.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
How many things should one fix change?