Last quarter, a team shipping a customer-support AI agent pushed a model update on a Wednesday. By Friday, their escalation rate had climbed 18%. No alerts fired. Their monitoring tracked latency and API errors — both normal. The output quality had quietly dropped, and nobody knew until customers started complaining.
This isn't a niche problem. It's the default state of AI product development. And it's the reason quality baselines are becoming as essential for AI agents as code coverage is for software.
What "quality baseline" actually means
A quality baseline is a measurable, reproducible specification for what your agent's outputs should look like. Not "good answers" — that's not testable. You define concrete scenarios: a specific input, an expected behavior, a scoring rubric, and a pass threshold.
For example, a billing-support agent might have these scenarios:
Example scenario definitions
- Customer asks for invoice for a past month → agent returns structured JSON with amount, date, line items. Must include
invoice_idfield. - Customer disputes a charge → agent acknowledges dispute, does not issue refund without escalation flag. Format: plain text, empathetic.
- Customer asks about a feature not yet shipped → agent accurately states unavailability, suggests workaround from known KB. Response under 120 words.
Each scenario gets a grader — a function that inspects the agent's output and returns a score. The grader can be an exact match check, an LLM-as-judge prompt, a regex validator, or a combination. The baseline is the ensemble of all scenarios at a given point in time.
Why standard CI/CD doesn't catch AI degradation
Your existing CI pipeline tests code. It runs unit tests, checks linting, verifies builds. None of this measures output quality. You can merge a change that subtly degrades your agent's ability to follow instructions — and your pipeline will pass green.
The distinction is between operational health (is the service up?) and behavioral quality (is the output correct?). Most teams only monitor the former.
The regression gate pattern
The teams solving this treat quality baselines as a CI/CD gate. Every model change, prompt update, or system modification triggers a baseline run. If the composite score drops below the threshold, the deploy is blocked and the team gets an alert.
What a baseline run actually measures
A quality baseline run executes a cohort — all your defined scenarios against the current agent. Each result is scored, and the aggregate gives you a composite score and pass rate.
| Signal | What it tells you | Triggers regression? |
|---|---|---|
| Composite score | Weighted average across all scenarios — overall quality health | ✓ |
| Pass rate | % of scenarios scoring above threshold | ✓ |
| Per-scenario delta | Which specific scenarios degraded — narrows the root cause | ✓ |
| Latency | Response time — operational, not quality | ✗ |
| Error rate | API failures — operational, not quality | ✗ |
Graders: the part that makes or breaks your baseline
The quality of your baselines is a direct function of your graders. A weak grader produces misleading scores — passing bad outputs, or failing good ones. Here's how to think about grader types:
Exact match graders — validate structured outputs (JSON schemas, enum values, field presence). Fast, deterministic, no false positives. Use these wherever your agent outputs a structured format.
LLM-as-judge graders — use a capable model to evaluate response quality against a rubric. Works for nuance, tone, reasoning quality. Add a reference output for best results. The tradeoff is cost and latency, so reserve this for scenarios where you need judgment, not exact matches.
Hybrid graders — chain exact-match validation (fast gate) with LLM evaluation (deeper check) only when the first stage passes. This gives you speed on the happy path and depth where needed.
The threshold question
Set your baseline threshold based on your worst-performing scenario's current score — not an arbitrary number. If your billing-data scenario currently scores 84, set 82 as the floor. As you improve, raise it. A threshold you never fail is just noise.
What happens when a regression is detected
When a baseline run crosses below threshold, you need signal, not silence. The best setups route regression alerts to where the team is already working — Slack for fast teams, GitHub PR comments for integrated flows, webhook to incident tooling for enterprise setups.
The critical signal is delta — how much the score dropped — and failing_scenarios — which specific behaviors broke. This turns a vague "something is worse" into an actionable "this scenario needs attention."
Start with your highest-stakes scenarios
You don't need to define every behavior your agent can exhibit. Start with the five scenarios that, if broken, would most directly hurt users or your business. For most teams, that's:
Priority scenarios to baseline first
- Structured data extraction — does it return the right schema?
- Constraint compliance — does it respect your output format requirements?
- Out-of-scope handling — does it gracefully refuse requests it can't handle?
- Escalation triggers — does it correctly flag when human review is needed?
- Safety/accuracy guardrails — does it avoid common failure modes specific to your domain?
That's enough to catch the most common degradation patterns. You can expand the baseline over time as you learn which failure modes matter most for your product.
The baseline is a living document
The score you care about at launch will change. As you improve your agent, your threshold should rise. As your product evolves, you'll add new scenarios and retire old ones. A baseline run from six months ago isn't a meaningful comparison to today — the scenarios have shifted.
What matters is change over time against a consistent spec. Run your baseline before every significant change. Track the trend. Let the data tell you when something actually broke versus when you've just shifted what "good" means.
Ship AI agents with confidence — define your baselines today.
BaselineForge gives you the infrastructure to define scenarios, run cohort tests, gate CI/CD on regressions, and track quality trends over time.
Get Your Free API Key →