CORE GUIDE

PATTERNINTERMEDIATE6 min read

Versioned dependencies and change boundaries

AI behavior depends on models, prompts, tools, schemas and retrieval sources that change independently, so production systems need explicit version boundaries.

Mental model

A reproducible AI outcome is a function of a versioned stack: model and provider behavior, application code, prompts, tool contracts, retrieval corpus, policies and runtime configuration.

Why it matters

A product can regress even when application code is unchanged. Providers update models, schemas evolve, knowledge sources are replaced and prompts are edited. Without version identifiers in traces and release evidence, teams cannot tell which dependency changed or reproduce the behavior that users saw.

01

Make changing inputs identifiable and testable

Assign stable versions or content hashes to prompts, model configurations, tool schemas, retrieval indexes and policy artifacts. Record those identifiers in traces and evaluation runs. When upgrading a dependency, run targeted compatibility and regression checks before broad rollout, and retain a fallback path when rollback is operationally possible.

02

Example: a schema update breaks tool calls

A tool provider changes an enum and a model update starts selecting the new value. Old application code rejects it, but the incident trace only says 'tool validation failed'. With model, schema and application versions attached, the team can reproduce the exact combination and decide whether to patch, pin or roll back.

Common failure modes

  • Recording only application commit SHA while external AI dependencies change independently.
  • Updating prompts or retrieval data without a reviewable version boundary.
  • Rolling forward multiple dependencies at once and losing attribution.

Engineering heuristics

  • Attach version identifiers to every dependency that can materially change behavior.
  • Change one major boundary at a time when practical and run regression evidence.
  • Design rollback or fallback before a high-risk dependency upgrade.

Takeaways

  1. 01Reproducibility requires more than code versioning.
  2. 02Version metadata turns incidents into attributable changes.
  3. 03Dependency upgrades should pass the same evidence discipline as code releases.