Governance & Observability

Prompt Versioning

Treat prompts as immutable, hashed, semver'd artefacts in a registry; deploy and roll back like code.

Problem

When prompts live as plain strings inside the application code, a wording change becomes a code change: rolling back the prompt requires reverting a deployment, comparing two prompt versions side by side requires diffing branches, and there is no clean way to say which prompt produced last week's outputs. Evaluation runs cannot be tied back to specific prompt text once that text has been edited in place. The team is forced to choose between treating every prompt edit as a full code release or losing the ability to audit and revert prompts precisely.

Solution

Prompts live in a registry as immutable, hashed, version-tagged artefacts. Code references prompts by name + version (semver). Deployments pin specific versions; rollback by version. Eval harness ties metric outcomes to prompt versions. Optionally signed for provenance.

When to use

  • Prompts are edited often and audit, rollback, or A/B comparison is required.
  • Eval outcomes need to be tied to specific prompt versions.
  • A registry can hold immutable, hashed, semver-tagged artefacts.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related