A versioned prompt template used to interact with an AI model, with its performance metrics.
A prompt version is one immutable revision of a prompt templatePrompt TemplateAI & Machine LearningA reusable prompt templateView reference →: the exact text, system message, and examples as they stood at a moment in time, with a unique identifier. The template is the thing you edit; the version is the thing you can never change again, which is what makes it trustworthy. Without versions, a prompt is a moving target, and any result you recorded yesterday belongs to a prompt that may no longer exist.
The idea is borrowed wholesale from source control. Git made it ordinary to pin any artefact to an immutable commit, and AI engineering applied the same move to prompts once teams discovered that prompts drift. The defining problem is the silent behaviour change: tweaking a prompt to fix one edge case can quietly degrade the main use case, and a reworded line can break downstream logic that depended on the old phrasing. If every edit overwrites the last, there is nothing to compare the regression against and nothing to roll back to.
Versioning answered this by treating each change as a unique, immutable artefact with its own ID. That gave teams three things they now expect: comparing two versions to see what actually changed, testing a version before it reaches production, and rolling back instantly when a deployed version misbehaves.
The discipline then merged with experimentation. Because each version is fixed, two of them can be served to different user groups at once, and A/B testing turns prompt engineering from an art into something measurable: version A against version B, judged on real metricsMetricStrategyA unified metric that measures progress, health, or behaviour across the productView reference → rather than intuition. The version is the unit that makes the experimentExperimentValidationA test designed to validate a hypothesisView reference → honest, since each arm points at an exact, unchanging prompt.
A team runs an onboarding assistant on prompt version 7. An engineer edits the template to make replies warmer, producing version 8, and ships it to 50% of new users. Over a week, version 8 lifts message-completion rate by 4 points but raises escalations to human agents, because the warmer tone buried a required disclaimer. Because both versions are pinned, the team reads the difference exactly, reverts the live traffic to version 7 in one action, and keeps version 8 on record to fix the disclaimer. The rollback takes seconds precisely because version 7 was never overwritten.
In the Unified Product Graph, Prompt VersionAI & Machine LearningA version of a prompt template lives in the prompt_versionai domain and is structurally a child of its template. The edge Prompt VersionevolvesPrompt Templatecross-domain ties every revision back to the durable template it descends from, and prompt_version_evolves_prompt_templateAI Modelprompted viaPrompt Versionhierarchy records exactly which model build received that frozen text. Holding versions as first-class entities, distinct from the template, is what gives the graph a reproducible audit trail: any eval result or production trace can point at the precise wording that produced it, which is the whole reason the domain treats prompts without versioning as an anti-pattern.ai_model_prompted_via_prompt_version
Type-specific fields on BaseNode
version_numberstringSemantic version
templatestringTemplate body with variable placeholders
system_promptstringSystem prompt prepended to every call
variablesstring[]Expected template variable names
temperaturenumberSampling temperature (0 = deterministic, 1 = creative)
max_tokensnumberMax tokens to generate
input_token_estimatenumberEstimated input tokens per invocation
performance_scorenumberAggregate quality score from evaluations
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
4 phases — initial: drafted
2 edge types connected to this entity.
ai_model_prompted_via_prompt_versionprompt_version_evolves_prompt_template