To run an LLM application in production, wrap it in a lifecycle: a model gateway in front of every provider, prompts and settings under version control, an evaluation set with thresholds agreed before release, staged rollouts with rollback, and monitoring of quality, cost, latency and safety. This lifecycle is what people mean by LLMOps. The model is the easy part. The lifecycle around it is what lets you change things on a Tuesday afternoon without holding your breath.
What changes when an LLM feature leaves the demo?#
The demo answered one question: can this work? Production asks a harder one: will it keep working while everything around it changes?
And everything does change. Providers release new model versions and retire old ones. Someone improves a prompt to fix one complaint and quietly breaks three other answers. The documents behind a retrieval index grow, get reorganized or go stale. Usage climbs, and so does the token bill. None of this shows up in a demo, because a demo runs once, on questions the builder already knew would go well.
In production you need to answer four things at any moment:
- Which setup produced this answer? The model, the prompt version, the retrieval settings.
- Is quality holding? Measured against the same cases every time, not judged by feel.
- What does it cost to run? Per request, and per task that actually succeeded.
- What happens when it goes wrong? Who is alerted, and how fast you can roll back.
If you cannot answer those today, you do not have a production system yet. You have a demo with users. That is fixable, and the fix is mostly engineering discipline, not more AI. (If you are still choosing what to build, start with our practical guide to generative and agentic AI.)
What does the production lifecycle look like?#
Think of it as a loop. Every change, whether a new model, a reworded prompt or a re-indexed document set, goes through the same path before users see it, and what you learn in production feeds the next change.
Figure 1
Here is what each part does, and what goes wrong without it.
| Component | What it does | Without it |
|---|---|---|
| Model gateway | Routes requests to providers, applies rate limits, validates input, enforces policy, records usage | Provider calls scattered through the code; switching models means a rewrite |
| Prompt and configuration versioning | Stores prompts, model parameters and retrieval settings as versioned artifacts | Nobody knows which prompt produced last week’s bad answer |
| Evaluation set and regression tests | Scores every change against representative cases and known failures | Changes ship on gut feeling; regressions reach users first |
| Release controls | Staged rollout, approvals and a tested rollback path | A bad change hits every user at once, with no quick way back |
| Monitoring and tracing | Tracks quality, token cost, latency, errors and safety events, and traces each request | Problems surface as customer complaints and surprise invoices |
Why put a model gateway in front of the models?#
Because your application should not care which provider answers. A model gateway is a thin layer that every model call passes through. It handles routing, rate limits, request validation, policy controls and usage monitoring in one place, instead of in every corner of the codebase.
That one decision pays off three ways. You can route simple requests to a smaller, cheaper model and hard ones to a stronger model. You can switch or add a provider without touching application code. And you get one place to see usage and cost, which becomes very useful the first time someone asks why the bill doubled.
Pro tip: put the gateway in early, even if you only use one model. It costs little on day one and saves a painful refactor on day ninety. If you are still picking that first model, our guide on how to choose an LLM for a business use case (publishing soon) walks through the comparison.
How do you version prompts and configuration?#
Treat them like code, because they behave like code. A prompt is logic written in English. Change one sentence and the behavior of the whole feature can shift.
Version the prompt templates, the model name and parameters, the retrieval settings (chunking, the embedding model, how many passages are retrieved, reranking) and any output schema. Each production response should carry a reference to the exact versions that produced it. When a user reports a strange answer, you can reproduce it instead of guessing.
The embedding model deserves special mention. If you change it, every document has to be re-embedded and the index rebuilt, and retrieval quality can move in either direction. Version it, and evaluate before and after.
How do you know a change made things better?#
You measure, against the same cases, every time. That is the job of an evaluation set: representative questions and tasks, plus the failure cases you never want to see again, each with what a good result looks like.
What you score depends on the application. For a retrieval assistant, that usually means answer correctness and groundedness, retrieval precision and recall, citation accuracy, refusal behavior for disallowed requests, resistance to prompt injection and unauthorized disclosure, latency, and cost per successful task. Agree the thresholds before release, then let the numbers decide. What prompt injection is, and how to defend against it (publishing soon) covers the hostile cases worth adding to the set.
We cover the practical steps in how to build an evaluation set for an AI assistant (publishing soon). The short version: start small, with real questions from real users, and grow the set every time production teaches you something.
How do you release changes without surprising users?#
Gate, stage and keep a way back. A change that passes evaluation goes to a slice of traffic or a group of internal users first. You watch the same quality, cost and error signals, then widen the release. If something degrades, you roll back to the previous version of the model, prompt or retrieval configuration, which is easy because all of them are versioned.
Release approvals matter more than they sound. Someone accountable should sign off on changes that affect what customers see, the same way they would for any other release.
What should you monitor once it is live?#
Four families of signals, each with an owner and an alert threshold:
- Quality: sampled evaluation on live traffic, user feedback, human acceptance and escalation rates.
- Cost: token consumption, cost per request and cost per successful task, by feature and by customer where it matters. Our post on how LLM costs form in a SaaS product (publishing soon) goes deeper.
- Latency and reliability: response times, throughput, timeouts, provider errors and retries.
- Safety: policy violations, blocked requests, prompt-injection attempts and disclosure checks.
Tracing ties it together. When an answer goes wrong, a trace shows the request, what was retrieved, which prompt version ran, what the model returned and what the application did with it. Debugging without traces is archaeology.
A team has an AI assistant in production and wants to switch model provider, but has no way to tell whether the change makes answers better or worse.
We would build an evaluation set from representative questions, run both models against it behind a gateway, release the winner to a small group first, and monitor quality, latency and cost before widening it.
How much of this do you need on day one?#
Less than you might fear. The controls should match the risk. An internal summarization tool used by a handful of colleagues needs versioned prompts, a small evaluation set and basic cost and error monitoring. An assistant that answers your customers, or touches sensitive data, needs the full loop, including staged releases, safety testing and someone on call. Deciding which is which is a governance question, and AI governance in practice shows how to classify the risk first.
What you should not do is skip the foundations and plan to add them later. Retrofitting versioning and evaluation onto a live system with unhappy users is slower and more stressful than starting with a lightweight version of each. And if your pilot never made it this far, why AI pilots stall before production (publishing soon) explains the usual reasons.
How does Nexstella approach it?#
We start by taking stock: which models, prompts, datasets and services you run, how each one is released today, and where quality or cost is not measured. Then we put the moving parts under version control, build the evaluation set and regression checks from your real cases, set up the gateway with staged rollout and rollback, and add monitoring of quality, latency, cost and safety.
We hold the result to production standards: reliability, security, maintainability, observability and operating cost, not just a good demo. Where the engagement includes ongoing support, we keep running quality reviews as models, prompts and your business needs change. You can see how that runs from start to finish in what taking an AI assistant to production looks like (publishing soon), and the full service is on our MLOps and LLMOps page, with the wider MLOps, LLMOps and AI platform engineering capability behind it.
What should you do next?#
Work through it in this order:
- Write down what the application must do well, and what it must never do. That becomes the seed of your evaluation set.
- Find out which setup is running today: the model, the prompt and the retrieval settings. If nobody can say, versioning comes first.
- Measure one baseline: quality on a few dozen real cases, plus cost and latency. You cannot improve what you have not measured.
- Add the gateway and a staged release path before the next model or prompt change.
If you would rather think it through with an engineer, start with a free conversation. Tell us what your application does and where it hurts, and we will tell you plainly which of these steps matter most for you, and which can wait.