Most teams can ship an AI feature in a few weeks. Few can answer a harder question afterward: how do you actually know it works? Not "it looked right in the demo," but a repeatable way to measure accuracy, catch hallucinations before customers do, and know when a prompt change or model upgrade made things worse instead of better.
This is LLM evaluation and monitoring, and it is usually the part of an AI project that gets skipped under deadline pressure. That tends to go wrong quietly: the feature works fine in testing, then degrades in production as real user inputs, edge cases, and model updates accumulate. This article covers what evaluation actually means for LLM-based features, the core metrics and methods teams use, what changes once you are in production, and how to build this into a development process without turning it into its own full-time project.
Why "It Looks Good" Is Not an Evaluation Strategy
Traditional software testing checks whether code does what it is supposed to do, with deterministic pass or fail results. LLM outputs are not deterministic in the same way. The same prompt can produce different phrasing on different runs, a correct-sounding answer can be factually wrong, and a change that improves one type of query can quietly break another.
That makes manual spot-checking unreliable as the only safeguard. A handful of test prompts reviewed by an engineer before launch will not catch what happens when a user asks something oddly worded, uploads an unusual document, or hits the edge of what the retrieval system can find. Without a structured evaluation process, problems surface as support tickets, bad reviews, or in regulated industries, compliance findings, instead of as a dashboard metric your team catches first.
The business risk is concrete: wrong answers that erode user trust, hallucinated facts presented confidently, inconsistent behavior that makes a feature feel unreliable, and in healthcare, financial, or legal contexts, outputs that create real liability if nobody is checking them systematically.
Three Layers of Evaluation, Not One
Most mature LLM evaluation setups work across three layers, and treating only one of them as "the evaluation" is the most common gap:
- Offline evaluation against a golden dataset. A curated set of representative inputs with known-good (or known-acceptable) outputs, scored before anything ships. This is where you catch regressions before users see them.
- Regression testing in CI/CD. The same golden dataset, or a subset of it, run automatically whenever a prompt, model version, or retrieval configuration changes, so a "small tweak" cannot silently degrade quality without someone noticing.
- Online monitoring of live traffic. Sampling real production interactions, tracking metrics over time, and watching for drift as user behavior and inputs change in ways your original test set never anticipated.
Teams that only do the first layer tend to be surprised when a model provider's update changes behavior in production. Teams that only do the third layer tend to ship regressions they could have caught in minutes with an automated test run. The three layers answer different questions: is it good enough to ship, did this change make it worse, and is it still working now.
Building a Golden Dataset
A golden dataset is the foundation everything else builds on, and it is worth taking seriously rather than treating as an afterthought. Useful golden datasets usually include:
- Representative "normal" queries pulled from real usage patterns or close approximations of them
- Edge cases: ambiguous phrasing, incomplete information, multi-part questions
- Known failure modes from earlier testing or prior incidents
- Adversarial inputs, including attempts to get the system to go off-topic, leak system prompts, or produce unsafe output
- Examples across the range of inputs the feature is actually expected to handle, not just the easy ones
Human review matters here. For most business applications, 50 to 200 well-chosen, human-labeled examples that reflect real use cases catch far more real problems than thousands of synthetically generated ones. The dataset should grow over time as new failure modes show up in production, which is one reason evaluation needs to be an ongoing process rather than a one-time checklist before launch.
Core Evaluation Methods
Human review
Still the most reliable method for anything with real business stakes, and the baseline everything else should be checked against. It does not scale to every production interaction, which is why it is usually applied to the golden dataset and to a sampled slice of production traffic rather than every request.
LLM-as-judge
Using a separate model to score outputs against criteria like correctness, relevance, or tone has become a common way to evaluate at scale without reviewing everything by hand. It is useful, but it has real limitations worth knowing before you lean on it: judge models can favor longer or more confidently worded answers regardless of accuracy, can rate outputs from a similar model family more favorably, and can be inconsistent across runs. Good practice is to use a different model as the judge than the one being evaluated, validate the judge's scores against human review on a sample, and treat LLM-as-judge as a scaling tool for a method you have already checked works, not a replacement for human judgment on anything high-stakes.
Task-specific metrics
Not every LLM feature is open-ended text generation. If the task is classification, extraction, or structured output, use the metrics that already exist for that task: accuracy, precision and recall, schema validation, exact match on structured fields. These are more reliable and cheaper to run than LLM-as-judge, and they should be the default wherever the output has a concrete, checkable structure.
RAG-specific metrics
If your feature uses retrieval-augmented generation, generic accuracy metrics miss where RAG systems actually fail. Two metrics worth tracking specifically:
- Faithfulness (also called groundedness): does the generated answer actually follow from the retrieved context, or does it introduce claims that are not supported by it. This is the most direct check against hallucination in a RAG system.
- Context precision and recall: did the retrieval step surface the right documents at all. A model can reason perfectly and still produce a wrong answer if retrieval handed it the wrong source material.
Open source frameworks built specifically for this, such as Ragas, implement these metrics directly rather than requiring you to design them from scratch. If your team is weighing retrieval against other approaches to begin with, that decision shapes which metrics matter most; see our comparison of RAG, fine-tuning, and prompt engineering and our explanation of how retrieval-augmented generation works for business AI.
What Changes Once You Are in Production
Pre-launch evaluation answers "is this good enough to ship." Production monitoring answers a different question: "is it still good, right now, for the inputs people are actually sending." Four things to track once a feature is live:
- Drift: production inputs tend to diverge from your original test set as users find new ways to use the feature, or as the underlying business context changes. Periodically sampling live traffic back into your evaluation set keeps your golden dataset honest.
- User feedback signals: thumbs up or down, regeneration requests, abandoned sessions, and support tickets referencing the AI feature are all evaluation data. Wiring them into the same tracking you use for offline evaluation closes the loop.
- Cost and latency: a technically accurate answer that takes eight seconds or costs three times what you budgeted per request is still a product problem. Track these alongside quality metrics, not separately.
- Upstream model changes: if you depend on a third-party model API, the provider can update the underlying model without changing the version string you call, which can shift behavior with no code change on your end. Scheduled re-runs of your regression suite catch this before users do.
A number of observability platforms exist specifically for this layer, generally falling into two camps: open source, trace-focused tools aimed at debugging and drift detection, and managed platforms that bundle tracing, evaluation, and alerting together. Which one fits depends on your existing stack, your team's tooling preferences, and whether you need alerting out of the box or are comfortable building that layer yourself. The right choice is less important than having some systematic answer to "how would we know if this broke."
Guardrails and Risk Frameworks
Evaluation measures quality. Guardrails prevent specific categories of bad output before they reach a user, such as topic restrictions, PII detection, or blocking known jailbreak patterns. The two work together: guardrails catch known failure modes in real time, and evaluation finds the failure modes you have not thought of yet.
Two frameworks are worth knowing if you are structuring a risk management approach around an AI feature, particularly for anything customer-facing or handling sensitive data:
- The OWASP Top 10 for LLM Applications catalogs the most common LLM-specific security risks, including prompt injection, sensitive information disclosure, and excessive agency, and is a useful checklist when deciding what your evaluation and guardrail coverage needs to include. We cover prompt injection and related risks in more depth in our piece on LLM security risks.
- NIST's AI Risk Management Framework and its Generative AI Profile provide a voluntary structure for identifying and managing AI-specific risks across an organization, not a certification or a compliance guarantee. For regulated industries, it is a useful reference point for building a documented risk process, but it does not substitute for your own legal and compliance review, and nothing here should be read as legal advice.
Building Evaluation Into Your Development Process
For a small team shipping a first AI feature, a reasonable starting point looks like this:
- Build a golden dataset of 50 to 200 real or realistic examples, including edge cases and known failure modes, before writing production prompts.
- Score outputs against that dataset using the metric that fits the task: faithfulness and retrieval metrics for RAG, task-specific metrics for structured tasks, human review or a validated LLM-as-judge setup for open-ended generation.
- Wire the same scoring into your CI/CD pipeline so a prompt change or model swap cannot ship without running against the golden dataset first.
- Add basic production monitoring: log inputs and outputs, capture user feedback signals, and sample a slice of live traffic for periodic human review.
- Revisit the golden dataset regularly, feeding in real failure cases as they turn up, so the test set evolves with actual usage instead of staying frozen at launch.
None of this requires a large team or an enterprise budget. It requires treating evaluation as part of building the feature, not as a separate step that happens if time allows. Teams that build this discipline in early tend to ship AI features that keep working as usage grows, rather than ones that need a crisis-driven rebuild six months in. The same discipline applies whether the feature is a RAG-based assistant, an AI agent automating a workflow, or a simpler model call embedded in an existing application.
Getting Help
If you are planning an AI feature and want evaluation and monitoring designed in from the start rather than retrofitted later, that is exactly the kind of architecture decision worth getting right early. Our AI integration work covers this as part of building the feature, not as an afterthought, and our software development services cover the surrounding application it needs to live in. You can book a strategy call to talk through what evaluation setup makes sense for your specific use case.
Frequently Asked Questions
What is the difference between LLM evaluation and LLM monitoring?
Evaluation is the process of scoring outputs against known-good examples, usually before or during development, to decide whether a system is good enough to ship or whether a change improved or hurt quality. Monitoring is the ongoing process of watching live production traffic for drift, failures, and quality changes after launch. You need both: evaluation to ship safely, monitoring to stay safe.
Do I really need a human-labeled golden dataset, or can I generate test cases with another LLM?
Synthetic test cases can supplement a dataset, but they tend to miss the genuinely odd, ambiguous, or adversarial inputs real users send. A smaller set of human-reviewed examples, especially ones drawn from actual usage or close approximations of it, catches more real problems than a much larger synthetic set.
Can an LLM reliably evaluate its own output?
Using the same model to judge its own outputs tends to produce inflated scores, since models can rate their own style and reasoning patterns favorably. Using a different model as the judge, and validating that judge's scores against human review on a sample, produces more trustworthy results.
How often should a production AI feature be re-evaluated?
At minimum, whenever the prompt, model version, or retrieval configuration changes. Beyond that, scheduled re-runs (weekly or monthly, depending on usage volume and how fast your input patterns change) catch drift and upstream model changes that happen without any code change on your end.
Does passing evaluation metrics mean the feature is HIPAA compliant or legally safe to deploy?
No. Evaluation and guardrail metrics measure output quality and certain risk categories, not regulatory compliance. Compliance depends on your organization's broader policies, contracts, infrastructure, and controls, and for healthcare or other regulated use cases should be reviewed separately with appropriate legal and compliance guidance.