Practice · Chapter 9 of 11
Testing and improving
A prompt is finished when it works on your cases, not when it looks good. Testing is how you find out.
By Kasum BajramiUpdated

Decide what good means
Before you tune a prompt, write down what a good result does. Anthropic advises success criteria that are specific, measurable, achievable and relevant Anthropic.
Weak
A good summary.
Better
At most five bullets. Every decision from the notes appears. Nothing appears that isn't in the notes. Someone who wasn't there understands it.
A handful of test cases
Collect a few inputs that look like real use, including awkward ones. Anthropic suggests tests that mirror your actual task and, where you can, grading them automatically Anthropic. For a meeting-summary prompt, four cases could be:
| Case | Input | What to watch |
|---|---|---|
| Typical | A normal set of meeting notes. | Is every decision there? |
| Short | Three lines, half of them abbreviations. | Does it invent detail to fill space? |
| Messy | Two meetings pasted together. | Does it mix them up or say so? |
| Tricky | Notes where a decision is reversed later. | Does it report the final one? |
Change one thing at a time
If you change three things at once, you won't know which one helped. OpenAI advises tests and evaluation checks before changing prompts that are already in use OpenAI.
Run
All your cases, with the current prompt.
Compare
Mark what misses the criteria.
Change
One thing, aimed at one failure.
Repeat
Run every case again, not only the failed one.
Keep your versions
Keep each version with a short note on why you changed it, compare old and new on the same cases, and keep the winner. When you switch models, run the cases again: Anthropic advises testing a technique against your own evaluations before applying it to a different model Anthropic.
PromptPrinter keeps the versions of a saved prompt and shows what changed between them.
Sources
Official guides by the model providers. They change as models change, so check them for your model.