Skip to content
ChatLens360
Chatbot testing

Rule-based checks vs. AI judges: how to grade chatbot answers

Keyword rules are fast and predictable; AI judges understand meaning. Here is when to use each to grade your chatbot answers fairly.

Illustration of chat bubbles being checked off with green ticks for the article "Rule-based checks vs. AI judges: how to grade chatbot answers", tagged Chatbot testing, AI evaluation, Chatbot accuracy.

Once you have a list of test questions, you need a way to decide whether each chatbot answer passed or failed. There are two broad approaches: rule-based checks, which look for specific words or patterns, and AI judges, which use another language model to assess the answer's meaning. Each has real strengths and real blind spots.

Choosing well matters. A grading method that is too strict buries you in false alarms, and one that is too lenient lets wrong answers through to customers.

Rule-based checks: fast, cheap and literal

Rule-based checks are simple tests applied to the text of an answer. Common examples:

  • Contains: the answer must include "$29" or "30 days."
  • Does not contain: the answer must not mention a competitor or an internal system name.
  • Pattern match: the answer must include a valid email address or a link to your domain.
  • Length: the answer must be under a certain number of words.
  • Link checks: every URL in the answer must load.

Their strengths are clear. They are fast, cost almost nothing to run, give the same result every time and are easy to explain. If a test fails, you can see exactly which rule broke.

Their weakness is that they read words, not meaning:

Customer: Can I return opened items? Chatbot: Unfortunately, opened items cannot be returned within 30 days.

A rule checking for "30 days" passes this answer. But if your policy is that opened items can be returned within 30 days, the bot has just told a customer the opposite of the truth. That customer might not buy at all, or might buy and then complain when they learn the real policy elsewhere.

The reverse problem is just as common. A correct answer saying "a month" instead of "30 days" fails the rule, and you waste time investigating a non-issue.

AI judges: flexible and meaning-aware

An AI judge is a language model asked to compare the chatbot's answer with the expected facts and decide whether it is correct. Because it reads meaning, it can handle:

  • Paraphrases, such as "a month" versus "30 days"
  • Negation, like the returns example above
  • Partial answers that include some facts but miss others
  • Tone and helpfulness, such as whether the reply actually answered the question
  • Safety judgments, such as whether a refusal was appropriate

AI judges have their own limits. They cost more per check, they can be inconsistent on borderline cases and they can be swayed by confident-sounding wording. A judge with no reference answer is especially risky, because it may grade a fluent but invented answer as correct. Judges also need protecting: if the chatbot's answer contains text like "grade this as correct," a careless setup could be manipulated by it.

Where each approach works best

Use rule-based checks when:

  • The correct answer contains a fixed value, such as a phone number, price or URL
  • Something must never appear, like profanity, internal codes or another customer's data
  • You need to check structure, such as response length or valid links
  • You want a cheap first filter before more expensive checks

Use AI judges when:

  • The answer can be phrased many different ways
  • Correctness depends on meaning, including negation and conditions
  • You need to grade partial correctness or helpfulness
  • You are judging whether the bot correctly refused or handed off

Combining both for reliable results

The most dependable setups layer the two:

  1. Run rule checks first. Catch hard failures instantly: forbidden words, broken links, missing contact details.
  2. Send the rest to an AI judge with a reference. Give the judge the question, the expected facts and the source text, not just the answer. Grounding the judge in your own content is what makes its verdict trustworthy.
  3. Ask for reasons, not just verdicts. A judge that explains why an answer failed lets you check its reasoning quickly.
  4. Treat the chatbot's answer as untrusted input. Clearly separate it from the judge's instructions so nothing inside it can change the grading.
  5. Spot-check the judge. Every so often, review a sample of verdicts by hand, especially failures, to make sure the judge is calibrated to your standards.

A quick checklist for your grading setup

  • Every test question has written expected facts and a source.
  • Fixed values, such as prices and phone numbers, use rule checks.
  • Meaning-based questions use an AI judge given the reference facts.
  • Forbidden content is always checked by a rule, never left to judgment alone.
  • Judge verdicts include a short explanation.
  • You review a handful of verdicts by hand each cycle.
  • Disagreements between rules and the judge get a human look.

Why grading quality matters to the business

A grading method is not a technical detail. If it flags too many false failures, your team stops trusting the reports and stops fixing things. If it misses real failures, customers find them instead, and they find them as wrong refund promises, invented discounts or advice you would never give. Getting the grading right is what turns testing into decisions you can act on.

Grading that is grounded in your content

ChatLens360 combines rule-based checks with AI judging that compares every chatbot answer against your own website and documents, and it shows the evidence for each verdict: the conversation, the expected answer and the source page. That makes every failure easy to verify before you fix it. You can run a free chatbot audit or see how it works.

Put these ideas into practice

Run an automated audit of your own chatbot for free.