The demo goes great. Someone pastes a support ticket into the new AI feature, a polished reply comes back, and the whole room nods. Then a teammate opens the spreadsheet of last month's real tickets: half-written sentences, a customer who's clearly furious, a missing attachment, two product names one letter apart. The model still looks useful. But the question in the room has changed from "is this impressive?" to "how often can we trust it, and on which tickets?"
That second question is what evaluation answers. Below is a practical way to build an eval for an LLM feature: start from the job, collect messy examples, write a rubric, pick graders, run it on every change and let production feed it. I checked the guides cited here against the vendors' current docs in November 2026.
Start from the job
"Is this model good?" has no useful answer. "Does it draft support replies that are correct, follow our refund policy and ask for missing order numbers?" does. Name the task in plain product words first: summarizing long documents, pulling fields out of invoices, answering from a knowledge base, drafting replies, writing code. Each one means something different by "good." A short summary is great for a busy manager and dangerous for a compliance review that needs every clause.
Anthropic's guide on building evals opens with the same advice: "Design evals that mirror your real-world task distribution. Don't forget to factor in edge cases!" (Define success criteria and build evaluations). OpenAI's guide names the opposite as one of its anti-patterns: "Vibe-based evals," meaning "it seems like it's working" as the whole strategy (Evaluation best practices).
Build the eval set from messy reality
An eval set full of clean, friendly inputs rewards the model for doing well in a world your product doesn't live in. Mix in:
- Common cases, in roughly the proportions you see in real traffic.
- Edge cases: empty fields, very long inputs, two languages in one message, typos in product names.
- Past failures. Every bug report about the AI feature becomes a test case.
- Questions where the right answer is "I don't know" or "I need your order number."
- Inputs that try to push the model off-policy, such as a user asking it to ignore its instructions.
Your logs are the best source. OpenAI's advice is to "log everything" during development "so you can mine your logs for good eval cases," and it warns against eval sets "that don't faithfully reproduce production traffic patterns." Hamel Husain, who has helped many teams set up evals, puts it more bluntly: "You must remove all friction from the process of looking at data" (Your AI Product Needs Evals). He suggests starting with plain good or bad labels, since they're easier to agree on than a 1 to 10 score.
Size matters less than you'd fear at the start. Anthropic's guide even says "more questions with slightly lower signal automated grading is better than fewer questions with high-quality human hand-graded evals." A few dozen real examples you've actually read will teach you more than a big public benchmark that has nothing to do with your tickets. OpenAI lists "overly generic metrics" among its anti-patterns for the same reason.
Write the rubric, and expect it to change
A rubric turns "I like this one better" into something two reviewers can argue about productively. For a support reply, you might score factual accuracy, policy compliance, tone, whether it cites the right help article, and whether it asks for missing information instead of making it up. For generated code: correctness, security, readability, tests, and fit with the existing codebase.
Don't expect to get the rubric right on day one. Shreya Shankar and colleagues studied people grading LLM outputs and named the problem "criteria drift": "users need criteria to grade outputs, but grading outputs helps users define criteria" (Who Validates the Validators?, 2024). In practice, you'll read 30 outputs and discover a failure mode nobody wrote down. Add it to the rubric, give the rubric a version number and re-grade.
Pick the cheapest grader that works
Anthropic's guide sorts graders into three kinds, and the trade-offs are worth knowing by heart:
| Grader | Good for | Watch out for |
|---|---|---|
| Code-based checks | Exact fields, valid JSON, required phrases, banned words, length limits. The guide calls this "fastest and most reliable." | It "lacks nuance" for open-ended writing. |
| LLM as judge | Tone, helpfulness, whether an answer follows a policy. "Fast and flexible." | Test that it agrees with people before you scale it. Use a different model from the one being graded. |
| Human review | High-risk flows, new failure types, checking the judge itself. "Most flexible and high quality." | "Slow and expensive." Spend it on samples and hard cases. |
LLM judges deserve a closer look because they're so tempting. In the MT-Bench study, a GPT-4 judge agreed with human preferences more than 80% of the time, about the same rate at which humans agreed with each other. The same paper also documented position bias, verbosity bias and self-enhancement bias, where a judge favors answers from its own model (Zheng et al., 2023). OpenAI's guide suggests pairwise or pass/fail judgments, controlling for response length, and scaling a judge only once it "consistently agrees with human annotations." Husain adds a subtle one: raw agreement can fool you when most answers are fine, so look at how well the judge catches the bad ones specifically.
Run it on every change
Evals pay off when they become a habit. Every prompt tweak, model upgrade, retrieval change or new system instruction can fix one case and break another. Without a stable eval set, the team is steering by memory. OpenAI's guide calls for continuous evaluation, to "run evals on every change." Husain describes the cheapest layer as plain assertions, fast enough to run on every code change, and notes you "don't necessarily need a 100% pass rate." The pass rate you accept is a product decision.
When you compare two runs, read every case that flipped as well as the average. A score that goes from 82% to 84% can hide five cases that got fixed and three that newly broke, and one of those three might be your biggest customer's favorite question.
Quality is one column of several
A model that's slightly better but twice as slow may be worse for your product. Put the trade-offs next to each other:
| Measure | Why it matters |
|---|---|
| Latency (median and slow tail) | Users remember the slow requests, and an average hides them. |
| Cost per request | Decides whether the feature can serve all users or only a pilot. |
| Tokens per request | Long context gets expensive fast and can push you toward limits. |
| Refusal rate | Too many refusals and people stop asking. Too few and it answers things it shouldn't. |
| Safety and privacy checks | Leaked personal data or an off-policy promise turns into a legal problem fast. |
Let production write your next test cases
Offline evals are a guess about what users will do. Production tells you what they did. Watch for people editing generated drafts heavily, hitting thumbs-down, retrying the same prompt, abandoning the flow or contacting support right after using the feature. Logs, product analytics events and a small manual review queue all show where the offline eval missed reality.
Use these signals to learn where the system helped, where it overreached, and which real cases should join the eval set next. Husain's line sums it up: "You can never stop looking at data."
I trust an LLM feature more when the team can show me its eval scars: the cases that failed, the rules they added, the model upgrade they rejected and the trade-offs they accepted. So the question to ask isn't "which model is smartest?" It's "what would convince us this is reliable enough for this user, in this workflow, today?" If hallucinations are your main worry, Reducing Hallucinations in LLMs, One Layer at a Time goes deeper on that one failure mode.
Try this week
- Pull 30 real inputs from your logs, including at least five that went wrong, and label each output good or bad.
- Write a one-page rubric from what you saw, and give it a version number.
- Turn the easiest rules (valid JSON, required fields, banned phrases) into code checks that run in CI.
- Next time you change a prompt or model, run the set before and after and read every case that flipped.