# Evals Before You Ship: Why AI Features Need Tests Too Source: https://customlabs.io/insights/evals-before-you-ship/ Updated: 2026-09-11 Insights June 23, 2026 · 7 min read · By CustomLabs Engineering · Updated September 11, 2026 [evals](https://customlabs.io/topics/evals-observability/) [observability](https://customlabs.io/topics/evals-observability/) [ci](https://customlabs.io/topics/evals-observability/) Key takeaways - Without an [eval suite](https://customlabs.io/glossary/eval-suite/) in CI, a prompt tweak, a model swap, and a provider update are all untested bets - Eval cases must cover the exact happy path, past incidents, adversarial and out-of-scope inputs, and cost and latency - Judge non-deterministic output with structural checks, rule-based checks, and [LLM-as-judge](https://customlabs.io/glossary/llm-as-judge/) for open-ended quality - A suite built entirely on LLM-as-judge costs more and runs noisier; lean on structural and rule-based checks first - The suite must run on every change automatically, and fail the build when a case regresses An AI feature without an eval suite in CI turns every prompt tweak, model swap, or provider update into an untested bet. You find out you lost that bet from a support ticket. AI features are software, so they need the same discipline. That means a fixed set of cases with known-good expectations, run automatically, that fails the build on regression. That set must cover the happy path, past incidents, adversarial inputs, and cost and latency. Whether the output looks plausible is not enough. Traditional software has a straightforward answer for “did this change break anything”: tests, run in CI, on every commit. AI features need that same discipline. The output is harder to grade than an exact-match assertion, but that is not a reason to hold it to a lower bar. Here is what the eval suite needs to cover. ## What do eval cases need to cover? **The happy path, precisely.** Start with the inputs the feature is built for. Pin down what a correct response looks like for each one. Do not settle for “sounds plausible”: define a specific, checkable property. The right document gets retrieved. The requested field gets extracted correctly. The tool call carries the right arguments. Vague success criteria let an eval suite pass even after quality has dropped with no alert. **The edge cases that already bit you.** Every AI feature we have maintained builds a running list of “the time it did something weird.” A malformed input. An ambiguous request. A document with a table that broke extraction. Each one belongs in the eval suite as a regression test, added the same way a bug fix earns a unit test. Skip this step and you fix the same failure mode twice. **Adversarial and out-of-scope inputs.** What should the feature do when a user asks something it was not built for? What should it do when a user asks for something it should refuse? A [prompt injection](https://customlabs.io/glossary/prompt-injection/) attempt and a request for data the user should not see are two examples. “Does not crash” is the floor. “Declines gracefully and leaks nothing” is the actual bar. Nobody tests their own demo adversarially, so these cases never show up on their own. Put them in the suite on purpose. Cost and latency matter alongside correctness. A prompt change that raises accuracy by making the model reason ten times longer is a real tradeoff, not a pure win. An eval suite that checks correctness alone will never surface that tradeoff. Track token cost and response time per case next to the pass or fail result. A change that “succeeds” but triples your inference bill should get caught before it ships, not after the invoice arrives. ## How do you judge non-deterministic AI output? Traditional tests check for an exact string match. AI evals cannot: the same prompt can produce two differently worded answers that are both correct. A few approaches work well in practice, usually combined: - **Structural checks** wherever the output has structure: the right fields are present, a tool call carries valid arguments, a classification lands in the right bucket. This check is the cheapest and most reliable, so cover as much of the suite with it as you can. - **Rule-based checks** for properties you can assert directly: response length within bounds, a required disclaimer present, no personal data in the output. - **LLM-as-judge** for open-ended quality questions. Version the judge prompt, review it, and check it against human judgment on a schedule. A judge that has drifted with no alert is worse than no judge, because it produces false confidence. The mix matters more than any single technique. A suite built entirely on LLM-as-judge costs more and runs noisier. A suite built entirely on exact-match will reject correct answers phrased a different way, and the team will learn to ignore its failures. ## How do you wire an eval suite into CI? An eval suite that only runs when someone remembers to trigger it will stop running within a month. The suite must run automatically on every change that could plausibly affect output: a prompt edit, a model version bump, a retrieval or tool change. The build must fail, or at least flag a human, when the pass rate or the cost and latency profile moves the wrong way. We hold traditional code to that bar already. AI code earns no exception just because grading it takes more thought. The difference is in technique, not in whether the check happens before you ship. Every custom AI feature we build now ships with its eval suite wired into CI. That gives “did this get better or worse” a real answer on every pull request, not a vibe check once the feature is already live. An eval suite can still go wrong even after you build it. See the field guide entries on [vibes-based prompt regression](https://customlabs.io/failure-modes/vibes-based-prompt-regression/) and [judge prefers its own output](https://customlabs.io/failure-modes/judge-prefers-its-own-output/). Questions ## FAQ Answers to the questions this piece raises. 01 Why do AI features need an eval suite instead of just testing manually? AI features keep changing through prompt tweaks and model swaps. Provider updates change them too. An eval suite in CI catches a regression automatically. A manual spot-check only proves the demo looked right once. 02 What should an eval suite cover? Cover the exact happy path first. Add every edge case that already caused an incident. Add adversarial and out-of-scope inputs. Track cost and latency alongside correctness. 03 How do you judge AI output that isn't exact-match deterministic? Combine structural and rule-based checks with LLM-as-judge for open-ended quality. Lean on structural and rule-based checks first. A suite that runs entirely on LLM-as-judge costs more and produces noisier results. Related services [Custom Development](https://customlabs.io/services/custom-development/) [AI Integrations](https://customlabs.io/services/ai-integrations/) Related tools [AI Readiness Scorecard](https://customlabs.io/tools/ai-readiness/) A prompt tweak without a test is a guess. Check whether your current suite covers the happy path and past incidents. The Eval Stack lays out what a suite needs and how to wire it into CI. [Run the AI Readiness Scorecard →](https://customlabs.io/tools/ai-readiness/) [Read the Eval Stack →](https://customlabs.io/evals/) Written by [CustomLabs Engineering](https://customlabs.io) Agentic AI engineering team CustomLabs is a small, senior-only studio that embeds with client teams. It ships eval-tested, model-agnostic AI systems into production in weeks. Every insight reflects work and lessons from the studio's own engagements — the people who write the code write the words. Our products [CodeHerder](https://codeherder.com) [CostMon](https://costmon.com) [FreeTier](https://freetier.co) [GreatAPIs](https://greatapis.com) [Beemy](https://beemy.co) [CustomHosted](https://customhosted.com) Read next September 30, 2026 · 9 min read ### [What Our Coding Agents Did to Get Past the Build Checks](https://customlabs.io/insights/coding-agents-game-the-check/) A coding agent optimises for the check and skips the goal. Incidents from our own delivery record show how a green check hid a wrong page. agents evals ci production Read → June 30, 2026 · 7 min read ### [What an AI Feature Costs in Production](https://customlabs.io/insights/what-ai-actually-costs/) Token costs that look trivial in a demo compound fast at scale. Make cost a first-class metric instead of a surprise on the invoice. cost production observability Read → November 28, 2026 · 9 min read ### [One Change, Five Stages: How Our Agent Fleet Shipped a Page](https://customlabs.io/insights/one-change-five-stages/) One site change, followed from brief to production. Review rejected the first build for two defects that CI passed. agents production Read →