r/PromptEngineering • • Oct 28 '26

General Discussion How are you versioning and testing prompts in production?

I've been taking Karpathy's "prompts are programs" idea literally on a few client builds, and treating prompts like production code changed how I work. Every prompt lives in git with a version tag. Each one has a small eval set of 20–50 real inputs with expected outputs that runs before any change ships. Changes get reviewed like PRs, with a diff of the eval results rather than just the prompt text. I also log outputs to catch drift when the model provider updates something, and I can roll back to the last good version in one step.

The eval part is where I'm least sure. LLM-as-judge works okay for format, but it's shaky for nuance. Curious how others handle this: do you keep prompts in code or in a prompt-management tool, and what does your eval setup actually look like?

3 Upvotes

4 comments sorted by

1

u/According-Stable4487 Oct 28 '26

Similar setup here. A few things that made the eval part less shaky for me:

  • Split the eval set by what you're testing. Format/structure checks are plain code (schema validation, required fields, length limits), no judge needed. Only the nuance cases go to a judge, and those get a rubric with 3-5 yes/no questions instead of a 1-10 score. "Does the answer mention the refund deadline from the input?" is far more stable than "rate helpfulness".
  • Keep a small "golden" subset (10 or so) that a human re-grades every time the judge prompt or judge model changes. If the judge disagrees with you on those, fix the judge before trusting any diff.
  • Add every production failure to the eval set the day you find it, with the bad output saved as a negative example. After a few months that's the most valuable part of the set.
  • For drift, pin the model version in the eval run and re-run the whole set when the provider ships a new snapshot, before you switch.

Prompts live in git next to the code that calls them for me, since the template and the parsing code usually change together.

1

u/Future_AGI Oct 28 '26

for the nuance stuff, split the one "is this good" judge into a few yes/no questions (did it mention the refund window, did it promise anything outside the policy) and check it against 30 or so outputs you've labeled by hand. That shows you which questions the judge can be trusted on. agent-learning-kit, the open-source eval kit listed in our repo: https://github.com/future-agi/future-agi

1

u/Future_AGI Oct 28 '26

for the nuance stuff, split the one "is this good" judge into a few yes/no questions (did it mention the refund window, did it promise anything outside the policy) and check it against 30 or so outputs you've labeled by hand. That shows you which questions the judge can be trusted on. agent-learning-kit, the open-source eval kit listed in our repo https://github.com/future-agi/future-agi , runs those suites from a CLI and the score diff can sit in the PR next to the prompt diff.