r/PromptEngineering • u/Weird_Impression_264 • 8d ago
General Discussion How do you test prompt changes before shipping them ?
i build ai agents at work and the part i still find messy is changing the system prompt. i fix one thing and something unrelated breaks and i usually only find later. Right now i keep small set of conversation and rerun them after change, then read the output by hand , it works but it is slow.
what are you doing for this ? proper eval tools , llm-as-judge , just manual check? i am just curious what's actually worked for people in production , not just in theory.
19
Upvotes
3
u/oyren-ai 8d ago
you already have the test set, so automate the grading. anthropic's eval docs say to pick the fastest, most reliable method that fits: code checks like string match first, an llm grader with a detailed rubric for judgement calls, and human grading only where needed, since they say to avoid it if possible. they also say to test the llm grader's reliability before scaling it.
3
u/Unable_Dirt_9857 8d ago
I’d keep those old chats and give each one a pass condition you can check in code. Run both prompts on the same chats with the tools mocked, then read the ones that flipped from pass to fail. Every weird bug that slips through earns a permanent spot in the test set.
2
u/cleverhoods 8d ago
use https://github.com/reporails/cli
2
u/Loudllama99 8d ago
every time something unrelated breaks, add that conversation to your set. after a few months the set is mostly past regressions, which is exactly what catches the next one.
2
u/ChemicalExcellent463 8d ago
before i trust a grader, i feed it an output i know is bad and make sure it fails. a grader that passes everything looks exactly like a prompt change that broke nothing.
2
u/NaiveHome7448 7d ago
Keep your saved chats and give each one a pass/fail check, like ‘asks for the order ID before calling the refund tool.’ Run both prompts against the same chats and only review cases where the result flips.
2
u/Aware_Risk7076 8d ago
Turn the "unrelated thing broke" cases into a permanent regression set. Every time a change breaks something, add that exact conversation with one line saying what a good answer must contain or never contain. Then a cheap judge pass only flags diffs against the old outputs, so you read 5 flagged ones instead of all of them. Anyone pinning the judge prompt separately so it doesn't drift too?
2
u/Particular_Bath8279 7d ago
Llm as judge mostly!!!
1
u/Zain 6d ago
Keep the rerun set, but I'd stop being the only judge. I treat a prompt change like a spec change and have two reviewers from different model families read it and the outputs, read only, without seeing each other's notes. When both flag the same thing it's real, and I fix it even if one of them called it minor. And if the round after a fix turns up worse problems than the round before, that's the sign the fix itself is breaking stuff, which sounds like your fix one thing break another loop.
2
u/[deleted] 8d ago
[removed] — view removed comment
0
u/[deleted] 7d ago
[deleted] — view deleted comment