Rylvo
Blog

Automated Chatbot Regression Testing: Hard Checks, Judge Scores and Nightly Runs

Automated chatbot regression testing: turn real chats into tests with hard checks, judge scores, nightly runs and CI so edits can't quietly break old answers.

In this articleOverview

Chatbot regression testing means saving the conversations your assistant must keep getting right, then re-running all of them after every change. Each test has hard checks that fail it outright (a forbidden phrase, a missing fact, the wrong handoff) and a judge model that scores the reply's quality. Run it before every release, and nightly once your plan includes scheduled runs.

Key takeaways

  • A prompt edit, a new knowledge page or a model switch can fix one answer and break three others. Only re-running old conversations shows it.
  • Split every test into hard checks (pass or fail, no judgment) and a judge score (quality out of 100). A failed hard check should fail the test whatever the score.
  • Build the suite from real conversations: each real failure you fix becomes a test, so it cannot come back unnoticed.
  • Automate the trigger: a nightly run, a release that waits for a passing run, and on Enterprise a CI check of the release gate.
  • Check the judge itself: have a person label a sample of results and measure how often the judge agrees.

Why does a chatbot get worse after a change?

A traditional app breaks loudly: a button throws an error. An AI assistant breaks quietly. It still answers, in fluent sentences, but the answer is now wrong, or it stopped asking for a phone number, or it offers a discount it never used to offer.

Three kinds of change cause most regressions:

  1. Prompt edits. You add "Keep answers under three sentences" to fix rambling, and the bot stops listing your opening hours on Saturdays because the list no longer fits.
  2. Knowledge changes. A new price sheet sits next to the old one, and the bot quotes whichever it finds first. (More on that in how to stop an AI chatbot hallucinating.)
  3. Model changes. A newer model is cheaper and faster, and also more willing to answer questions it should hand to a person.

Regression tests are the repeatable half of quality assurance. The manual half, trying the bot by hand before launch, is in how to test an AI chatbot before launch.

Anatomy of a good regression test

A test is a short, written conversation plus a statement of what the reply must do. Here is one for a bike shop's website assistant, written out in plain words:

Test: Repair price question routes to booking
Category: Happy Path        Priority: Critical

Customer: How much is a basic tune-up?
Customer: Can I bring it in Saturday?

The reply must say:      $65 | book
The reply must never say: free | guarantee
Guardrail expectation:   none should act
Must have collected:     preferred_day = Saturday
Expected reply (for the judge):
  "A basic tune-up is $65. Saturday works. You can book a slot here,
   and we'll confirm by email."

Hard checks: pass or fail, no opinion

Hard checks are rules a reply either meets or breaks. Use them for anything that must never happen, because a score of 85 out of 100 should not hide a reply that promised a refund you do not offer.

In Rylvo a test can check:

  • phrases the reply must contain and phrases it must never contain;
  • which guardrail should act (block, warn, escalate, rewrite, or none);
  • the route the conversation should take, and the data the bot should have collected;
  • 11 further check kinds, for example a reply that matches or must not match a pattern (a card number, a competitor's name), a last reply that is valid JSON of a given shape, a number within a margin, every reply under a time limit, the whole conversation under a cost limit, an answer that comes from the knowledge base, or a tool that must be called, never called, or called in a set order.

A failed hard check fails the test, whatever the judge says. Adding or changing the 11 extra check kinds is on Pro and up; checks already saved keep running on any plan.

The judge score: quality out of 100

Some things a rule cannot judge: whether the reply actually answered the question, whether it covered everything, whether it sounded like your business. For those, a second model reads the conversation and scores it.

Rylvo's judge scores five dimensions: relevance (answers what was asked), accuracy (right facts), completeness (covers what the expected reply does), tone, and guardrail compliance. By default they count equally. A test passes at 70 or more out of 100 with no broken rule, and 40 or more is a partial. On Pro and up you can change the dimensions, their weights and the pass marks for the workspace or for one bot.

The judge is GPT-6 Luna unless you pick another on the Run button or in Scoring. It runs on the same key as the bot's own replies: the AI replies included with a paid plan (or the trial), or your own provider key if you add one. If a judge call fails, the result is scored by the test's rules alone and says that the judge failed, rather than passing silently.

Hard check or judge? A decision table

What you want to catchUseWhy
The bot quotes a price, policy or phone numberHard check: must containExact facts are right or wrong
The bot offers something you don't (refunds, free delivery)Hard check: must never containOne slip is too many
A legal, medical or angry message should go to a personHard check: guardrail or routeHandoff is a yes/no outcome
The bot should ask for a name and emailHard check: data collectedYou can check the field
A refund tool must never be calledHard check: tool never calledActions matter more than words
The answer is helpful and completeJudge scoreNeeds reading, not matching
The reply sounds like your brandJudge score (tone)Subjective, but consistent
The reply says much the same as a referenceSimilarity check or judgeWording can vary

Where do good chatbot test cases come from?

The suites that catch real regressions are built from real traffic, not invented in bulk.

  1. Every real failure. When a customer gets a wrong answer and you fix it, save that conversation as a test before you move on. In Rylvo, "Add as a test" opens the Tests editor filled in from the reply, and you review it before saving. It sits on an edge case (Edge Cases are on Pro and up) and, on every plan, in a trace's More actions in Observability.
  2. Your top questions. Pull the ten most common questions from your conversation history. These are the answers a regression would hurt most.
  3. The refusals. Write five conversations the bot must decline or hand over: an off-topic request, a question about another customer, a medical or legal question, a pushy discount request, an attempt to change its instructions. The prompt injection guide has a set of attacks worth saving.
  4. Imports. If you already keep test conversations elsewhere, import them as CSV, JSON Lines or JSON, up to 200 tests at a time. A dry run shows what would be created before anything is saved.
  5. The Architect. Rylvo's Architect can draft tests for a bot from its setup; you review them like any other.

File each test under one of 10 categories (Happy Path, Edge Case, Guardrail Test, Escalation Test, Tone Check, Policy Compliance, Hallucination Probe, PII Check, Multi-Turn, Custom) and give it a priority: critical, high, medium or low.

Freeze the suite with test sets

A suite that changes every week cannot tell you whether the bot got better or the tests got easier. Group the tests you trust into a test set and save a version of it. A saved version never changes, so a run of "Launch checks v3" today is comparable to the same set last month.

A set holds up to 400 tests, and a bot can have up to 50 sets. Test sets are available on every plan.

Run it in Test, never on live customers

Regression tests should run against a copy of the bot that customers cannot reach. In Rylvo every test run started from Tests runs against the Test version of the bot, and Production is view-only from that page. A run does not write to real customer profiles: anything the bot would have learned about a person is shown in the result as a dry run.

Tests are not carried to Production by a release. A release carries the bot, its prompts, flows and knowledge settings; the tests stay in Test and only their runs are read. The Test vs Production guide explains the split in detail.

Automate the trigger: nightly, CI and before release

TriggerWhen it firesGood forPlan
By handYou press RunChecking a change you just madeEvery plan
ScheduleThe "Nightly test run" automation, set up in Production in Automation; nightly at 02:00 by default. It starts the same Test-version run as the Run button.Catching drift from knowledge syncs and model updatesPlans with scheduled tasks (Lite has 10)
API or CIYour pipeline asks the release gate whether the latest run passedBlocking a deploy when the suite is redEnterprise (the gate route; API keys start on Lite)
ArchitectThe Architect starts a run after a change it madeChecking its own workEvery plan with the Architect
Release holdA release to Production waits for a passing runStopping a bad releaseHold releases: any plan; custom criteria: Enterprise

Hold releases until the tests pass

The last line of defense is the release itself. With Hold releases switched on, a release to Production waits until each bot in it passes a run against that exact release. A run of an older version does not count. With no criteria saved, the rule is simple: at least one test passes and none fail.

On Enterprise you can set the criteria: a minimum pass rate, every critical test passing, a named test set, and a minimum judge agreement. Your own CI pipeline can ask the same question before it deploys (the route needs an API key with the tests:read scope):

curl -sS https://rylvo.com/api/v1/tests/gate \
  -H "Authorization: Bearer $RYLVO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"botId": "YOUR_BOT_ID"}' -o gate.json
jq -r '.error // .reasons[]?' gate.json
jq -e '.passing == true' gate.json > /dev/null

How do you read a failed test run?

When a run fails, resist the urge to re-run it and hope. Open the result and read, in order:

  1. Why it failed. A broken hard check is named outright ("A reply matched a pattern it mustn't"). A low score shows each dimension and the judge's note.
  2. The conversation. What the bot actually said, turn by turn, next to what you expected.
  3. The trace of each reply. Which knowledge it read, which prompt version answered, which tools it called. This is usually where the cause is.
  4. What to fix. After a run, Rylvo writes a short analysis of the failures with suggested fixes, each pointing at where to make it: the test, the prompt, guardrails, knowledge or connectors.

Then decide honestly: is the bot wrong, or is the test? A test that expects last year's price is a broken test. Fix it, save a new version of the set, and say why.

What a caught regression looks like

Illustration (the numbers are invented to show the workflow, not a customer result): you add "Keep answers under three sentences" to the prompt. Last night's run was 38 of 40 tests passing. Tonight it is 33 of 40. The average judge score barely moved, but five of the failures are in the Happy Path category and one is a Critical test: the Saturday-hours question now fails its must-contain check for "Saturday". You revert the line, re-run, and are back to 38.

Three habits make this work:

  1. Compare against yesterday, not against perfect. Read what changed since the last run, then the absolute score.
  2. Read by category and priority before the average. A prompt change can raise the overall score while one category collapses.
  3. Treat a flaky test as a bad test. If a test passes and fails on re-runs with no change, tighten its hard check or split it in two. Do not rerun until it goes green.

Check the judge, not only the bot

A judge model is a model. It can be wrong, and it has known habits. The paper that popularized LLM-as-a-judge, Zheng et al., "Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena" (2023), found that GPT-4 as a judge reached over 80% agreement with human preferences, the same level humans reach with each other. It also documented position, verbosity and self-enhancement biases, and limited reasoning ability. That result was measured on general chat benchmarks, not on your bot's replies, so it is a reason to use a judge, not a reason to skip checking yours. (Checked November 2026.)

Evidently's LLM regression testing tutorial makes the same point for judges you build yourself: score one criterion per judge, use a simple scale such as a binary classifier, and evaluate the judge before you trust it.

So treat the judge as a colleague whose work you sample:

  • Keep hard checks for everything that must never happen. No judge can overrule them.
  • Pin the judge model. If you change it, your scores start a new trend; compare runs judged by the same model.
  • Have a person label a sample of results Pass, Partial or Fail, and measure agreement.

In Rylvo, reviewer verdicts and judge agreement (percent agreement, Cohen's kappa, and where the judge drifts) are on Enterprise, and agreement is treated as reliable from 10 verdicts.

How many tests and runs does each plan include?

Every plan includes the test suite:

PlanTest cases per botSuite runs a monthScheduled tasks
Free53None
Starter1010None
Lite5050Up to 10
ProNo fixed numberNo fixed numberUp to 25

Higher plans set no fixed number of test cases or runs either. Custom scoring and the extra check kinds are on Pro and up, and the 7-day Pro trial includes them. Red-team attacks, which send adversarial messages at the bot and file what gets through as edge cases for a person to review, are in Edge Cases on Pro and up. The release gate's custom criteria and judge agreement are Enterprise. See pricing for the rest.

When another tool fits better

If your assistant is your own code (your own retrieval, your own model calls), an open-source framework that lives in your repository may suit you better:

  • promptfoo is an open-source command-line tool and library for evaluating and red-teaming LLM apps, with test cases written in a declarative config and checks you can run in CI.
  • DeepEval is an open-source evaluation framework for Python and TypeScript that runs evals as tests through Pytest or Vitest.

(Descriptions from each project's documentation, as of November 2026.) Choose a code-first framework when the assistant is your own application code and engineers already review pull requests. Choose a test suite attached to the assistant's own builder when the people who notice bad answers are not the people who write code.

Both assume an engineer owns the test files. Rylvo's test suite is built for the case where the assistant is built and run on Rylvo, tests start from real conversations a non-engineer can turn into a draft with "Add as a test" and then review before saving, and the run is tied to the same Test version and release the bot ships from. For a broader pre-launch checklist, start with how to test an AI chatbot before launch.

Frequently asked questions

What is chatbot regression testing?

It is re-running a fixed set of saved conversations against your chatbot after every change, and checking that answers which used to be right are still right. It catches the case where a prompt edit, a new knowledge page or a model switch fixes one thing and quietly breaks another.

Can an AI judge replace human review?

No, it complements it. A judge model is fast and consistent enough to score every reply on every run, but it has known biases. Keep hard checks for anything that must never happen, and have a person label a sample of results so you can see how often the judge agrees with them. In Rylvo, reviewer verdicts and judge agreement are on Enterprise and are treated as reliable from 10 verdicts.

How many tests does a small business chatbot need?

Aim for 15 to 30: your ten most common questions, five questions the bot must refuse or hand to a person, and one test for every real failure you have fixed. Free keeps 5 test cases per bot and Starter 10, so on those plans start with the refusals and the questions that cost you most if wrong, and upgrade when the list outgrows the cap. Grow the suite from real conversations, not by inventing hundreds of synthetic ones.

Do the tests run automatically when I change a prompt?

Not on their own. In Rylvo a run is started by a person, a schedule you set in Automation (nightly at 02:00 by default), or the Architect. On Enterprise your CI pipeline can also check the release gate through the API. With Hold releases switched on, a release to Production waits until each bot in it passes a run against that exact release.

Which model judges the tests, and who pays for it?

GPT-6 Luna unless you pick another. It uses the same key as the bot's replies, so it draws on the AI replies included with a paid plan (or the trial) or on your own provider key. If the judge call fails, the test is scored by its rules alone and the result says so. Details are in the judge section of this post.

Does a test run affect real customers or analytics?

No. A run started from Tests uses the Test version of the bot, not Production, and anything the bot would have learned about a person is shown as a dry run and not written to a real profile. Details are in the Test section of this post.

Build your first agent on the free plan.