
Version Management and Rollbacks
Prompts break. Models change. Learn how to manage versions and perform Blue/Green deployments to prevent outages.
Version Management and Rollbacks
You change the prompt to be "funnier." Suddenly, the JSON parser breaks.
Prompt Versioning
Embed a version ID in your prompt code.
PROMPT_V_1_2 = "..."
Deployment Strategy: Canary
When executing a new prompt logic:
- Canary: Send 5% of traffic to the new logic.
- Monitor: Check error rates (JSON parsing failures).
- Rollout: If safe, go to 100%.
Model Pinning
Google updates the models. gemini-1.5-flash points to the latest version.
- Risk: If they update the model and it behaves differently, your app breaks.
- Fix: Pin the version. Use
gemini-1.5-flash-001(specific snapshot) instead oflatest.
Summary
Pin your model versions. Roll out prompt changes slowly.
In the next lesson, we discuss Scaling.