AskHandle Blog

How to Evaluate an AI Agent Before and After Launch

2026-11-04Nina Kimes10 min read
  • AI Agent
  • AI Evaluation
  • AI Oversight

An AI agent can perform well in ten carefully selected tests and still struggle when real customers begin using it. The problem is not necessarily the model. Often, the test cases are too simple, the expected behavior is poorly defined, or the evaluation does not reflect how customers actually communicate.

Evaluating an AI agent means establishing whether it can reliably complete the job it was designed to do, including situations that are ambiguous, unexpected, or outside its authority. That takes more than testing a few prompts and deciding that the responses sound helpful. It requires realistic examples, clear scoring criteria, checks on the underlying actions, and a process for learning from failures after launch.

The objective is not to produce a single, universal AI quality score. It is to build evidence that a particular customer-facing process works as intended and continues to work as the system changes.

Start with the job the AI agent is responsible for

Evaluate a specific customer task rather than trying to score the entire AI agent in one exercise. Booking an appointment, qualifying a sales inquiry, retrieving an order status, processing a cancellation request, and transferring a complex issue to a human agent all require different behavior. Each has its own success criteria, information sources, boundaries, and potential failures.

Consider an order-status inquiry. A successful interaction may require retrieving the current status from an authoritative system and explaining it clearly without inventing delivery details. A refund request has additional requirements: the agent may need to check the relevant policy, verify account or order state, recognize what actions it is permitted to take, and escalate when authorization is missing.

A general score can conceal these differences. An agent could be excellent at explaining policies while repeatedly making mistakes in actions that change a customer's booking. Define success for each important job first, then evaluate the behavior required to complete it.

Define measurable evaluation criteria before testing

Before running test conversations, create a scoring rubric. The rubric should describe observable results that reviewers or automated checks can assess consistently. Depending on the task, useful criteria include whether the agent understood the intent, selected the correct source, retrieved the necessary evidence, provided a factually supported answer, followed policy, chose the right action, supplied valid action inputs, escalated appropriately, and stopped when the task was complete.

Avoid criteria such as “the answer looks good.” They are subjective, hard to compare across reviewers, and difficult to apply when testing a new version. Instead, specify what must happen for a case to pass.

For an appointment-booking interaction, a practical rubric might require all of the following:

  • The agent collects the required service, location, date, and customer details.
  • The proposed appointment uses valid availability from the correct source.
  • The booking action is submitted only once, with the correct information.
  • The agent confirms success only after the booking system reports success.
  • Unavailable times, missing details, and exceptions are handled or escalated appropriately.

This rubric evaluates actual behavior rather than presentation alone. A friendly confirmation is not a successful booking if the underlying system never recorded an appointment.

Build a test set that resembles real customer conversations

An evaluation dataset, often called an eval set, is a collection of cases used to test expected behavior. Its value depends less on how polished the examples are and more on how well they represent the requests the agent will receive.

Start with sources that reflect actual customer demand: support tickets, chat transcripts, WhatsApp conversations, help-center searches, FAQs, support-team observations, and examples from subject-matter experts. If real conversations are used, handle personal information responsibly and remove or protect sensitive details as appropriate.

For example, a basic appointment-booking test might say:

“Book an appointment for Friday at 2 PM.”

That is useful, but it does not tell you whether the agent can manage less structured requests. Include cases such as “Can I come sometime Friday afternoon?”, “Do you have anything after work?”, “Same appointment as last time, but next Tuesday,” and “Can you move the one I already have?” These are ordinary customer messages, yet they require clarification, context awareness, or a different action.

Include both straightforward and multi-turn conversations. A realistic test should sometimes allow the customer to correct a date, change their mind, ask a related question, or refer to information mentioned earlier. The agent must maintain the right context without assuming details that were never provided.

Test difficult cases before customers encounter them

Common requests are only part of the evaluation. Customer conversations can also be incomplete, contradictory, multilingual, out of scope, or sensitive to company policy. Deliberately include cases that put pressure on the agent's decision-making and boundaries.

SituationExampleExpected behavior to assess
Ambiguous reference“Can you change it?”Clarifies what should be changed rather than guessing.
Missing information“Book me for tomorrow.”Requests the necessary service or location details.
Conflicting sourcesTwo approved sources disagree about a policy.Applies the defined source priority or escalates the conflict.
Topic changeA booking conversation switches to billing.Recognizes the new intent and routes or responds appropriately.
Repeated requestThe customer repeats an answered question.Responds consistently without taking a duplicate action.
Out-of-scope requestThe customer asks for an unsupported task.Explains the limitation and uses the approved alternative.
Adversarial instructionThe customer asks the agent to ignore policy.Preserves its instructions and authority boundaries.

These should be realistic stress tests, not elaborate puzzles unrelated to the actual use case. Their purpose is to expose mistakes before those mistakes affect customers.

Inspect the process, not only the final response

A plausible-looking final message can hide a serious failure. An agent may give the correct answer after consulting the wrong data source, meaning the same interaction could fail when the data changes. It may also say an appointment is confirmed even though a scheduling tool returned an error.

For multi-step tasks, review what happened along the way: intent routing, retrieval, source selection, tool selection, action inputs, external system results, human handoff, and stopping conditions. Where logs and test tooling permit, evaluate both the customer-visible result and the actual sequence of system events.

This distinction is especially important when the agent performs actions rather than only presenting information. Successful language generation is not proof of a successful transaction.

Score expected behavior instead of exact wording

AI agents can express the same correct information in different ways. Requiring an identical sentence in every test makes evaluation unnecessarily brittle, unless an exact phrase is required for a specific legal, regulatory, or business reason.

For example, an overly rigid test might require the response to match “Your order will arrive Tuesday” word for word. A more useful test verifies that the agent retrieved the current order record, reported Tuesday as the delivery day only if the record supports it, did not invent a time, and did not describe the order as shipped if its status is pending.

In most cases, evaluate facts, actions, policy boundaries, and state changes rather than prose style. Tone and clarity can still be scored separately, but they should not substitute for correctness.

Establish a baseline and compare every meaningful change

Before optimizing the agent, run the current version against a consistent test set. Record pass rates by criterion, failure categories, the stage where each failure occurs, severe incidents, and patterns that appear repeatedly. This gives the team a baseline against which to judge improvements.

Then make the proposed change and rerun the relevant cases. A revised prompt may improve conversational tone while weakening policy adherence. A new model may handle complex requests better but interact differently with a tool. A new knowledge source may improve coverage while introducing conflicting information. Changes to routing may reduce unnecessary handoffs but misclassify some requests.

Without a baseline, these tradeoffs are difficult to see. A useful regression review asks which cases improved, which became worse, whether any critical behavior changed, and whether any new failure should block release. A change should earn its place in production by performing at least as well on the behaviors that matter most.

Combine automated evaluation with human review

Automated checks make it practical to run many cases repeatedly and compare versions consistently. They can verify structured outputs, tool calls, recorded actions, and a range of rubric criteria. Human reviewers are still valuable when assessing nuance, interpreting policies, deciding whether an escalation was appropriate, or investigating ambiguous failures.

Neither approach is sufficient on its own. Automated evaluators can misjudge a response, and human reviewers can disagree or gradually apply criteria differently. A stronger process uses automated scoring to identify potential failures and humans to review a representative sample, especially for high-impact cases.

When reviewers disagree, inspect the rubric itself. The problem may be an unclear expectation rather than the agent's behavior. Refine the criteria, calibrate the reviewers or evaluator, and rerun the tests. The evaluation process also needs quality control.

Turn production failures into reusable tests

Prelaunch evaluation cannot anticipate every situation. Once the agent is live, production conversations reveal language, context, and failure patterns that the original test set may have missed.

Suppose a customer writes, “Move the same booking to the day after,” and the agent misinterprets which booking or date the customer means. Fixing the isolated conversation is not enough. Capture the scenario, identify the expected behavior, and add it to the regression suite so that future changes can be checked against the same failure.

A practical feedback loop is straightforward:

  1. Identify a production failure or near miss.
  2. Record the relevant context and expected behavior, with sensitive details protected.
  3. Add the case to the evaluation dataset and assign a severity level.
  4. Update the appropriate flow, instruction, source, or integration.
  5. Rerun the affected tests and review the results before release.

Over time, the eval set becomes a useful record of the real conditions the system must handle. It should grow alongside the customer interactions it supports.

Evaluate after material changes and prioritize risk

Not every minor text edit calls for a complete evaluation cycle, but changes that affect system behavior deserve targeted regression testing. These include updates to prompts, models, knowledge sources, policies, routing rules, tools, integrations, and human-handoff logic. Run the relevant tests before release whenever practical, and monitor the corresponding behavior afterward.

Not all failures have the same consequences. Classify them by severity rather than relying on a blended pass rate.

SeverityTypical examplesRelease implication
Release blockerUnauthorized action, sensitive data exposure, serious policy violation, false confirmation of a high-impact actionResolve before deployment.
High priorityMaterially incorrect information, repeated routing errors, broken handoff in a common scenarioInvestigate and correct according to risk and frequency.
ImprovementExcessive verbosity, awkward tone, unnecessary clarification, minor inefficiencyTrack and improve without treating every issue as a blocker.

An agent can score well overall and still be unsafe for its intended use if the remaining failures involve high-impact actions. Severity, not just frequency, must inform the release decision.

Keep the evaluation dataset structured and maintainable

A simple dataset makes tests easier to rerun and failures easier to discuss across product, support, and engineering teams. It does not need to be complicated to be useful.

FieldWhat it records
Case IDA stable reference for the test.
Job or flowThe customer task being evaluated.
InputThe customer message or sequence of messages.
ContextRelevant prior conversation or system state.
Expected sourceThe authoritative information source, if applicable.
Expected actionThe tool or system action required, if any.
Expected outcomeObservable conditions for success.
Scoring rubricCriteria used to evaluate the result.
SeverityThe consequences of failure.
NotesEdge cases, known regressions, or reviewer context.

There is no universal minimum number of cases. A narrow task may need a relatively small set, while an agent handling multiple customer journeys may need far more. What matters is coverage of common requests, meaningful language variations, data paths, exceptions, policy boundaries, and previously observed regressions. A large dataset that misses the highest-risk scenarios offers less assurance than a smaller, carefully designed one.

Applying this process in AskHandle

In AskHandle, teams can test agent behavior before publishing and review conversations after launch. The Test Page, flow and node behavior, AI Response Oversight, and Analytics can support different parts of that process. These capabilities do not replace the need for a representative test set or clearly defined expectations for the business tasks being automated.

A practical approach is to configure the flow, test normal and difficult customer cases, publish when critical criteria pass, review production behavior, and add newly discovered failures to the regression set. When instructions, knowledge, routing, or integrations change, repeat the relevant evaluation before relying on the updated agent.

The aim is not to make every conversation identical. It is to ensure that customers receive correct information, supported actions behave as intended, and exceptional situations are handled within the right boundaries.

Make evaluation part of operating the AI agent

An AI agent is not thoroughly tested simply because a demonstration went well. Reliable evaluation means being able to rerun representative scenarios, inspect important decisions, compare versions, detect regressions, and learn from production incidents. Those practices turn evaluation from a one-time launch checklist into an ongoing operational discipline.

The most useful standard is simple: can the team demonstrate that the agent's critical behavior still works after the system changes? If the answer is supported by realistic tests and production evidence, the team has a stronger basis for deciding when to launch, improve, or expand the agent's responsibilities.

Frequently asked questions

What is an AI agent evaluation?

An AI agent evaluation is a structured assessment of whether an agent performs a defined task as expected. It tests representative inputs, information sources, decisions, actions, and outcomes against explicit criteria rather than judging responses only by how natural they sound.

How should you test an AI agent before launch?

Start by defining the task and success criteria, then build realistic cases from expected customer requests. Include ambiguous and high-risk situations, check the actions and sources behind the final response, and document failures against a consistent rubric before publishing.

How often should AI agents be evaluated?

Evaluate before launch, after material changes to prompts, models, knowledge, routing, policies, tools, or integrations, and continuously through production review. The scope of regression testing should reflect the impact and risk of each change.

Should AI agent evaluations use real customer conversations?

Yes, when appropriate and handled responsibly. Real conversations reveal wording, context, and failure patterns that synthetic examples can miss. Protect personal information and supplement production cases with expert-designed scenarios, including exceptions that have not yet occurred.

How many test cases does an AI agent need?

There is no fixed number that guarantees reliability. The test set should cover common tasks, language variations, system actions, edge cases, high-risk failures, and known regressions. Expand it as new behavior and production failures reveal gaps.

Free plan · 100 credits

Put your own knowledge to work in an AI agent.

  • Add your documents and data
  • Connect the nodes your business needs
  • Test the conversation, then go live

No credit card needed.