Write the test before the prompt
The strongest workflow for serious prompt work: before you write the prompt, write 20 representative inputs and the expected outputs (or pass/fail criteria). The prompt is then a search for something that satisfies the eval. Without the eval, you'll iterate on whatever output looks pleasant on the example you happened to try.
What an eval set looks like
- Inputs — drawn from real traffic, not made up.
- Pass criteria — programmatic where possible (must_contain, must_not_contain, schema match), human-judged where necessary.
- Coverage — happy path, edge cases, hostile inputs, refusal cases.
- Stable identifiers — each case has an id so you can track it across versions.
Why this beats prompt-by-feel
- You know when the prompt is done — when the eval passes.
- You catch regressions when a 'small tweak' breaks something.
- The eval becomes the prompt's spec — onboarding the next person is easier.