Sairam Maruri
WorkAboutSkillsWritingContact
View Resume
Sairam Maruri

GenAI & ML Engineer bridging AI systems and business analytics — turning data into decisions, and decisions into business impact.

Navigation

WorkAboutSkillsWritingContact

Resources

EducationCoding ProfilesCertificationsResume

Get in Touch

sairam.maruri@gmail.com+91 7893865644github.com/sairam3824linkedin.com/in/sairam-maruri

© 2026 Sairam Maruri. All rights reserved.

Privacy Policy·Terms & Conditions

India  ·  Open to Remote

Back to writing

Article

AI Evals: How to Actually Measure LLM and Agent Quality in Production (2026 Guide)

June 1, 2026·17 min read

Anyone can ship an LLM demo. Shipping one you can trust is an evaluation problem. This is the practical 2026 guide to AI evals — what to measure, how to build offline and online eval pipelines, when LLM-as-judge works (and when it lies), and how to turn 'it feels better' into numbers you can defend.

AI/MLAI EvalsLLM EvaluationLLM-as-JudgeProduction AIAI AgentsObservability

Anyone can demo an LLM. You write a clever prompt, it dazzles in the playground, you record a video, the team claps. Then it meets real users — messy inputs, adversarial questions, edge cases nobody imagined — and the magic quietly falls apart. The gap between "impressive demo" and "system I can trust in production" is not a better model or a better prompt. It is evaluation. This is the discipline that separates teams who ship reliable AI from teams who ship vibes.

By 2026, "evals" has stopped being a research-paper word and become the single most important engineering practice in applied AI. Every serious lab — OpenAI, Anthropic, Google DeepMind — ships eval frameworks alongside their models. Every production team that survives contact with real traffic has an eval suite. This post is the practical guide: what evals actually are, the different kinds you need, how to build offline and online pipelines, where LLM-as-judge shines and where it quietly lies to you, and how to turn "I think it got better" into a number you can defend in a review.

What Is an AI Eval, Really?

An eval is a repeatable measurement of how well an AI system performs a task. That is it. It is the AI equivalent of a test suite — except instead of asserting add(2, 2) === 4, you are asserting things like "the summary is faithful to the source," "the agent picked the right tool," or "the answer did not leak the system prompt." The output is non-deterministic and often subjective, which is exactly why you need structure instead of intuition.

The mental model that matters most: an eval is the difference between changing your system and knowing whether the change helped. Without evals, every prompt tweak, model upgrade, or retrieval change is a coin flip you grade by eyeballing a handful of outputs. With evals, you have a scoreboard. You can ship a model upgrade on Friday and prove on Monday that quality went up, latency held, and your three worst failure modes got rarer.

Why Evals Became the Bottleneck in 2026

Several forces converged to make evaluation the hardest and most valuable part of the AI stack:

  • Models change constantly: Frontier models now ship new versions in weeks, not years. Every upgrade can silently regress your specific use case even as it improves on public benchmarks. The only way to know is your own eval.
  • Agents have many failure points: A single-shot completion has one place to go wrong. A multi-step agent has tool selection, argument formatting, intermediate reasoning, recovery from errors, and final synthesis — each a distinct thing to measure.
  • Public benchmarks are saturated and gamed: MMLU-style leaderboards tell you almost nothing about whether the model is good at your task. Contamination and overfitting to benchmarks make them worse than useless for product decisions.
  • "Vibes" do not scale: Manually reading 20 outputs works for a prototype. It collapses the moment you have ten engineers, three prompts in flight, and a model upgrade every fortnight.
  • Enterprises demand evidence: Regulated industries and serious buyers now ask "how do you know it works?" An eval suite is the only credible answer.

The Three Layers of Evaluation

Mature eval programs operate at three levels. Most teams start at the bottom and never climb — which is why their agents feel fragile.

Layer What It Measures Example
Unit / Component A single model call or function in isolation Does the extraction step return valid JSON with the right fields?
Task / End-to-End The whole system on a realistic task Given a support ticket, did the agent resolve it correctly?
Trajectory / Agentic The path the agent took, not just the answer Did it call tools in a sensible order without wasteful loops?

A correct final answer reached through a broken trajectory is a time bomb — it works until the inputs shift slightly and the luck runs out. Serious agent evals score the journey, not only the destination.

Offline vs. Online Evals

There are two timelines on which you evaluate, and you need both.

Offline Evals (Before You Ship)

Offline evals run against a fixed dataset of inputs with known-good expectations. They are your regression suite — fast, repeatable, and run in CI on every change. You build a curated set of examples (the "eval set" or "golden set"), define scorers, and get a number every time you touch the prompt, the model, or the retrieval layer. The goal is to catch regressions before they reach users.

Online Evals (After You Ship)

Online evals measure real production traffic — the inputs you could never have anticipated. They include live quality scoring (often via LLM-as-judge running on a sample of traffic), user feedback signals (thumbs up/down, edits, abandonment), and guardrail monitors that flag toxicity, PII leaks, or off-topic answers. Online evals are how you discover the failure modes that belong in tomorrow's offline set. The two timelines feed each other in a loop.

The Scoring Methods: How You Actually Grade Output

Picking the right scorer for each task is where eval engineering lives. There are four families, in rough order of cost and flexibility.

1. Deterministic / Code-Based Scorers

When there is a single correct answer or a checkable property, use plain code. Exact match, regex, JSON-schema validation, "does the SQL run," "is the number within tolerance." These are cheap, instant, and never lie. Reach for these first — every task you can score with code is a task you do not have to pay an LLM to judge. Most teams underuse them.

2. Statistical / Reference-Based Metrics

Metrics like BLEU, ROUGE, and embedding-based semantic similarity compare output to a reference answer. They are useful for translation and summarization but notoriously weak for open-ended generation — two great answers can phrase things completely differently and score poorly against each other. Treat them as a cheap signal, not a verdict.

3. LLM-as-Judge

This is the workhorse of modern evals: you use a strong model to grade another model's output against a rubric. It scales human-like judgment to thousands of examples for cents each, and it handles the subjective, open-ended criteria that code cannot — helpfulness, tone, faithfulness, reasoning quality. We will spend real time on its failure modes below, because used carelessly it gives you confident, precise, completely wrong numbers.

4. Human Evaluation

The gold standard and the most expensive. Humans rate outputs, rank pairs, or label failures. You cannot run it on every change, but you need it periodically — both for the highest-stakes decisions and, crucially, to validate that your LLM-judge agrees with humans. An LLM judge you have never checked against human labels is a number generator, not a measurement.

LLM-as-Judge: Power and Pitfalls

LLM-as-judge is so useful that it is worth understanding exactly how it betrays you. The documented biases:

  • Position bias: In pairwise comparisons, judges favor whichever answer appears first (or second) regardless of quality. Fix: run both orderings and average, or randomize.
  • Verbosity bias: Judges reward longer, more elaborate answers even when they are padded. Fix: state explicitly in the rubric that length is not quality.
  • Self-preference bias: A model tends to rate outputs from its own family more highly. Fix: use a different model family as judge than the one you are evaluating where possible.
  • Sycophancy and leniency: Judges drift toward generous scores and agree with assertive phrasing. Fix: calibrate against human labels and use a discriminating rubric with concrete failure criteria.
  • Score clustering: Ask for a 1–10 score and you will get a sea of 7s and 8s with no signal. Fix: prefer binary or low-cardinality rubrics ("pass/fail," "faithful/not"), or force a decision between two options.

The practical rules that make LLM-judges trustworthy:

  1. Write a precise rubric, not a vibe. "Rate the quality" produces noise. "Score 0 if the answer contains any claim not supported by the provided context, otherwise 1" produces signal.
  2. Prefer binary or pairwise judgments over fine-grained scales. Models are far more reliable at "which is better" and "yes/no" than at "is this a 6 or a 7."
  3. Ask for reasoning before the verdict. A judge that explains then decides is more accurate and gives you something to audit.
  4. Validate against humans. Periodically label a sample by hand and measure agreement (e.g., Cohen's kappa). If the judge disagrees with humans, your rubric — or your judge — is broken.
  5. Decompose complex criteria into several simple checks rather than one mega-judgment. "Faithful AND complete AND well-formatted" should be three scorers, not one.

Building Your First Eval Set

The dataset is the heart of the whole thing — a brilliant scorer over a bad dataset measures nothing. How to build one that earns its keep:

  • Start small and real. 20–50 genuinely representative examples beat 5,000 synthetic ones. You can read 50 by hand and trust them.
  • Mine production logs. Your best eval cases are real inputs that already broke — or nearly broke — your system. Every production incident should graduate into a permanent eval case so it can never silently return.
  • Cover the distribution, then the edges. Include the common happy path, the long tail, adversarial inputs, ambiguous requests, and known-hard categories. Tag each case so you can slice scores by segment.
  • Write down the expected behavior. Even for open-ended tasks, capture what "good" and "unacceptable" look like. This becomes your judge rubric.
  • Version it like code. The eval set is a living asset. Commit it, review changes to it, and grow it deliberately as you learn new failure modes.

Evaluating RAG Systems

Retrieval-augmented systems have two distinct failure surfaces, and conflating them is the classic mistake. Always evaluate retrieval and generation separately before judging the whole.

  • Retrieval quality: Did you fetch the right documents? Measure with context precision (are the retrieved chunks relevant?) and context recall (did you get all the chunks you needed?). If retrieval is broken, no amount of prompt tuning on the generator will save you.
  • Faithfulness / groundedness: Is every claim in the answer supported by the retrieved context? This is the single most important RAG metric — it is the direct measure of hallucination. An LLM-judge comparing each claim against the context works well here.
  • Answer relevance: Does the response actually address the user's question, regardless of whether it is grounded?

The decomposition pays off diagnostically: a low faithfulness score with good retrieval means your generator is inventing things; good faithfulness with low recall means your retriever is starving the model. Different bugs, different fixes.

Evaluating Agents

Agents are where evaluation gets genuinely hard, because correctness is distributed across a trajectory. The dimensions worth scoring:

  • Task completion: Did the agent achieve the goal? The outcome metric that matters most.
  • Tool selection accuracy: Did it call the right tools with the right arguments at the right time?
  • Trajectory efficiency: Did it reach the goal without redundant calls, loops, or wasted steps? Step count and cost are real metrics here.
  • Error recovery: When a tool failed or returned something unexpected, did the agent adapt or spiral?
  • Safety and scope: Did it stay within its permissions and refuse out-of-bounds requests?

For agents, tracing is non-negotiable. You cannot evaluate what you cannot see. Capture the full trace — every prompt, tool call, argument, and intermediate result — and you can run trajectory-level scorers, replay failures, and debug a regression instead of guessing at it.

The Eval Stack in 2026

A snapshot of the tooling builders reach for today. Most teams combine a tracing/observability layer with an eval framework rather than picking one tool to do everything.

  • OpenAI Evals: Open framework for defining and running evals against models, with a registry of templates.
  • LangSmith: Tracing, dataset management, and evaluation tightly integrated with LangChain/LangGraph agents.
  • Braintrust: Eval-first platform for building datasets, running scorers, and comparing experiments side by side.
  • Langfuse: Open-source observability and evals with tracing, datasets, and online scoring.
  • Ragas: Purpose-built metrics for RAG — faithfulness, context precision/recall, answer relevance.
  • DeepEval: A "pytest for LLMs" — unit-test-style assertions over model behavior that drop into CI.
  • Arize Phoenix / Weights & Biases: Observability and experiment tracking that extend into LLM evaluation and monitoring.

Putting It Together: An Eval-Driven Workflow

Here is what a healthy loop looks like in practice, from first prototype to production:

  1. Hand-label a tiny set. Run your system on 20–30 real inputs and grade them yourself. You will instantly see your top failure modes — this is the most valuable hour in the whole process.
  2. Codify the failure modes into scorers. Turn "it keeps inventing prices" into a faithfulness check. Turn "it returns broken JSON" into a schema validator.
  3. Build the offline eval set from real and adversarial inputs, tagged by category, versioned in your repo.
  4. Wire it into CI. Every prompt or model change runs the suite. A regression blocks the merge. This is the moment "vibes" becomes "engineering."
  5. Validate your judge against humans on a sample, and recalibrate when you change the rubric or the judge model.
  6. Add online evals in production: sample live traffic, score it, watch guardrails, and collect user feedback.
  7. Close the loop: every production failure becomes a new offline eval case, so the same bug can never ship twice.

Common Mistakes to Avoid

  • Optimizing for public benchmarks. Your task is not MMLU. Build evals for your actual use case.
  • One mega-score. A single "quality: 8.4" number hides everything. Slice by category and failure mode.
  • Trusting an unvalidated judge. If you have never compared your LLM-judge to human labels, you do not have a measurement.
  • Static eval sets. A set you built once and never grow rots as your product and traffic change.
  • Skipping code-based scorers. Paying an LLM to check something a regex could verify is slow, costly, and less reliable.
  • Ignoring the trajectory. For agents, a right answer via a broken path is a future incident.

Evals are not glamorous. They will never get the applause a slick demo does. But they are the entire difference between an AI feature you hope works and one you know works — the foundation that lets you upgrade models fearlessly, refactor prompts confidently, and tell a customer "yes, and here is how we measure it." In 2026, the teams winning with AI are not the ones with the best prompts. They are the ones with the best scoreboards.

Sources & References
OpenAI — Evals Framework (GitHub) OpenAI — Evaluating Model Performance (Docs) LangSmith — Evaluation Documentation Ragas — Evaluation Metrics for RAG Pipelines Braintrust — Eval-First Development Platform Langfuse — Scores & Evaluation (Docs) DeepEval — The LLM Evaluation Framework Zheng et al. — Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena Hugging Face — Using LLM-as-a-Judge for Evaluation Hamel Husain — Your AI Product Needs Evals

Evals are where I see the clearest line between teams shipping reliable AI and teams shipping luck. The good news is that the highest-leverage step costs you nothing: spend one hour hand-grading 20 real outputs from your system. You will discover your top three failure modes immediately — and those become your first scorers. Everything else (CI integration, LLM-judges, online monitoring) is just scaling that one honest hour.

Have thoughts on evaluation strategy, or a failure mode that taught you something? Connect with me on LinkedIn or explore more on my portfolio.

Until next time,

Sairam Maruri

Note: This article includes AI-assisted writing and manual curation. Use at your own risk.