1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →
How should prompts be managed in production?
30-second answerSay your answer out loud first, then reveal.
Practices
- Versioning: each prompt has an ID and a version; changes go through pull requests.
- Templates: structured sections (role, instructions, examples, context slots) with typed variables. Validate the variables.
- Separation of concerns: keep model parameters (temperature, max tokens), tool schemas and prompt text together as one "prompt config" unit.
- Eval gates: run the regression suite before merging; compare against the baseline.
- Rollout: feature flags, canary or A/B, fast rollback.
- Traceability: log prompt version + model version per request.
- Ownership: product, domain experts and engineers may all edit prompts. A registry UI with review workflows helps non-engineers contribute safely.
- Caching-friendly structure: stable prefix first, dynamic content last (Q6).
Tools: git + config files, LangSmith/Langfuse/Braintrust prompt management, or an internal registry.
Common mistakes
- Prompts hard-coded in many places across the codebase with no tests.
- "Quick fixes" to prompts in production that silently break other cases.
Related
You understood something today that you didn't yesterday.