Early-bird price on the GenAI & Agentic AI Engineer Bootcamp batch. Grab a seat →

LLMOps is the set of practices for running applications built on large language models (LLMs) in production: versioning prompts and models, testing output with evaluations, tracing every model call, controlling cost per request, and coping with provider limits and outages. Most of the tooling comes from DevOps and MLOps, but the thing you operate behaves differently. The same input can produce a different output, the part that changes most often is a paragraph of English, and your main dependency is a paid API that someone else can change or retire.

Key takeaways

  • Treat the prompt, the model identifier and the request settings as one versioned unit. A change to any of them is a release.
  • Unit tests still matter, but they cannot tell you whether an answer is good. You need an evaluation set that runs in CI and blocks a release when scores drop.
  • Trace every model and tool call with token counts, model name, prompt version and latency. Keep prompt and response text out of telemetry unless you have decided to capture it.
  • Cost is a per-request number you can measure and alert on. Caching, batch APIs, routing and shorter context all reduce it, and each one trades something away.
  • Rate limits, overload errors and model retirement dates are normal operating conditions. Design for them from the start.

What is LLMOps, and how does it differ from DevOps and MLOps?

DevOps assumes deterministic code: the same commit with the same input gives the same result, so a passing test suite is good evidence. Classic MLOps (operating models you train yourself) adds data pipelines, training runs and drift monitoring, but you own the model weights and a fixed model gives a fixed prediction.

LLMOps usually removes the training step and adds a different set of problems. You call a hosted model you did not train, you steer it with text, and you pay per token (a token is a chunk of text, roughly a word fragment, that the model reads or writes).

QuestionOrdinary softwareClassic MLOpsLLMOps
What changes most often?CodeTraining data and weightsPrompts, context and model choice
Same input, same output?YesYes, for a fixed modelNot guaranteed
How is quality tested?Unit and integration testsHeld-out metrics such as accuracy or F1Evaluation sets with code checks and LLM judges
What is the unit of cost?Compute timeTraining runs and inference hardwareTokens per request
Who controls the model?Not applicableYouUsually the provider
What does failure look like?An exceptionAccuracy drifting downA fluent wrong answer with HTTP 200

If you host an open-weight model yourself, you do both jobs: the MLOps work of serving a model and the LLMOps work described here.

What actually changes when you operate an LLM application?

Output is not deterministic

You cannot assume you can switch the randomness off. Anthropic's deprecations page, for example, lists the sampling parameters temperature, top_p and top_k as removed in API version 2026-10-21: sending them returns a 400 error, and the documentation tells you to guide behaviour through the prompt instead. Tests therefore have to check properties of an answer (valid JSON, contains the order number, does not promise a refund) instead of comparing it with an exact string.

Two things have versions: the prompt and the model

A prompt edit can change behaviour as much as a code change, and a model change can alter behaviour without a single line of your repository changing. Providers also retire models. Anthropic describes four lifecycle states (active, legacy, deprecated, retired), says it gives at least 60 days' notice before retiring a publicly released model, and states that requests to a retired model fail (the Messages API returns a 404 not_found_error). Cloud platforms that resell models can set their own dates. A retirement date is a deadline for re-running your evaluations on a replacement. The guide to prompt versioning covers how to keep prompt text, model identifier and test results together.

Evaluation sits beside unit tests

An evaluation (often shortened to "eval") is a set of example inputs with a way to score the outputs. Some scoring is ordinary code. Some needs a second model acting as a judge with a written rubric. The eval result, not the reviewer's impression of three sample chats, decides whether a prompt or model change ships. See LLM evaluation in CI for a working pipeline.

Every request has a price

Each call is billed by input and output tokens, so a longer system prompt or a chatty answer changes your bill the same day it is deployed. Token counts even depend on the model: Anthropic notes that Claude 4.7 and later models use a newer tokenizer that produces roughly 30 per cent more tokens for the same text than earlier models. Cost has to be a measured, per-request metric.

The provider is part of your system

Hosted models have rate limits. Anthropic measures them in requests per minute, input tokens per minute and output tokens per minute for each model class, uses a token bucket algorithm (capacity refills continuously instead of resetting at fixed intervals), and returns HTTP 429 with a retry-after header when you exceed one. A separate 529 overloaded_error means the API itself is temporarily overloaded. Other providers differ in detail, but every hosted API has some version of these two conditions.

What does an LLM application look like in production?

A stack of six layers that a production LLM request passes through, from the gateway at the top to telemetry at the bottom.

The model call is one layer among several. In front of it you need somewhere to enforce your own limits and budgets. Around it you need prompt assembly from versioned templates, validation of the output before it reaches a user or another system, and telemetry on every step. If the application is an agent that calls tools, each tool call is another place where things fail, cost money and need a permission check. The article on guardrails for AI agents covers that side.

How do you handle rate limits and outages?

Start with what the SDK already does. Anthropic's Python SDK retries a failed request up to two times by default, waits as long as a retry-after header says, and otherwise uses exponential backoff. You change the count with max_retries on the client. Beyond retries, decide what happens when the primary model stays unavailable.

import anthropic

client = anthropic.Anthropic(max_retries=2)  # the SDK default, shown for clarity

PRIMARY = "claude-sonnet-5-5"
FALLBACK = "claude-haiku-5-5"

def ask(system, messages):
    for model in (PRIMARY, FALLBACK):
        try:
            return client.messages.create(
                model=model,
                max_tokens=1024,
                system=system,
                messages=messages,
            )
        except (anthropic.OverloadedError, anthropic.APITimeoutError):
            continue  # retries are exhausted; try the next model
    raise RuntimeError("No model available; show the user a clear error")

Three cautions apply.

  • A fallback model is a different model. It needs its own evaluation results, and your traces must record which model answered.
  • Not every 429 will clear. Anthropic documents that a 429 caused by reaching a monthly spend cap carries no retry-after header and keeps failing until access resumes, so cap your retries.
  • A sudden jump in traffic can itself be throttled. Anthropic describes "ramp limits" that return 429 after a sharp increase even when you are under your per-minute limits. Start bulk jobs slowly and spread requests evenly.

The honest limit of fallbacks is that a second model from the same provider does not protect you from a provider-wide incident. A second provider does, at the price of maintaining and evaluating prompts for two model families.

How do you observe an LLM application?

Uptime and HTTP status are not enough, because the typical failure is a confident wrong answer returned successfully. You need a trace for each request, with one span (a timed unit of work) for every model call and every tool call, carrying the model name, token counts, finish reason, latency and prompt version.

OpenTelemetry publishes semantic conventions for generative AI that name these attributes, for example gen_ai.request.model, gen_ai.usage.input_tokens and gen_ai.usage.output_tokens. As of November 2026 they are still marked "Development", they have moved into their own repository, and several names changed in its first standalone release that month. Prompt and response text are opt-in attributes because they are likely to contain personal data.

The cluster article on LLM observability and tracing has a checked instrumentation example, a list of what not to log, and the alerts worth setting up.

How do you keep cost under control?

Measure first: record input, output and cached token counts on every call and compute cost per request, per feature and per customer. Then apply the mechanisms in order of effort.

MechanismHow it savesWhat it trades away
Prompt cachingRepeated prompt prefixes are billed at a reduced rateCache writes can cost more than normal input; a changed prefix means a miss
Batch APIAsynchronous requests at a discountResults arrive within hours, not seconds
Model routingSimple requests go to a cheaper modelSome requests are misrouted; two models to evaluate
Shorter contextFewer input tokens on every callRemoving the wrong context lowers answer quality
Output limitsFewer output tokensAnswers can be cut off mid-sentence

Anthropic, OpenAI and Google each document a batch interface priced at half the standard rate, with results inside roughly 24 hours. That suits evaluations and backfills, not a chat window. The details, including how caching is billed and when it loses money, are in how to reduce LLM costs. For background on why context size drives the bill, see tokens and context windows.

How do you release a change safely?

A five-step loop: change a prompt or model, run evaluations, release, observe production, and add failures back to the test set.

A release in LLMOps follows a loop.

  1. Change. Edit a prompt file, a model identifier or a tool definition in a pull request. One kind of change per pull request, so a score movement has one cause.
  2. Evaluate. CI runs deterministic checks first, then LLM-judged checks, against a versioned test set. A threshold decides pass or fail.
  3. Release. Ship behind a version identifier that appears in every trace. Where you can, send a share of traffic to the new version first.
  4. Observe. Compare error rate, latency, token usage and quality signals by prompt version and model.
  5. Feed back. Turn production failures into new test cases. The test set should grow from real incidents, not only from what the team imagined in advance.

Rollback is the reverse of step 1: revert the commit and redeploy. It only works if the previous model is still available, which is one more reason to track retirement dates.

What does a minimum LLMOps setup look like?

A small team does not need a platform to start. This checklist covers the essentials.

  • Prompts live in the repository, in their own files, with the model identifier and settings beside them.
  • An evaluation set of real examples runs on every pull request that touches a prompt, model or tool.
  • Every model call emits a span with model, token counts, latency, finish reason and prompt version.
  • A dashboard shows cost per request and per feature, and an alert fires when it jumps.
  • Retries are bounded, and there is a defined behaviour when the model is unavailable.
  • Someone owns the list of model retirement dates for every model in use.
  • Prompt and response text are not logged by default, and there is a written rule for when they may be.

What is still unsettled?

Three things, at least.

  • Telemetry standards. The OpenTelemetry generative AI conventions are not stable, and names changed in November 2026. Pin the version your instrumentation emits and expect dashboard queries to need updates.
  • LLM judges. A judge model is itself non-deterministic and can be wrong. Its scores are useful for catching regressions, less so as an absolute measure of quality, and they need checking against human labels.
  • Provider features. Caching rules, minimum prompt sizes and discounts differ by provider and by model, and they change. Treat any number you read in an article, including this one, as something to confirm on the provider's page.

Common questions

Is LLMOps just MLOps with a new name?

No. MLOps is centred on training, data pipelines and model drift for models you own. LLMOps is centred on prompts, evaluations, token cost and dependence on a provider's API. If you fine-tune or self-host a model you need both.

Do I need a dedicated LLMOps platform?

Not to begin with. Git, your existing CI system, an OpenTelemetry-compatible tracing backend and a test set in the repository cover the essentials. A platform earns its place when several teams need shared prompt registries, human review queues or evaluation dashboards.

Who should own LLMOps in a team?

The team that owns the service in production, usually platform or DevOps engineers working with whoever writes the prompts. Splitting prompt authorship from operational ownership tends to leave nobody responsible for cost and regressions.

How is quality monitored after release?

By combining signals: deterministic checks on live output (did it parse, did it stay within length), user feedback where it exists, and a judged sample of real traffic scored with the same rubric as the CI evals. None of these alone is reliable.

Free download: The LLMOps field guide

Running LLM applications in production: tracing and alerts, cutting cost with caching and batching, evaluation gates in CI and versioning prompts like code. See what’s inside.

Prompt versioning: treating prompts like code

How to keep prompts in the repository, review them like code, tie each version to a model and its evaluation results, label traces, and roll back safely.