Architecture · Operations
LLMOps: Evaluation, Guardrails And Monitoring For AI In Production
The short answer
LLMOps is the practice of running language-model systems reliably. Before release, changes are scored against evaluation sets built from real cases. In production, guardrails check inputs and outputs, uncertain or risky results go to people, and every request is traced for quality, latency and cost. Prompts and models are versioned and released behind evaluation gates, so regressions are caught before users see them.
By Maitreya Kulkarni · Updated · 10 min read
01 · The architecture
Where Do Evaluation And Guardrails Sit In An AI System?
On both sides of the model and around the release process. Input guardrails screen requests, output guardrails validate responses, risky or low-confidence results go to a review queue, traces record everything, and offline evaluations gate every change before it reaches production.
NX-AR-08 · Architecture
A guarded, observable AI system
- Outside world
- Data & integration
- AI agent
- Your people
- System of record
- L1
Traffic
(Outside world)User requests
. Hands work to: Input guardrails.
Passes down: requests - L2
Input checks
(Data & integration)Input guardrails
PII, injection, scope
. Hands work to: Model and tools.
Passes down: screened requests - L3
Model
(AI agent)Model and tools
Versioned prompts
. Hands work to: Output guardrails.
Passes down: raw outputs - L4
Output checks
(Data & integration)Output guardrails
Schema, grounding, safety
. Hands work to: Response, Review queue.
Passes down: validated outputs - L5
Delivery
(Your people)Response
To the user
. Hands work to: Traces and metrics.Review queue
Flagged or uncertain
. Hands work to: Traces and metrics, Offline evaluations.
Passes down: outcomes - L6
Observe
(System of record)Traces and metrics
Quality, latency, cost
Offline evaluations
Gate every release
. Hands work to: Model and tools.
02 · Evaluation
How Do You Evaluate An LLM Application?
With a test set built from real inputs and the outputs you need, scored automatically on every change and checked by people where automatic scores are weak. The test set grows every time production finds a new failure.
| Metric | What it measures | How it's scored |
|---|---|---|
| Task accuracy | What it measuresRight answer or extraction | How it's scoredExact match, field-level comparison |
| Faithfulness | What it measuresClaims supported by sources | How it's scoredModel-graded against context |
| Tool-call accuracy | What it measuresRight tool, right arguments | How it's scoredCompared with expected calls |
| Helpfulness and tone | What it measuresQuality as a person sees it | How it's scoredCalibrated LLM judge plus human sampling |
| Latency (p95) | What it measuresSpeed users feel | How it's scoredTraces |
| Cost per task | What it measuresEconomics | How it's scoredToken and tool usage |
03 · Guardrails
What Are AI Guardrails?
Checks that run outside the model, before and after it acts. They catch what instructions alone cannot: injected commands, personal data, malformed outputs, unsupported claims and actions beyond what a request is allowed to do.
Input guardrails
Redact personal data, detect prompt injection, keep requests within the system's scope.
Output guardrails
Validate against a schema, check claims against sources, run safety classifiers.
Action guardrails
Tool permissions, limits enforced in code, and approvals for consequential actions.
Fail safe
When a check fails, the system declines or escalates rather than guessing.
04 · Monitoring
What Should You Monitor In Production?
Quality, safety, speed and cost, per feature and over time. Models and data drift, providers update models, and users find new ways to break things, so production behaviour has to be watched, not assumed.
Traces
Every prompt, tool call, result and score, following OpenTelemetry's generative AI conventions where possible.
Quality sampling
A sample of live outputs scored automatically and by people each week.
Cost and latency
Spend and response times per feature, tenant and model, with alerts.
Drift
Shifts in input types, refusal rates or scores that signal something changed.
05 · Releases
How Do You Ship Changes To An AI System Safely?
Like any other code, with one more gate. Prompts, models and retrieval settings are versioned; every change runs the evaluation suite in CI; new versions go to a small share of traffic first; and rollback is one switch.
Version everything
Prompts, model versions, retrieval settings and tool schemas live in source control.
Evaluation gates
A change that lowers scores on the test set does not merge.
Canary releases
A small share of traffic tries the new version before everyone does.
Instant rollback
The previous version stays deployable at all times.
The ecosystem
OpenAI
Claude
Sentry
PostHog
GitHub Actions
Python


