Skip to content
Sinova stands with Ukraine. Here is how you can help our country win with just a few clicks.Sinova stands with Ukraine.Help Ukraine
ArticleBuild or buy

How do you test an AI agent before it touches real customer data?

Test it in stages, each one on data you control before it acts on live customer records. Start with a small test on your real samples before the build, score every version on a fixed set of real cases, let the agent only draft while a person approves, and run a pilot with a small group before the whole team relies on it. After launch, keep measuring the same numbers.

Sinova team
8 min read

Reviewed by Taras Bakun, VP of Engineering

Published Β· Updated

Key takeaways
  • In the AI Payback Audit we run a small test on your real samples, so the accuracy estimate comes from your data and not from a demo.
  • An evaluation set of 50 to 200 real cases, with the right answer confirmed by your team, scores each version of the agent before launch.
  • Model evaluation on a fixed test set cut errors in the Shopify try-on app from 8 in 30 try-ons to zero.
  • During the pilot a small group uses the agent on real work, and a person approves each action it proposes.
  • A rollback plan that lets your team switch back to the manual process exists before launch day.

Why does an AI agent need more testing than a chatbot?

A chatbot that gives a weak answer wastes a minute. An agent goes further: it creates the order, sends the message to the customer or updates the record. A wrong step lands in your ERP, your CRM or a customer's inbox, and somebody has to find it and clean it up.

An agent also fails in a different way from ordinary software. A script with fixed rules breaks loudly when a screen or a file format changes. A language model reads the input and decides, so it can be confidently wrong on a case it has never seen. You cannot test that by clicking through a demo. You test it by running the agent on many real cases and counting the misses, then by limiting what it may do on its own until the numbers earn it more freedom.

That is why we test in stages. Each stage answers one question, and the agent moves closer to live customer data only after it passes the stage before.

Test on your real samples before anything is built

The first test happens before the quote. In the AI Payback Audit we hold sessions with the people who do the work and read real emails, documents, tickets and exports. In the second week a senior engineer checks feasibility on your samples, and we run a small test on your data.

This changes what the quote means. The accuracy estimate comes from your own messy inputs, not from a clean example a vendor picked. The quote then fixes the scope and an accuracy target measured on an agreed test set. If the target cannot be reached on that set, we say so before the build, and the Audit report shows the options.

Note

Samples can be anonymised before you share them. Access and sample data are agreed with your IT and covered by your NDA and DPA.

Score every version on a fixed question set

In the first week of the build we turn your past cases into an evaluation set of 50 to 200 real cases. Your team confirms the correct answer for each one, because the people who do the work know what right looks like. In the second week the first version runs on that set in a test environment, and you get the first accuracy number and a list of the cases it gets wrong.

From then on the work follows the failure list. Each fix is checked on the whole set, not only on the case that was broken, so a fix in one place cannot quietly break another. The build moves on when the target agreed in the quote is met on the test set.

Why the set has to stay fixed

A score only means something when you compare it with the score before. If the questions change between runs, you cannot tell whether the agent improved or the test got easier. A fixed set lets you compare two prompts, two models or two versions of the same agent on equal terms. New cases can join the set later, as a new version of it, so old and new scores stay comparable.

Use the same set to choose the model

The model is a choice you can test, not a guess. For ThreadPlusAI, a WhatsApp AI SaaS for online stores, we chose the next language model through a LangSmith test of six models on a 50 question set built from real support questions. The recommended model averaged about 3.5 seconds per answer.

For Shopify App, a virtual try-on app on Shopify, a validator checks each generated image, and each model or prompt change goes through structured evaluation on a fixed test set before release. That process cut errors from 8 in 30 try-ons to zero and also lowered the cost per try-on.

Case studyE-commerceAI virtual try-on Shopify app running 7,200 try-ons a month8 to 0errors in 30 test try-ons after model evaluation
50questions in the set used to test six modelsThreadPlusAI
3.5 saverage answer time of the chosen modelThreadPlusAI
about 28%lower cost per try-on after model evaluationShopify App

Limit what the agent can do: approvals, access and undo

A good score on the test set does not mean the agent should act alone on day one. We build the limits into the agent itself, so the safe path is the default one:

  • Access: the agent gets the least rights the task needs, agreed with your IT.
  • Read first, then write: we connect your systems in that order, so reading is tested before any write exists.
  • Drafts, not silent writes: the agent prepares the order or the reply, and a person sees it before it counts.
  • Approval above your limit: actions above a risk level you set wait for a person.
  • Unsure cases: the agent sends them to a person with the reason attached.
  • Traces: each step the agent takes is visible, so a wrong result can be followed back to its cause.

Undo matters as much as approval. For a European AI SEO software provider for Shopify merchants, we built agents that rewrite product titles and descriptions across large catalogs. A supervisor dashboard summarizes each AI action, previews changes and lets the store owner roll back any update with one click. The owner can let the agent work at scale because a bad change costs one click, not an afternoon.

These controls are part of each build in our AI agent development work, not an extra you buy later. The number of approval steps is one of the things that sets the length of the sprint.

Write tests that block the actions that must never happen

Accuracy is an average. Some mistakes are not allowed even once: a customer's data sent to the wrong person, a refund above the limit, a confidential file in a shared export. Those rules need their own tests, separate from the evaluation set, and a release should not go out while one of them fails.

For a US cloud eDiscovery platform used by litigation firms, one privileged document leaked in an export could damage a case. We built export guardrails for privileged documents, with automated tests that make sure such documents never slip into an export. The lesson is a habit, not a tool: give the risky action a test of its own, and run that test again on each change.

In the fourth week of a sprint we also run a security review with prompt injection tests, where the inputs try to talk the agent into doing something it should not, and a load test at your volume, so the agent stays correct when many cases arrive at once.

Risk

A high accuracy score can hide the one action that must never happen. Give each such action a blocking test, and keep approval on until the tests and the pilot both show it is safe.

Run a pilot with a small group on live work

The pilot is the first time the agent sees live work, and it does so with a person watching. In a six week sprint it takes the fifth week:

  1. Pick the groupA few people from your team use the agent on their real work. You decide who approves actions during the pilot.
  2. Keep review onA person approves each action the agent proposes, so nothing reaches a customer unchecked.
  3. Check errors dailyWe look at the mistakes each day, fix them and add the hard cases to the test set.
  4. Write the pilot reportYou get the results of the pilot in writing before the agent goes to the whole team.
  5. Launch with a way backThe agent goes live in your cloud account, your people are trained, and a rollback plan exists before launch day.

The rollback plan is simple on purpose. If launch week brings a bad day, your team switches back to the manual process for a few hours while we fix the cause. Nobody has to improvise.

Keep testing after launch

Testing does not stop at launch, because your inputs change and models change. We measure the same numbers the Audit used and show them in one before and after table:

  • Hours on the process: time tracking or sessions on the same sample
  • Error rate: your ticket system or ERP export
  • Volume handled by the agent: agent logs
  • Accuracy on live cases: the evaluation set and traces, each month
  • Monthly running cost: cloud and model invoices

If the result is below the estimate, the report says so and shows what we change. With AI Ops after launch, evals run on new live cases, and new model versions go live only after they pass your evaluation set. AI Ops starts from 2,000 EUR a month. You can also run this yourself: you own the code, prompts and evaluation sets.

If you are comparing vendors, ask each one how they test accuracy before launch and what the target is. That question and the others worth asking are in our checklist for choosing an AI agent development company. The full week by week plan we follow is on how a fixed price AI project runs.

AI agent buildFrom 10,000 EURA fixed price for the agreed scope, quoted after the AI Payback Audit, with an evaluation set from your real cases and the accuracy result before launch.

Questions about testing an AI agent

How many test cases does an AI agent need?

Our sprints build an evaluation set of 50 to 200 real cases, with the correct answer confirmed by your team. Each extra language needs its own test cases, so a multilingual agent needs a larger set.

Can we test an AI agent without sharing customer data?

Yes, to a large degree. Samples can be anonymised before you share them, access uses the least rights the task needs, and data access is agreed with your IT under your NDA and DPA.

What happens if the agent cannot reach the accuracy target?

The Audit tests your real samples before the quote. If the target cannot be reached on the agreed test set, we say so before the build, and the Audit report shows the options.

Who owns the test set when the project ends?

You do. You own the code, prompts and evaluation sets, and the IP passes to you as each milestone is paid, so your team can keep running the tests without us.

Related posts

Before you go

Get a free estimate of your AI project's cost

Leave your contact details and we'll reply by email with a starting price and timeline, no call required to see it.

We reply by email only. No spam, no sharing your details with third parties.