DevelopmentSenior

LLMOps

LLMOps is the practice of running a feature built on a language model in production, where the same input does not reliably produce the same output. It exists because everything that makes software releasable — a test that fails, a diff that explains a change, a rollback that restores yesterday — assumes that it does. The page opens with the twenty-four-line production checklist, then covers what each practice is replaced by, why the deployed unit is four things rather than one, evaluation as the test suite, what a trace has to contain, how cost and latency behave under real traffic, and five documented incidents.

Release gate
Eval set, not assertions
Deployed unit
Code, prompt, model, index
Watch daily
Tokens, latency, refusals

The production checklist

Here is the whole checklist first, because it is what a readiness review needs and because almost none of it is expensive if it is done before launch. It is numbered so a line can be cited: "we do not have 3.4" is a ticket, where "observability needs work" is a mood. Groups 1 and 3 are the ones to do first — without a pinned model an evaluation set is measuring something that can change between two runs, and without a trace id a complaint is an anecdote.

Because the same request can produce different text twice, an LLM feature cannot be gated by assertions. What replaces them is an evaluation set: a fixed collection of hard inputs with a way to judge each output, run on every change to the prompt, the model or the index, and reported as rates rather than pass or fail. The set is grown from production — every complaint and surprising answer becomes a case — and a change goes to a share of traffic before all of it, against pinned prompt and model versions so a rollback has somewhere to return to. Tokens per request, tail latency, refusals and guardrail rejections are watched throughout.
  1. 1.Versioning

    1. The model version is pinned explicitly. No alias that tracks whatever the provider released last.
    2. The prompt is in version control beside the code that sends it, and carries a version id.
    3. The retrieval index has a version, and that version is part of what is deployed.
    4. Changing any of the four is a deployment: reviewed, announced, and with the previous combination still deployable.
  2. 2.Evaluation

    1. An evaluation set of thirty to fifty cases exists, weighted towards the inputs that break things.
    2. It runs on every change to the prompt, the model or the retrieval, and reports rates rather than pass or fail.
    3. Deterministic checks are used wherever the task allows one — labels, schemas, arithmetic, citation existence.
    4. Any judge model is calibrated against human grades before it is trusted, and pinned like any other model.
    5. A held-back portion of the set is looked at only before a release, so tuning cannot quietly consume it.
  3. 3.Tracing

    1. Every call records the prompt version, the rendered prompt, and the model and its version.
    2. Every call records the retrieved chunk ids and every with its arguments and its result.
    3. Every call records tokens in and out, latency, and the final answer as shown to the user.
    4. Every answer shown to a user carries a trace id that the interface can hand back.
  4. 4.Guardrails

    1. The response is validated against a schema before any code acts on it.
    2. Citations are checked for existence and for actually supporting the claim before the answer is shown.
    3. There is a defined behaviour for when the provider is unavailable, rate-limited or slow.
    4. Timeouts and retries with are on every call, and batch traffic cannot starve the interactive path.
  5. 5.Dashboards from week one

    1. Tokens per request, because prompts grow silently and this line becomes the invoice.
    2. Latency at the ninety-fifth percentile, since output length dominates it and the tail is what users feel.
    3. The refusal and fallback rate, which climbs before anything else does when a prompt or a model shifts.
    4. The rate of answers rejected by your own guardrails — the closest thing to a real-time quality signal.
  6. 6.The improvement loop

    1. Feedback from users carries the trace id, so a rating opens directly onto what caused it.
    2. Somebody reviews the week’s negative ratings and classifies each one: retrieval, prompt, model, or fine.
    3. Real failures are promoted into the evaluation set, so it gets more valuable as the system gets more used.
    4. One named person owns the quality number and has the authority to block a release on it.

What actually changes

A normal service is verified by assertion: send this, expect that, and a difference is a bug. An LLM feature cannot be verified that way, because the same request legitimately produces different text on two consecutive calls. Every practice that rests on exact comparison therefore has to be replaced rather than adapted — and the teams that skip this step do not notice, because their pipeline stays green while quality drifts underneath it.

PracticeNormal serviceLLM feature
Correctness checkAssert the exact output. A difference means a defect.Score a set of cases and compare rates. One case failing is noise; the rate moving is a signal.
The deployable unitA build of your code.Code plus prompt version, model version and index version — behaviour changes if any one moves.
Cause of a regressionSomething in the diff. Bisect until you find it.Possibly nothing you changed — the provider updated the model underneath you.
What a log line tells youA 500 is the failure. A 200 is a success.The interesting failure returned 200 and said something false, so the status code carries no information.
Cost per requestRoughly fixed, and small enough to ignore per call.Varies by an order of magnitude with input size, and is worth logging on every call.
RollbackRedeploy the previous build.Only works if the prompt and the model are pinned — an unpinned model has no previous version to return to.

The deployed unit is four things

Everything else on this page rests on this section, which is why checklist group 1 comes first. Four things decide how the feature behaves and only one of them is in your build. The prompt can be edited in a console. The index can be rebuilt by a nightly job. And the model can be upgraded by the provider, under an alias that always points at the latest release — a dependency that upgrades itself in production, with no diff, no review and no previous version to return to. It is the one arrangement no other part of your stack would tolerate for a week.

Four things decide how an LLM feature behaves and only one of them is in your build. The prompt can be edited in a console, the index can be rebuilt by a nightly job, and the model can be upgraded by the provider under an alias that always points at the latest release — a dependency that upgrades itself in production with no diff, no review and no previous version to return to. Pinning the model version and treating a change of pin as a deployment is what makes the other practices work: the upgrade then happens on a day you chose, with the evaluation run before it and the old pin still deployable behind you. A rollback that restores the code and leaves the model floating restores nothing you can name.

Two capabilities make the rest of the checklist practical and are worth building in the first week. A way to change the prompt version without a code deploy, so a bad prompt is a thirty-second fix rather than a release — with the version still recorded and reviewable, which is the difference between this and editing in a console. And an way to rebuild the retrieval index, so an index problem is repaired by rerunning a job rather than by restoring a backup. Both sound like conveniences until the first incident, at which point they are the difference between minutes and an afternoon.

Evaluation is the test suite

An evaluation set is a fixed collection of inputs with a way to judge each output, run on every change to the prompt, the model or the retrieval, and reported as rates rather than pass or fail. Thirty to fifty cases is a real starting point — the value is not in coverage but in the cases being the ones that actually go wrong. Grow it from production: every complaint, every incident and every surprising answer becomes a case, which turns the set into an asset that gets more valuable exactly as the system gets more used.

Judging cheaply matters more than judging perfectly, so use the strongest check the task allows before reaching for a model. A label can be compared exactly. A schema can be validated. A cited passage can be checked for existence in the source and for actually containing the claim. A number in the answer can be recomputed. These deterministic checks are fast, free and unambiguous, and they cover more of a real evaluation set than teams expect — often the majority of it.

Deterministic checks

  • Free, instant, and give the same verdict every run.
  • Cover labels, schemas, required fields, arithmetic and citation existence.
  • A failure points at something specific you can go and fix.
  • Say nothing about whether the answer is any good to read.

A model as judge

  • Scores open text against written criteria, where no exact answer exists.
  • Costs a call per case and drifts when the judge model changes, so pin it too.
  • Rewards fluent, confident formatting and is largely blind to a calmly stated wrong fact.
  • Trustworthy for comparing two versions, not for certifying one as correct.
Before a judge model is trusted with anything, have people grade fifty answers, run the judge on the same fifty, and look at where the two disagree. The diagonal is agreement and is not interesting; the off-diagonal cells are, and they fail in opposite directions. The judge waves through a false claim stated calmly in a well-formatted answer, and marks down a correct answer that reads bluntly. Both are the same underlying bias: a judge grades what it can see, and fluency is visible while a wrong number is not. If the two agree often enough you have a cheap instrument for comparing two prompt versions; if they do not, you have learned that your criteria are ambiguous, which is worth knowing anyway. Either way it is not a gate that certifies a release.

Calibrate any judge before relying on it — checklist line 2.4, and the diagram above is the procedure. Have people grade fifty answers, run the judge on the same fifty, and look at where the two disagree. If they agree often enough, you have a cheap instrument you can run on every change. If they do not, you have learned that the criteria are ambiguous — which is worth knowing anyway, because an ambiguous criterion is also a prompt the team cannot agree on.

What production needs to record

A single log line saying the request succeeded is useless here, because the interesting failure is a call that returned two hundred and said something wrong. What you need is a trace of the whole interaction: the prompt version and the rendered prompt, the model and its version, the retrieved chunk ids, the raw response, every tool call with its arguments and result, token counts in and out, latency, and the final answer. That record is what turns "the assistant told a customer something incorrect on Tuesday" from an unanswerable complaint into a reproducible case.

A log line saying the request succeeded is exactly the information that cannot help here, because the interesting failure returned two hundred and said something false. What a complaint needs is a trace of the whole interaction: the prompt version and the rendered prompt, the model and its version, the retrieved chunk ids, every tool call with its arguments and result, token counts in and out, latency, and the final answer. That record turns “the assistant told a customer something incorrect on Tuesday” from an unanswerable complaint into a case somebody can open. The trace id is what makes it reachable — a thumbs-down button that does not carry it produces a table of opinions with nothing attached, and the review ritual that should follow has nothing to review.

One caution that belongs beside that list, because the trace is now the most sensitive store you have: it contains, by construction, every document that was retrieved and every question a user asked. Apply the retention policy, the access control and the redaction rules you would apply to any other copy of that material, decide how long a trace lives before the answer to "can we reproduce a complaint from March" becomes no, and make sure the people who need to review negatives can reach it without being handed the whole corpus.

Cost and latency under real traffic

Cost control has four levers and they are worth pulling in order, because the first two are nearly free and the last two are architecture. The table is the order.

LeverWhat it doesWhat it costs to adopt
Shorten the inputUsually where the tokens are: trimmed history, fewer retrieved chunks, examples that earn their place.An evaluation set to prove the trim did not cost quality. Nothing else.
Arrange for the cacheA stable prefix billed at a fraction of the input price. Often the largest single saving on a busy feature.Reordering the prompt once, and never putting a timestamp above the cache boundary again.
Route by difficultyThe easy majority goes to a small fast model; the capable one is kept for the cases that need it.A router, two sets of evaluation results, and a clear rule for where the line sits.
Batch what nobody waits forReindexing, backfills and bulk classification, priced well below interactive calls.A queue, a separate key or quota, and accepting a slower turnaround.

Latency needs one thing said plainly, because it catches teams who treat the model like a database. Time to the first token is roughly fixed and everything after it is proportional to how much the model writes, so a slow response is almost always a long one and no amount of infrastructure tuning will change that. Stream the answer, ask for shorter output when you want lower latency, and watch the ninety-fifth percentile rather than the mean — the mean is dominated by the short answers nobody was waiting for.

Five incidents, and which line would have caught each

These are operations failures rather than model failures, which is why they belong here rather than on the fundamentals page. In each one the model did something unremarkable and the surrounding system had no way to notice, no way to reproduce it, or no way to get back.

CaseWhat happenedThe line that covers it
Bard launch demo, Feb 2023The answer used in the launch advertisement contained a factual error about the James Webb Space Telescope. It was spotted publicly within a day, and Alphabet’s share price fell sharply.4.2. A checkable claim in a published answer is a release artefact, and nothing checked it.
ChatGPT cache incident, Mar 2023A bug in a client library caused some users to see other users’ conversation titles, and exposed partial payment details for a small number of subscribers. OpenAI published an incident report four days later.Not a model failure at all. Most LLM incidents live in the surrounding system, which still needs ordinary engineering.
Reported GPT-4 drift, July 2023A study comparing March and June snapshots reported large behaviour swings, including one task falling from 97.6% to 2.4%. The methodology was contested and much of the drop was formatting rather than reasoning.1.1, and the weak reading is enough: if you cannot tell whether the model changed, you are not running an experiment.
Sycophancy rollback, April 2025An update made a widely used model markedly more agreeable — validating whatever the user said. It was rolled back, and the published post-mortem noted that offline evaluations and A/B tests looked fine while expert testers had said something felt wrong.2.1 and 2.5. An evaluation set measures what it contains; nothing in it was asking whether the model agreed too easily.
Cursor support bot, April 2025An AI support agent told users that logins were limited to one device per subscription. No such policy existed. Users cancelled before the company clarified that the answer had come from a front-line AI bot.6.2 and 6.4. Nobody was reading what the assistant said in the company’s name until customers were already leaving.

Where it degrades

The honest limit of everything on this page is that it measures what somebody thought to put in the set. An evaluation suite is a sample of the world, assembled by people who have already decided what matters, and a system can drift in a direction nobody wrote a case for while every number stays green. That is not an argument against measuring — it is the argument for keeping a person in the loop who is allowed to say that something feels wrong and be taken seriously.

  • An unpinned model alias, which upgrades itself in production with no diff and no rollback.
  • Prompts edited in a console, so the deployed text is not in version control and cannot be reviewed.
  • Logging only that the call succeeded, leaving a wrong answer with nothing to reproduce it from.
  • An evaluation set built from cases that already pass, which reports a high score and detects nothing.
  • A judge model used as the sole release gate, rewarding confident formatting over correctness.
  • Tuning the prompt against the same cases you measure with, until the score means nothing.
  • A trace store nobody applied a retention or access policy to, holding every document and question in the product.
  • A feedback button whose data nobody routes anywhere, and a quality number nobody owns.
  • Treating a green dashboard as permission to stop listening to the people who use the feature daily.

When to use it

Use it when

  • From the first LLM feature that reaches real users, since the practices are cheap to start and expensive to retrofit.
  • Whenever a prompt, a model or an index can change without a code deploy, which is exactly when versioning starts to matter.
  • Where a wrong answer has consequences a customer will report, and somebody must be able to reproduce it.
  • Once volume makes cost a real line item and routing, caching and batching start paying for themselves.

Avoid it when

  • Building a full evaluation platform before you have a feature and a handful of real failures to put in it.
  • An internal experiment nobody depends on, where the sensible amount of process is a pinned model and a log.
  • Adding a specialised vendor tool before you know which of tokens, latency or quality is actually your problem.
  • Model-graded evaluation on tasks with an exact right answer, where a deterministic check is cheaper and more honest.

Sources and method

What this page stands on

  • 7 sources
  • 4 documented failures
  • Checked October 13, 2026

Researched with Claude. Finding and cross-checking the primary sources was done with Claude (Anthropic). Selection, writing and fact-checking: the Anatomy of IT Product editors.

Found this useful?

Share it with someone who is working on the same problem.