Dashboard
0%
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 →

Q12EasyConcept

How should prompts be managed in production?

30-second answerSay your answer out loud first, then reveal.

Practices

  1. Versioning: each prompt has an ID and a version; changes go through pull requests.
  2. Templates: structured sections (role, instructions, examples, context slots) with typed variables. Validate the variables.
  3. Separation of concerns: keep model parameters (temperature, max tokens), tool schemas and prompt text together as one "prompt config" unit.
  4. Eval gates: run the regression suite before merging; compare against the baseline.
  5. Rollout: feature flags, canary or A/B, fast rollback.
  6. Traceability: log prompt version + model version per request.
  7. Ownership: product, domain experts and engineers may all edit prompts. A registry UI with review workflows helps non-engineers contribute safely.
  8. 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.

You understood something today that you didn't yesterday.