EasyDeepLearn

How do you version prompts in production?

medium

Answer

  • (1) Prompts in git alongside code (not hard-coded strings).
  • (2) Structured template files (.md / .yaml with variables).
  • (3) Version per prompt (v1, v2, v3) + rollback.
  • (4) A/B tests different prompt versions on real users.
  • (5) Track (prompt version, model, output) tuples for eval.
  • (6) Prompt registry (LangSmith / Humanloop / PromptLayer / Langfuse) for non-eng edits without deploy.
  • (7) Tests: golden set of inputs → expected outputs / rubric checks.
  • Rule: prompts are code — treat them so.
Check yourself — multiple choice
  • Just paste
  • Prompts in git + templates (.md/.yaml) + version + rollback + A/B on real users + track (version,model,output) + registry (LangSmith/Humanloop/PromptLayer/Langfuse) + golden set tests; prompts=code
  • Random
  • Not real

Prompt versioning: git + templates + version + A/B + registry + tests.

#llmops

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions