Documentation/Concepts/Prompt versions
1 min read

Prompt versions

A prompt version is a snapshot of a prompt template at a point in time. Versioning prompts gives you reproducibility: you can answer “what did we send to the model?” for any trace or eval run.

Why prompts need versioning

  • Prompts change frequently and impact behavior as much as code changes.
  • Without versioning, debugging becomes guesswork: you can’t reproduce results reliably.
  • Safe deployment requires promotion and rollback the same way you treat backend releases.

What to version

  • the full template content (system + user + tools)
  • variables and expected schema (what inputs the template requires)
  • default parameters (model choice, temperature, max tokens)
  • migration notes (what changed and why)

How to use prompt versions in production

Recommended pattern:

  • code references a prompt id
  • environments map that prompt id → active version
  • traces record both prompt id and version id

That makes rollbacks instant and analytics sliceable.

Next steps