Skip to content
Duoduo Mediaevidence to decision

Package 24 · Section 10.3

MLOps Versioning Testing and Reproducible Delivery

Change the system without losing the ability to reproduce, compare or roll back decisions.

Track
G · Safety, governance and production delivery
Level
Advanced
Version
v1.0
Status
In validation · catalog only
Explanation depthDepth

Learning objectives

  • Version datasets, indexes, prompts, models, policies and code.
  • Create unit, integration, evaluation and safety tests.
  • Use shadow, canary and rollback releases.

In brief

An AI system is code, data, prompts, indexes, models and evaluations. Reproducible delivery versions all of them, tests them automatically and promotes changes only when release gates pass.

Core concepts

24.1What to version

Version source code, prompts, configurations, datasets, evaluation sets, index builds, model identifiers and evaluator versions. A run record links them all.

Treat prompt changes like code changes: reviewed, tested and released.

24.2Testing layers

Unit tests check parsers, filters and validators. Contract tests check tool and API schemas. Evaluation tests run the locked set against thresholds. Regression tests replay past incidents.

Non-determinism needs tolerances, repeated runs and fixed seeds where possible.

24.3Release and rollback

Promote through environments with gates at each step. Use shadow or canary releases to compare new and old configurations on live traffic.

Rollback must be one action and must restore prompts, indexes and model versions together.

Worked example

A prompt change that broke citations

Situation: A copywriting tweak to the system prompt reduced citation correctness from 0.95 to 0.88.

  1. 1CI runs evaluation tests on every prompt pull request.
  2. 2Gate fails on citation correctness threshold 0.93.
  3. 3Diff shows the instruction "cite each claim" was shortened.
  4. 4Restore instruction; gate passes; merge.

Outcome: The regression never reached users because the prompt lived in version control with evaluation gates.

Decision rules

  • Nothing reaches production without a run record linking all versions.
  • Prompts and configs go through review and CI like code.
  • Every incident adds a regression test.
  • Rollback restores all coupled artifacts at once.

Common pitfalls

  • Editing prompts directly in production.
  • Rebuilding indexes without recording their configuration.
  • Rolling back code but not the index or model version.

Key vocabulary

Run record
A record linking every version and setting that produced a result.
Canary release
Sending a small share of traffic to a new version before full rollout.
Shadow mode
Running a new version on live inputs without showing its outputs.
Evaluation gate
An automated threshold check blocking release on failure.

Tutorial outline

  1. 24.1Experiment tracking and lineage.
  2. 24.2Golden tests, property tests, contract tests and regression suites.
  3. 24.3Deployment artifacts, feature flags, change approval and reproducibility bundles.

Required artifacts

Version manifest, test results, comparison report, release decision and rollback package.

Evaluation evidence

Reproduction, test coverage, regression detection, change isolation and rollback time.