Skip to content
Tech Interview Prep
Technical interview guide

LLMOps: Deployment, Versioning & Cost Management

Safely shipping changes to prompts, models, and RAG configuration in production, and keeping the resulting system's cost under control.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: SLSA 1.2, OCI Image Spec, OpenFeature specification, Google SRE release/canary guidance, FinOps Framework, Model Cards, Datasheets, PagedAttention, GPTQ, NIST GenAI, and OWASP Supply Chain references reviewed 2026-09-04.

Overview

Curated: · Written: · Reviewed:

LLMOps: Deployment, Versioning & Cost Management

In one line

Release an LLM product as one pinned, content-addressed manifest (exact model revision, rendered prompt, retrieval config, tool schemas, decoding, agent graph), promote it behind gates, canary it against a pinned control, and roll back by repointing an alias. Reach for this whenever a change can alter behavior, which for an LLM product includes almost every change.

Key definitions

  • Release manifest: the immutable record of every behavior-changing component, referenced by digest. Promotion moves a pointer to it.
  • Pinned revision: an exact provider or model-repo revision, never an alias such as gpt-4o or latest.
  • Compatibility matrix: checks that a component loads and also means the same thing (tokenizer, chat template, embedding space, dtype, context length).
  • Non-compensable gate: a critical gate whose failure blocks promotion regardless of gains elsewhere.
  • Sticky canary: a server-side traffic split assigned per user, compared against a pinned control cohort.
  • Expand-migrate-contract: a three-phase schema change so old and new code can both read and write the same state.

Formulas and complexity

Chance that a per-request defect fires at least once in n independent requests, with per-request rate p:

P=1−(1−p)nP = 1-(1-p)^n

Canary example (hypothetical arithmetic): 800 rps peak at 5% is 40 rps, over 20 minutes that is 48,000 requests. At p = 1/50,000, P = 1 - (1 - 2e-5)^48000, about 1 - e^(-0.96), roughly 0.62. A 20-minute canary at 5% does not reliably surface a 1-in-50,000 defect.

Session split with a 10% canary and 3 requests per session, where a session is served by both arms:

P=1−(0.9)3−(0.1)3=0.27P = 1-(0.9)^3-(0.1)^3 = 0.27

How it works

  1. Every behavior-changing component is versioned and referenced by digest in one manifest.
  2. The artifact is built once. CI runs static, deterministic, offline golden-set and budget gates on the packaged artifact, not on a laptop.
  3. Promotion repoints the production alias to an already tested digest. Production never rebuilds.
  4. The canary splits traffic sticky by user and compares latency, cost per success and quality against the pinned control.
  5. Rollback repoints the alias to the previous manifest, which needs no re-evaluation. In-flight state needs idempotent tools and expand-migrate-contract schema changes.
all critical gates pass any critical gate fails predeclared ramp criteria met abort criteria hit Build artifact and manifest digest CI gates: static, deterministic, golden set, budget Promote alias to digest Block promotion Sticky canary vs pinned control Ramp to 100% Repoint alias to previous digest

When to use and when not to

SituationUse the full gated releaseTrade-off that decides it
Prompt or tool-schema changeYesA renamed field silently breaks dispatch and tuned behavior
Model revision bumpYes, with compatibility matrixA later revision can behave differently under the same name
Shadow copy that writes or chargesNo, unless side effects are isolatedShadowing a side-effecting path double-acts on users
Self-hosted inference at low volumeWeigh cost firstFixed GPU cost dominates below roughly 10^7 tokens/day, workload-dependent
Provider API with pinned revisionYesPinning is only as good as the revisions the provider lets you pin

Traps interviewers probe

  1. Versioning components separately. A prompt tuned on index v3 with top-k 10 misbehaves on v4 with top-k 8 even with identical prompt text. Fix: promote one manifest.
  2. Treating a valid signature or checksum as safety. Those prove identity, not behavior. Fix: require a provenance chain tied to a reviewed source commit, then run behavioral gates. A correct builder identity does not prove the source was safe.
  3. Mutable tags in the build. FROM node:20-alpine can change between builds, so two environments run different bytes from the same commit. Fix: pin base images by digest and promote the digest that staging validated.
  4. Adapters loaded against a different base revision. The load reports no key or shape errors, yet quality drops. Fix: pin the base revision the adapter was trained on and check it in the compatibility matrix.
  5. Caches keyed without release identity. A cache keyed on prompt hash or model ID alone serves stale answers after a prompt or index change, which is a silent rollback. Fix: key on manifest ID, tenant, and index checksum.

Interview tips

Open with the unit: "I'd deploy one manifest, not a prompt edit: pinned model revision, rendered prompt, retrieval config, tool schemas, decoding and agent graph, identified by digest."

Expect these follow-ups:

  • Canary accuracy fine, p99 tripled: check context growth, cache misses, throttling, and capacity the canary itself consumes.
  • Provider retires a model on 30 days' notice: qualified fallback release through the same gates, then per-cohort migration.
  • Rollback after three external API calls: idempotent operations and compensation logic, because rollback covers state, not just routing.
  • Metrics dropped Tuesday: compare like with like, since pricing, evaluator, or traffic-mix changes can mimic a release effect.
  • Cheap model for some requests: a measured quality-per-dollar curve per task class, with its own eval evidence.

30-second outline:

  1. One manifest, referenced by digest, built once and promoted without rebuilding.
  2. Gates on quality, safety, latency and cost, with critical safety gates non-compensable.
  3. Sticky canary against a pinned control, with abort criteria declared before launch.
  4. Rollback by alias repoint, with state handled by idempotent tools and expand-migrate-contract.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.