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.
1.Versioning
- The model version is pinned explicitly. No alias that tracks whatever the provider released last.
- The prompt is in version control beside the code that sends it, and carries a version id.
- The retrieval index has a version, and that version is part of what is deployed.
- Changing any of the four is a deployment: reviewed, announced, and with the previous combination still deployable.
2.Evaluation
- An evaluation set of thirty to fifty cases exists, weighted towards the inputs that break things.
- It runs on every change to the prompt, the model or the retrieval, and reports rates rather than pass or fail.
- Deterministic checks are used wherever the task allows one — labels, schemas, arithmetic, citation existence.
- Any judge model is calibrated against human grades before it is trusted, and pinned like any other model.
- A held-back portion of the set is looked at only before a release, so tuning cannot quietly consume it.
3.Tracing
- Every call records the prompt version, the rendered prompt, and the model and its version.
- Every call records the retrieved chunk ids and every tool callthe model asking code to runA model response that, instead of text, names one of the functions you described to it and supplies arguments; your code runs it and hands the result back. The arguments are untrusted input and are validated like any request body — a model that has read an injected instruction produces a well-formed, entirely wrong call.Full article →All terms with its arguments and its result.
- Every call records tokens in and out, latency, and the final answer as shown to the user.
- Every answer shown to a user carries a trace id that the interface can hand back.
4.Guardrails
- The response is validated against a schema before any code acts on it.
- Citations are checked for existence and for actually supporting the claim before the answer is shown.
- There is a defined behaviour for when the provider is unavailable, rate-limited or slow.
- Timeouts and retries with backoffwaiting longer between retriesWaiting before retrying a failed call, and waiting longer after each failure — for example 1, 2, 4 and 8 seconds — usually with a random jitter added so that many clients do not retry at the same moment. Without it, retries arrive exactly when the struggling service can least afford them.All terms are on every call, and batch traffic cannot starve the interactive path.
5.Dashboards from week one
- Tokens per request, because prompts grow silently and this line becomes the invoice.
- Latency at the ninety-fifth percentile, since output length dominates it and the tail is what users feel.
- The refusal and fallback rate, which climbs before anything else does when a prompt or a model shifts.
- The rate of answers rejected by your own guardrails — the closest thing to a real-time quality signal.
6.The improvement loop
- Feedback from users carries the trace id, so a rating opens directly onto what caused it.
- Somebody reviews the week’s negative ratings and classifies each one: retrieval, prompt, model, or fine.
- Real failures are promoted into the evaluation set, so it gets more valuable as the system gets more used.
- 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.
| Practice | Normal service | LLM feature |
|---|---|---|
| Correctness check | Assert 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 unit | A build of your code. | Code plus prompt version, model version and index version — behaviour changes if any one moves. |
| Cause of a regression | Something in the diff. Bisect until you find it. | Possibly nothing you changed — the provider updated the model underneath you. |
| What a log line tells you | A 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 request | Roughly fixed, and small enough to ignore per call. | Varies by an order of magnitude with input size, and is worth logging on every call. |
| Rollback | Redeploy 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.
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 idempotentsafe to repeatAn operation that has the same effect whether it runs once or five times. It is what makes a retry safe — and since any network call may be retried without you knowing, the alternative is charging a card twice.All terms 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.
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.
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.
| Lever | What it does | What it costs to adopt |
|---|---|---|
| Shorten the input | Usually 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 cache | A 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 difficulty | The 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 for | Reindexing, 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.
| Case | What happened | The line that covers it |
|---|---|---|
| Bard launch demo, Feb 2023 | The 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 2023 | A 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 2023 | A 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 2025 | An 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 2025 | An 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
The failures this page learns from
the cases: a demo, an incident, drift, a rollback and an invented policy- ArticleGoogle’s AI chatbot Bard makes factual error in first demo (opens in a new tab)The Verge · Feb 8, 2023
- PostmortemMarch 20 ChatGPT outage: Here’s what happened (opens in a new tab)OpenAI · Mar 24, 2023
- PostmortemSycophancy in GPT-4o: What happened and what we’re doing about it (opens in a new tab)OpenAI · Apr 29, 2025
- PostmortemExpanding on what we missed with sycophancy (opens in a new tab)OpenAI · May 2025
- ArticleCompany apologizes after AI support agent invents policy that causes user uproar (opens in a new tab)Ars Technica · Apr 2025
Research
drift between snapshots, and model-graded scoringResearched 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.