Versioning, Registries and Evaluation-Driven Development

If you cannot say exactly what ran, you cannot say why it changed, or put it back.

BeginnerIntermediateExpert · 12 min read · Last updated:

In short

Give every behavior-changing part a version, and combine them in a release manifest that identifies the whole agent. Keep releases and their evidence in a registry, record experiments so that results can be repeated and let a fixed set of evaluation cases drive each change: write the case, see it fail, change one thing and confirm nothing else broke.

What you will learn: what to version and how, how to build a manifest, what registries and experiment tracking are for, how to practice evaluation-driven development and how to wire it into a pipeline.
Prerequisites: LLMOps, AgentOps and Maturity and Agent Evaluation Framework.

Versions used

The example runs in November 2026 with Python 3.13 and only the standard library. The model and tool names in it are invented.

Beginner What to version

The question versioning answers

A user reports that yesterday's answers were better. To investigate, you need to know exactly what ran yesterday and what runs today. "The same code" is not enough: someone may have edited a prompt, the provider may serve a newer model under the same alias, a tool's description may have changed or the document index may have been rebuilt.

PartVersion it byCommon trap
CodeCommit identifier and image digestUncommitted local changes
PromptsFile history or registry versionText assembled at run time from untracked pieces
ModelExact model identifier and settingsMoving aliases
ToolsSchema and description version, service versionThe service changing behind a stable schema
WorkflowGraph or workflow definition versionOld runs resuming on new logic
KnowledgeIndex build identifier and source snapshotContinuous updates with no marker
Policy and limitsConfiguration versionConsole edits
EvaluationDataset and grader versionsComparing scores from different test sets

Hosted models are a special case: you can record which model you asked for, but you do not control the service that runs it. Record the identifier returned in the response where one is provided, and monitor behavior on fixed cases.

Prompts as managed artifacts

Store prompts as files or registry entries with named variables, review changes like code and keep a short note saying why each change was made. Separate stable instructions from inserted data so that reviewers can see what actually differs.

A prompt registry gives people a place to find, compare and reuse prompts. MLflow's prompt registry, for example, versions, tracks and reuses prompts, and supports aliases such as staging or production that point to a chosen version. An alias makes switching easy, so protect who may move it and log every move. See Prompt Testing, Versioning and Optimization.

The release manifest

A manifest is one small file that pins every part. Its fingerprint becomes the release identifier. Two releases with the same parts get the same identifier, and any difference produces a new one.

Partsversioned pieces
Manifestexact choices
Identifierfingerprint
Tracesevery run tagged
"""One manifest pins everything that changes behavior. Compare two releases."""
import hashlib
import json


def digest(value):
    blob = json.dumps(value, sort_keys=True).encode()
    return hashlib.sha256(blob).hexdigest()[:10]


def release(**parts):
    pinned = {name: parts[name] for name in sorted(parts)}
    return {"id": digest(pinned), "parts": pinned}


def diff(old, new):
    names = sorted(set(old["parts"]) | set(new["parts"]))
    return [(n, old["parts"].get(n), new["parts"].get(n)) for n in names
            if old["parts"].get(n) != new["parts"].get(n)]


SUITES = {   # which tests a change to each part requires
    "model": {"full", "safety", "cost"},
    "prompt": {"regression", "safety"},
    "tools": {"regression", "contract", "safety"},
    "index": {"retrieval"},
    "code": {"unit", "regression"},
}


def required_tests(changes):
    return sorted(set().union(*(SUITES.get(n, {"full"}) for n, _, _ in changes)))


if __name__ == "__main__":
    old = release(code="a41f", model="model-x-2026-08", prompt="support@12",
                  tools="orders@3", index="kb-2026-11-01")
    new = release(code="a41f", model="model-x-2026-08", prompt="support@13",
                  tools="orders@4", index="kb-2026-11-01")
    print("old release", old["id"])
    print("new release", new["id"])
    changes = diff(old, new)
    for name, before, after in changes:
        print(f"  {name}: {before} -> {after}")
    print("run:", ", ".join(required_tests(changes)))
    print("same parts, same id:", release(**old["parts"])["id"] == old["id"])

Output:

old release c92d3bc4be
new release 3f871eb666
  prompt: support@12 -> support@13
  tools: orders@3 -> orders@4
run: contract, regression, safety
same parts, same id: True

The comparison shows that only the prompt and the tool schema changed, and it selects the matching tests. An unknown kind of change falls back to the full set, which is the safe default. The mapping here is a teaching example: in practice a prompt edit can affect cost or retrieval behavior too, so run the full set before any production release and use the targeted selection only for quick feedback.

A manifest identifies configuration, not outcomes. The same release can still answer differently on two runs, and outside services can change underneath it.

Naming versions so people understand them

A fingerprint is precise and unreadable. Add a human-friendly name and a note about impact. A simple convention borrowed from software interfaces works well:

Level of changeMeaning for an agentTypical check
MajorNew scope, tool, permission or model familyFull evaluation and risk approval
MinorBehavior improvement within the same scopeFull regression and canary
PatchSmall correction believed not to change behavior elsewhereRegression and safety sets

The label states an intention; the evaluation tests whether it was true. A "patch" to a prompt that shifts tool selection was not a patch, and the results should say so.

Work already in progress

Long tasks may outlive several releases. Store the release identifier with each task and decide a rule: finish on the starting version, which is predictable, or move to the new version at a defined step, which needs a tested conversion of saved state. Keep old versions available until their tasks finish or expire, and set a maximum task age so that this period ends (Workflow Versioning, Testing and Resilience).

Intermediate Registries and experiments

Model and agent registries

A registry is the system of record for things that may be deployed. A model registry holds trained or fine-tuned models with their versions and status. An agent registry holds agents and their releases.

Field in an agent release recordWhy keep it
Name, purpose, ownerSomeone is accountable
Manifest and identifierExact reproduction
Tools and permissionsAccess review
Evaluation results with dataset versionEvidence for the decision
Risk level and approvalsProportionate control
Status: candidate, approved, live, retiredDeployment can refuse unapproved releases
Dependencies and their end datesEarly warning of retirements
Rollback targetFast recovery

The registry earns its keep when deployment reads from it. If releases can bypass it, it becomes a stale spreadsheet. Governance views of the same records are covered in Agent Inventory, Policy-as-Code and Release Gates.

Discovery registries for tools and for other agents serve a related purpose: finding what exists. Being listed is not approval, so verify the publisher and permissions before connecting (MCP Gateways, Catalogs and Governance).

Experiment tracking

An experiment compares options under controlled conditions. Record enough that a colleague could repeat it:

  • The question and the expected effect, written before running.
  • Manifest of the baseline and of each variant.
  • Dataset version, number of repeats and grader versions.
  • Success, safety, cost and latency results, per case as well as in total.
  • Date, since hosted services drift.
  • The decision and the reason, including negative results.

Keeping negative results saves the next person from repeating a failed idea. Keeping per-case results shows whether an average gain hides new failures: five cases fixed and three broken is a different story from two cases fixed and none broken.

Avoid fooling yourself

TrapGuard
Tuning until the test set passesKeep a held-out set used rarely
Picking the best of many triesReport all variants and confirm the winner on fresh cases
Changing several things at onceChange one, or record that effects cannot be separated
Grader drifting between runsPin the grader and check it against human labels
Too few casesShow uncertainty and add cases where decisions matter
Expert Evaluation-driven development

Evaluation-driven development

Test-driven development writes a test before the code. Evaluation-driven development does the same for behavior that is variable and partly a matter of judgment.

1. Collecta real failure or a required behavior
2. Definewhat passing means and how to check it
3. Confirmthe current release fails it
4. Changeone prompt, tool or limit
5. Compareall cases against the baseline
6. Keepthe case stays in the suite

Step 3 matters. A case that already passes does not test your change, and sometimes reveals that the reported problem was something else.

A worked sequence

Suppose, as an illustration, a support agent promises refunds it cannot grant. You write six cases: clear eligibility, clear ineligibility, a missing order, a customer who insists, a policy exception needing approval and a message containing fake instructions. The check inspects actions taken and key claims, not exact wording. The current release fails two. A first prompt edit fixes both but now refuses a valid refund. A better fix moves the eligibility rule into the refund tool, which returns the reason for refusal. All six pass, and the rule no longer depends on the model remembering it.

That is a frequent outcome: evaluation shows that the right fix belongs in code or permissions, not in wording (Action Guardrails and Policy Engines).

Organizing the suite

SetSize and useGate
SmokeA handful, on every changeAll pass
SafetyMust-never behaviorsAll pass on every repeat
RegressionPast failures and core tasksNo meaningful drop from baseline
RepresentativeSampled to match real trafficTarget success, cost and time
Held outRarely usedConfirms that gains generalize

Give each case an identifier, an origin, an owner and the reason it exists. Review cases when policy changes; an outdated expectation silently pushes the agent toward wrong behavior. Remove or mask personal data when turning real conversations into cases.

Wiring it into the pipeline

  1. The change updates the manifest.
  2. The pipeline selects quick tests from what changed and runs them.
  3. Before release, the full suite runs against the candidate and the baseline.
  4. Results are stored with the release record.
  5. A gate blocks safety failures and meaningful regressions, and shows the cases.
  6. After a canary, observed failures become new cases.

CI/CD, Infrastructure as Code and Safe Releases covers the release side and Continuous Evaluation, Statistics and Scorecards the statistics. Budget for evaluation: repeated agent runs cost money and time. Run cheap checks often, cache fixed grader inputs only where that cannot hide a change and measure how long a developer waits for an answer. A suite that takes hours will be skipped.

Version the graders too

Graders decide what counts as success, so a grader change can move every score. Prefer checks written in code for facts such as a record's final state, required fields and forbidden calls. Use a model as judge only for qualities that code cannot test, give it a precise rubric, pin its version and compare its verdicts with human labels on a sample. When a grader changes, rescore the baseline with the new grader before comparing anything (LLM Judges, Human Review and Ratings).

Report which cases failed and why, with a link to the trace. A single score tells a developer that something is wrong and nothing about what to do next.

Reproducing an old run

Full reproduction of a hosted model run is often impossible, so aim for a useful level. With the manifest, the stored inputs, the recorded tool results and retrieved documents you can replay the orchestration and see what the model was given. Recorded results let you test code changes without calling real systems. Decide how long to keep these records, protect them as sensitive data and delete them on schedule (Safe Logging, Sampling and Retention).

Versioning evaluation data

A dataset changes as cases are added, corrected and retired. Give each published version an identifier and keep old versions readable, so that an earlier result can still be explained. Record for every case where it came from, who approved the expected outcome and which policy it reflects. When a policy changes, update the affected cases in the same change as the agent, and note that scores before and after are not directly comparable.

Separate the data by use. Cases used to develop a prompt should not be the ones that certify it. If you fine-tune a model, keep training, validation and test data apart and check that near-duplicates do not cross between them. Guard access to held-out cases, including from coding agents that can read the repository: a system that can see the expected answers can be tuned to them without anyone intending it (Agent Benchmarks and Datasets).

Common mistakes

MistakeBetter approach
Versioning code but not promptsPin everything in a manifest
Using a moving model alias in productionPin a version and upgrade deliberately
Registry updated by hand after releaseDeploy from the registry
Recording only averagesKeep per-case results
Writing tests after the fixSee the case fail first
Letting the suite go staleGive cases owners and review dates

Checklist

  • All behavior-changing parts have versions.
  • A manifest identifier appears on every trace.
  • Releases and evidence are in a registry that deployment uses.
  • Experiments record baseline, data, grader, results and decision.
  • A held-out set exists and is used sparingly.
  • Safety cases must pass on every repeat.
  • Production failures regularly become cases.

Frequently asked questions

Where should prompts live, in code or a registry?

Code keeps them tied to tested releases, while a registry eases collaboration; either works if versions are recorded and changes are gated.

How many evaluation cases are enough to start?

Twenty or so varied real cases reveal large problems; add more where decisions carry risk or differences are small.

Do we need a model registry if we only use hosted models?

You still need a record of which model versions each release uses, their retirement dates and the evidence for choosing them.

Should a failing case ever be removed?

Remove it only when the expectation is wrong or obsolete, with a recorded reason and the owner's agreement.

References and further reading

Next steps