How to test AI accuracy and guardrails before launch

Use real chats to test how your AI replies and acts. Learn what to check in code, how to grade replies and when to pause a launch.

An ink drawing of a checklist, a stopwatch and a desk service bell.

In July 2024, a US standards agency identified 12 categories of generative AI risk, including confidently stated false information. Before launch, turn real support conversations into repeatable tests. Use code to check hard rules, such as whether a refund went through without approval. Use a language model with a written grading guide to assess whether the reply explained the policy correctly.

Say you ask a support bot five neat questions from your help page and it answers all of them. That run tells you how it handles direct questions with clear answers. A customer who changes an order number halfway through a chat asks the system to do something the demo never tested.

What we’d check before launch

  • Replay real conversations, including corrections and missing details.
  • Use code to block actions outside the bot’s authority.
  • Grade replies against written criteria and check the grader against staff.
  • Hold the launch if a consequential failure is still open.

Real transcripts show where a friendly demo falls short

Pull a sample of past conversations from the job you want the AI to do. Keep the turns in order so you can see when a customer corrected a detail or answered a question the bot asked earlier. Remove details that identify people, replacing identifiers with consistent test values so links between messages and orders still work.

Ask the person who owns the policy to write down the expected outcome for each case. An old staff reply can show what happened, but the approved policy tells you what should happen now. Save the policy version with the case. Otherwise a change to your returns policy can look like a new mistake by the model.

Keep some chats aside while you tune the bot and the grader. Include routine requests in that set so you can catch a fix that makes ordinary replies worse. Log the rare, costly cases separately so a pile of correct opening-hours answers can’t bury a failure on a refund.

If you have no transcripts yet, run the bot with staff handling the replies and keep the conversations they had to correct. You can write missing cases with staff, too. Mark those as test cases you made up so nobody reads the results as an estimate of how often customers hit the problem.

Code can block an action before it reaches a customer

A guardrail is a rule the system enforces while it runs. A deterministic check applies the same rule whenever it sees the same inputs. Put that check at the point where the bot would change something. If the bot requests a refund without a valid approval for that order, the service that issues refunds should reject the request.

Run the test against a test account or a copy of the workflow that can’t issue a real refund. Check the call record and the order afterwards, since a reply that says a refund is pending doesn’t tell you whether the order changed.

You also need to see that the refused request landed in the right queue. If staff never receive it, the guardrail protected the order and left the customer waiting.

Keep the bot in read-only mode if you can’t enforce who approves a change. Give it an explicit handoff to a person who can act. Test the fallback with the person who will actually pick up the request.

A judge needs a grading guide your staff can use

An eval is a repeatable test of what your AI does. A large language model, or LLM, can act as a judge in an eval by grading a reply against a rubric, which is a written guide to what passes or fails. Give the judge the conversation, the approved policy excerpt and the reply. Ask it to quote what supports its verdict so a reviewer can see what it relied on.

Take the refund case. The customer gives the wrong order number, corrects it, then asks whether the money is on its way. To pass, the reply should use the corrected order, say that approval is still pending and explain what happens next. A polite promise that the refund has gone through fails even if it sounds reassuring.

Have staff grade a separate set of replies before you trust the judge. If it passes a reply staff rejected, look at the evidence both used. Staff may know an exception you forgot to put in the policy excerpt, or the judge may have taken a promise as proof of payment. Fix the first problem in the test material and send uncertain verdicts to a person.

Save the grader’s instructions and model version with the results. If you change the grader and the bot together, you’ll have trouble telling whether a better score came from a better reply or a more lenient judge.

The launch decision depends on what failed

Before you run the tests, decide which failures would stop release. We’d stop the refund workflow if it can move money without approval. A vague but accurate explanation can go back for editing. If that explanation could lead a customer to miss a deadline, treat it as a different failure from awkward wording.

Pre-launch eval and guardrail checklist

  • Set up the replay sheet. Give each case a conversation, expected outcome, grading rule, result and owner. Record the policy version next to the expected outcome.
  • Check blocked actions in the test account. Make sure a rejected request leaves the order unchanged and that the handoff reaches the staff queue.
  • Compare the judge with staff. Read the cases on which they disagree and send unclear calls to the person who owns the policy.
  • Give blockers an owner. Keep the affected workflow off until the owner has fixed it and rerun the failing case alongside the chats you held back.

Start this week with a recent conversation that made someone on your team stop and check the policy. Ask that person to mark the turn where the bot should have paused, then write the expected outcome together. Save the case for the next time you change the model, its instructions or the policy it uses.

After launch, review real conversations for cases worth adding to that sheet. If you want to test a workflow that can change orders or spend money, book a consultation and bring a sample conversation with customer details removed.

Keep reading

Book a consultation