Core content
Part 1: What changes in production, and the release manifest
LLMOps keeps the MLOps skeleton (version, evaluate, deploy, monitor) but changes what you control, what can move, and what can break. Agent operations add actions in live systems on top.
| Dimension | Classical MLOps | LLMOps and agent operations |
|---|---|---|
| Primary artifact you control | Trained model weights | A prompt, a config, and a tool list, usually over a model you didn't train |
| Output determinism | Deterministic given input | Non-deterministic: same input, different output |
| Source of behavior change | You retrain | The provider updates the model silently; the retrieval corpus shifts; someone edits a prompt or a tool |
| Evaluation | Accuracy or F1 on a fixed test set | Rubric scoring, groundedness, exact match where possible, and task completion for agents |
| Cost model | Training cost, mostly one-time | Per-token inference, recurring, scaling with traffic and with agent loops |
| Worst production failure | A wrong prediction | A wrong action in a live system, or a runaway loop that burns budget |
In LLMOps the model is a dependency, not an asset. Treat it like an upstream package that can break you on its release schedule, not yours, and that can go offline for a day.
Make every result reproducible. "It works on my machine" becomes "it worked at 2:00 p.m. on Tuesday with prompt v7, model provider-model-2026-04, retrieval k=5, tool list v3, and this corpus snapshot." If you can't reconstruct that configuration, you can't reproduce a result, debug a regression, or answer an auditor.
LLMOps PIPELINE (reproducible)
┌──────────┐ ┌──────────────┐ ┌───────────┐ ┌────────────┐ ┌──────────────┐
│ Inputs │──▶│ Versioned │──▶│ Eval │──▶│ Promote │──▶│ Production │
│ (cases) │ │ release │ │ gate │ │ staging→ │ │ + traces + │
│ │ │ manifest │ │ (gate 3.3)│ │ prod │ │ caps + switch│
└──────────┘ └──────────────┘ └─────┬─────┘ └────────────┘ └──────┬───────┘
▲ (prompt+model+tools+ │ FAIL → block DRIFT │ ALERT
│ retrieval+data+context) ▼ ▼
└────────────────────────── regression report ◀───── monitoring / rollback
Version all six inputs that determine behavior. Versioning the model alone is like version-controlling one file in a repo. Assessment Q3.2 asks that prompts, models, retrieval settings, agent tool definitions, and specifications be versioned and peer-reviewed by policy.
| Behavior input | What to version | Where it lives |
|---|---|---|
| Prompts | System and user templates, few-shot examples, output schema | Repo (/prompts), semantic versions |
| Model and parameters | Provider, dated model ID, temperature, max tokens, seed | Release manifest |
| Retrieval settings | Embedding model and version, chunking, k, reranker, filters | Release manifest |
| Agent tool definitions | Tool list, scopes, argument schemas, which actions need approval | Repo (/tools), reviewed like code |
| Data snapshot | Corpus or dataset hash and snapshot ID | Object store plus manifest |
| Injected context | Structured context the system adds (user attributes, tool outputs) | Schema-versioned |
Bundle them into one release manifest, so a deploy is one reviewable artifact:
# release: support-agent v12 (PR #482, reviewed by @owner)
prompt: prompts/support_agent.v7.md # sha256: a91f...
model: provider-a/model-2026-04-01 # pinned, NOT "latest"
params: { temperature: 0.2, max_tokens: 800, seed: 42 }
retrieval:
embedder: text-embed-3@2026-02 # pin the embedder too
chunking: recursive-512-overlap-64
k: 5
data_snapshot: kb-2026-11-20T00:00Z # corpus snapshot id
agent:
tools: tools/support_agent.v3.yaml # tool list + scopes, reviewed
autonomy: supervised automation # a person approves each refund
spend_cap: { per_run_usd: 0.50, per_day_usd: 40 }
kill_switch: flags/support_agent.enabled # owner and on-call can flip it
fallback: provider-b/model-2026-03 | manual_queue # tested, eval'd
eval_gate: evals/support_agent_suite.yaml # must pass to promote
owner: jane.doe@company.com # named owner (Q3.5)
Separate staging from production (Q3.1). Run two environments with two corpora, two sets of keys, and two dashboards. Nothing reaches production without passing the evaluation gate and a promotion step. At growth stage, the single change that most reduces incidents is not letting people edit production prompts or tool lists live.
You don't need an MLOps platform to start. A prompts/ folder, a tools/ folder, a release.yaml per system, and a CI job that diffs and gates the manifest will get a growth-stage team to a score of 3 (Defined) on Q3.2 in a week. Buy the platform when the manifests multiply.
The embedding-model version is the most-forgotten item on this list. Re-embedding the corpus with a new embedder while querying with the old one silently wrecks retrieval relevance. Pin it, re-embed deliberately, and rerun evaluations afterward.
Do and don't
- Do pin the model to a dated version where the provider offers one; use the
latestalias only in a sandbox. - Do treat a new tool or a widened tool scope as a release, with a PR and an evaluation run.
- Don't edit a production prompt in a vendor console with no diff, review, or version tag. It is the top source of silent regressions IIIBC sees in the field.
Part 2: Evaluation suites as a release gate (gate 3.3)
A domain evaluation suite is the regression test for probabilistic software, and gate 3.3 makes it mandatory for Stage 4. Vendor benchmarks tell you a model is generally capable. They tell you nothing about whether your support agent answers your refund question correctly, cites your policy, and calls the refund tool only within its limit.
What gate 3.3 asks for. Score 3 (Defined) needs domain evaluation suites and regression tests defined for each AI system. Score 4 needs every prompt, model, or agent change to pass the suite before release, with agent-written code passing an independent reviewer. Score 5 needs suites that grow from production failures and a quarterly review.
An evaluation suite has three layers:
- Golden set: 50–300 real, labeled cases drawn from production queries, known-hard edge cases, and past incidents. Each case has an input and an expected behavior.
- Scorers matched to the case type:
- Exact, regex, or contains: cheap and deterministic. Use them wherever the answer is structured.
- Groundedness: does the answer stay within the retrieved context? This catches retrieval hallucination.
- Model-graded rubric: for open-ended quality. Always use a written rubric and a stronger grading model.
- Agent task cases: did the agent finish the task, call the right tool with the right arguments, stay inside its scope, and stop or escalate when it should?
- Negative cases: must-refuse, must-escalate, and injection attempts (ties to Module 8).
- Regression gate: a threshold per metric that blocks promotion in CI when a change drops quality, plus a cost ceiling per agent run.
EVALUATION SUITE = REGRESSION TEST FOR PROBABILISTIC SOFTWARE
golden cases ──▶ run candidate release ──▶ score ──┬─ thresholds met? ─ YES ─▶ promote
▲ (answers + agent runs) └──────────────────── NO ─▶ block + per-case diff
│
grows from production traces; every incident becomes a permanent case
Do and don't
- Do turn every production incident into a permanent golden case; the suite should grow the way a unit-test suite does.
- Do report per-case results, so you see which cases a change broke, not just an aggregate.
- Do keep a small held-out set you never tune against, or your prompts will overfit to the suite.
- Do include at least one case where the agent must stop and hand off to a person.
- Don't promote on "looks better to me." That is unfalsifiable and unreviewable.
- Don't rely on one aggregate score; a 2 percent average gain can hide a 30 percent regression on your highest-value case class.
If you wouldn't merge code without tests, don't promote a prompt, model, or tool change without evaluations. Same bar, same gate, same CI.
"Our model scores 88 percent on [public benchmark]." That says nothing about your domain. Leave it out of every promotion decision.
Part 3: Build verification infrastructure before you scale AI code generation
Build the net first, then scale code generation. In IIIBC's field experience, teams that reversed the order made the most expensive mistake of 2026: they pointed agents at the codebase, multiplied output, planned to "add tests later," and shipped defects faster than they could catch them.
The trap, in numbers. IIIBC's field synthesis, using the theory of constraints, puts coding at roughly 30–40 percent of engineering effort; review, testing, incident response, and design take the other 60–70 percent (directional). Make the coding share ten times faster without expanding verification, and the overall gain caps at about two to three times. Meanwhile, AI-written pull requests show 1.75 times more logic errors and about 1.6 times more security findings than human ones (CodeRabbit, 470 pull requests, December 2025; a vendor study).
SCALE CODEGEN FIRST (the expensive mistake) VERIFY FIRST (IIIBC stance)
┌────────────┐ ┌────────────┐
│ 10x output │ ─▶ fast WRONG code ─▶ review │ verify │ ─▶ tests, evals,
│ via agents │ queue overflows │ infra │ validators, gates
└────────────┘ ─▶ defects ship ─▶ incidents └────────────┘ ─▶ THEN scale codegen
─▶ rework eats the gains ─▶ gains actually compound
Verification infrastructure is the net you build first:
- Automated tests with enforced coverage gates on the paths agents will touch.
- Evaluation suites (Part 2) for any AI-generated behavior, not just AI-generated code.
- Validators: schema validation, type checks, and contract tests on outputs, plus static analysis and security scanning in CI. AI-written authentication, cryptography, and input-handling code is untrusted until scanned (Module 6).
- A multi-agent chain, not one trusted agent (Module 5): planner, implementer, and an independent reviewer agent, plus a human gate on the diff.
- CI that blocks the merge if any of the above fails.
Sequence it. First stand up the tests, the evaluation gate, the scanners, and the reviewer agent. Then turn up agent throughput. Verification capacity is the constraint that sets how fast you can safely generate.
"We'll backfill tests after we ship faster" is how teams build up agent tech debt at machine speed. The backfill never happens; the incidents do.
Part 4: End-to-end traces, hallucination, and drift monitoring
Uptime and latency dashboards can't tell you whether an agent did the right thing. A model can be up, fast, and cheap, and still confidently wrong, or an agent can complete a task by calling a tool it should never have touched. Assessment Q3.4 asks for a monitoring standard that covers prompts, responses, tool calls, latency, and cost, including multi-step agent traces.
Capture these for every request and every agent run:
| Capture | Why |
|---|---|
| Prompt (template ID and resolved text), input variables | Reproduce and debug; tie to the release version |
| Retrieved context (document IDs, scores) | Diagnose groundedness failures |
| Each tool call: tool, arguments, scope used, result | See what the agent did, not just what it said |
| Approvals: who approved which action, and when | Prove the human review rule held (Q5.4) |
| Response and token counts (in and out) | Quality review and cost attribution |
| Model ID, parameters, release version | Pin which config produced this |
| Latency (p50, p95, p99) and cost per step and per run | Service levels and spend-cap enforcement |
| Span tree for multi-step runs | See where a chain went wrong |
| Outcome: completed, escalated, failed, or stopped | Measure task success, not just activity |
AGENT RUN TRACE (read it top-down to find the failure)
run 7f3a release v12 owner jane.doe autonomy: supervised automation
├▶ [planner] decompose: "refund duplicate charge" 420ms $0.004
├▶ [retrieve] k=5 scores 0.81..0.43 90ms $0.000 ◀ weak grounding
├▶ [tool: billing.lookup] acct=…812 OK 60ms
├▶ [tool: billing.refund] amount=$49 → APPROVAL REQUESTED
│ approved by: support.lead@… at 14:02
└▶ [writer] reply cites policy doc not retrieved 1.2s $0.011 ◀ HALLUCINATION
total 1.9s $0.015 outcome: completed eval verdict: FAIL (groundedness)
── auto-logged as a golden-case candidate
Log every action, and alert on the unusual ones. In October 2026, WorkOS disclosed an incident in which an outside AI agent pulled CRM data for five days before anyone noticed (WorkOS security bulletin, October 30, 2026). Action-level logs with an alert on unusual tool calls or volumes turn five days into minutes. Module 8 covers the access controls; this module makes the actions visible.
Normal monitoring misses two failure classes:
- Hallucination and quality loss (Q6.3). Fluent wrong answers pass uptime checks. Monitor them with groundedness scoring on a sample of live traffic, citation-coverage checks, and user-feedback and escalation rates. Alert on a drop, not just an outage.
- Model and data drift, including silent provider updates (Q6.4).
- Provider-side drift: the endpoint name is stable, but the model changed. Run your golden suite on a schedule (nightly or canary) against the production config, and alert when scores move with no deploy on your side.
- Data drift: your inputs or corpus shifted (a new product, a new customer segment, stale documents). Monitor input topics and retrieval-score distributions over time.
A scheduled evaluation run against production, with no code change on your side, is the only reliable tripwire for a provider silently swapping the model. Make it a cron job, alert on score changes, and you'll know before your customers do.
If your only AI alerts are error rate and latency, you are blind to every failure that matters for an LLM or an agent. Add at least one quality signal, one drift tripwire, and one alert on unusual tool calls before you call a system "monitored."
Part 5: Cost controls, plus a spend cap and kill switch per agent
Every agent needs a spend cap and a kill switch before it runs without per-action approval. Agents loop, retry, and call other models, so one bad run can cost more than a day of normal traffic. Gate 5.5 asks for a kill switch for each agent; Q3.6 scores 4 only when spend caps apply per team and per agent, with alerts.
Start with the four cost levers. OWASP LLM10, Unbounded Consumption, makes cost a security issue: uncontrolled inference is both a budget risk and a denial-of-wallet attack surface.
| Control | What it does | Maps to |
|---|---|---|
| Rate limiting | Caps requests per second per user, key, or tenant | LLM10: blocks denial-of-wallet |
| Quotas | Hard token or cost ceilings per user, feature, or day, with alerts at 50%, 80%, and 100% | LLM10: budget enforcement |
| Caching | Reuses responses and embeddings; uses provider prompt caching | LLM10 and margin protection |
| Model routing | Sends bulk work to a cheap model and planning to an expensive one | Cost specialization |
Then cap each agent. Set a per-run cap and a per-day cap in the manifest (Part 1). When an agent hits its cap, it stops, records "stopped: spend cap" as the outcome, and alerts its owner. It never silently switches to a cheaper model mid-task, and it never raises its own limit.
Then give each agent a kill switch. A kill switch stops one agent's actions within minutes, without a deploy. A real one has five properties:
- One switch per agent, not one for "all AI"; you must be able to stop the broken agent and keep the rest running.
- Acts at the tool and credential layer, not just the user interface: in-flight tool calls stop, queued actions are dropped, and the agent's credentials are suspended.
- Can be flipped by the owner and by on-call, named in Module 10's procedure, without an engineering ticket.
- Falls back to a manual path, so the work queues for people instead of disappearing.
- Is tested every quarter in an agent drill, with the time to stop recorded.
KILL SWITCH: WHERE IT MUST ACT
flag flipped ─┬─▶ orchestrator: stop new runs, cancel in-flight runs
├─▶ tool gateway: deny every call from agent id "support-agent"
├─▶ credentials: suspend the agent's token (short-lived by design)
└─▶ work queue: route pending tasks to the manual queue + alert owner
record: who flipped it, when, time to stop, actions that completed after the flip
A switch that only hides the feature in the interface while a background worker keeps calling tools is not a kill switch. Test it against a running agent, not an idle one.
Plan token spend on IIIBC's cost curve. IIIBC's field synthesis finds that monthly AI cost per engineer rises roughly a thousandfold from assisted coding to full autonomy. The figures are directional, for planning only.
| Level | Mode | Monthly AI cost per engineer (directional) | What it means |
|---|---|---|---|
| L1–L2 | AI-assisted (autocomplete, chat) | ~$20 | Tool adoption; little process change |
| L3 | Spec-centric (AI implements to spec) | ~$200 | Verification-first redesign begins |
| L4 | Agentic (chained plan, implement, review) | ~$2,000 | Cost shifts from headcount to compute |
| L5 | Full autonomy (agents own delivery) | ~$20,000 | Capital-versus-operating mix changes planning |
Model specialization is a core skill. Use expensive reasoning models for planning and cheaper models for bulk implementation. Model routing is usually the most effective single cost control:
request ─▶ [router] classify task (illustrative split)
├─ simple/bulk ─▶ cheap-fast model most volume, small share of cost
├─ reasoning ─▶ expensive model small volume, large share of cost
└─ retrieval Q&A ─▶ mid model + RAG + cache cache hit ⇒ near-zero cost
Part 6: Rollback, ownership, and provider-outage fallback
Three controls decide how fast you recover: a rollback you have practiced, an owner who can decide, and a fallback for when the provider itself is down.
Rollback (Q3.5). Because behavior lives in a versioned manifest (Part 1), rollback means re-pinning the previous manifest and redeploying. It takes minutes because nothing about the change was untracked.
ROLLBACK PATH: alert (eval / quality / cost / action) ─▶ owner decides ─▶ re-pin manifest v(n-1)
─▶ redeploy (minutes) ─▶ suite green ─▶ post-incident note ─▶ new golden case
One named owner per system and per agent. Every production AI system and every agent has one named owner, recorded in the manifest and the AI inventory (Module 10). The owner is accountable for evaluations, monitoring, cost, the rollback decision, and the kill switch. Accountability stays human: an agent can draft, execute, and review, but it can't own an outcome.
Provider-outage fallback (Q6.9). On November 12–13, 2026, a Microsoft 365 outage took down Copilot and the Graph-based agents built on it. Every team that depended on one provider with no fallback lost those workflows for the duration. Decide the fallback before the outage, per critical AI system:
| Fallback pattern | Use when | Cost of getting it wrong |
|---|---|---|
| Second model provider behind your gateway | The task tolerates a different model | Untested fallback models fail quietly; run your suite against them first |
| Degraded mode (cached answers, retrieval-only search, read-only agent) | Partial service beats none | Users must see that the service is degraded |
| Manual queue | Actions are consequential, or no model passes the suite | Staff need a runbook and the capacity to absorb the queue |
| Stop and notify | The feature is optional | Customers expect a clear status message |
A fallback model you haven't run through your evaluation suite is a second outage waiting to happen. Assessment Q6.9 scores 4 when fallbacks have been tested and 5 when failure drills run at least twice a year. Module 10 records one named fallback for every AI provider the business depends on.
Practice the rollback, the kill switch, and the fallback before you need them. A control you've never rehearsed is a hope. The lab makes you do all three once.