Prompt Management & LLMOps
AI Engineer path · lesson 95 of 124Version prompts like code: promote from dev to prod through an eval gate, roll out safely with a canary, and close the loop from production feedback back into the next version.
Key insight
Treat prompts like code: version, review, evaluate, promote through environments, and gate on regression. The reason production incidents come from "someone edited a prompt in the console" is that consoles have no gate.
Ship a prompt change safely
Order the lifecycle of a prompt edit.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
- 1Drop a step here
- 2Drop a step here
- 3Drop a step here
- 4Drop a step here
- 5Drop a step here
- 6Drop a step here
Test your knowledge
What is the single strongest reason NOT to edit prompts directly in a production admin console?
The short version
A prompt is code that runs inside the model. Ship it like code: PRs, tests (evals), a staging environment, a canary to a small share of users, and a rollback button. The alternative — editing prompts in production consoles — is how outages happen.
In more depth
Prompt management & LLMOps
A prompt is code that runs inside a model. Ship it with the same discipline.
Registry + versioning
A prompt registry (Langfuse, LangSmith, PromptLayer, or a home-grown store) is a versioned artifact store. Apps fetch prompt_v_current("customer_support_answer") at boot and cache; promoting a version is a registry mutation, not a code deploy.
Eval gate
Every promotion runs a labeled eval suite. Below the baseline score, promotion is blocked. Per-slice reporting (segment, template, question type) is essential — averages hide regressions.
Canary / A-B rollout
Canary a small fraction of live traffic to the new version, watch live KPIs (latency, cost, thumbs-down, error rate, cascade escalation rate), and complete rollout only if the canary is winning. A-B for decision-making between two variants.
Feedback loop
Failing eval samples and thumbs-down production traces flow back into the labeled dataset. Each version is measured against the failure modes of the last.
Composes with everything else
Interview Questions
References & Further Reading
Related topics
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required