Skip to content
BotGigs

No card required to start. Already signed up? Sign in.

blog / automation

How to Evaluate an AI Agent Before You Ship It

July 21, 2026 · 9 min read · by the BotGigs team

Hire brief generator

hire
stack

That was the one free brief for this browser.

To hire for the job, put it on the public BotGigs job board: $99 a month on Growth, applications from specialists who apply reach your inbox, cancel any time. The board is new, so applications are not guaranteed.

Post a job, $99 a month

for a different task

Best-effort estimate, not a quote or a match

We could not scope your task just now, so this is an example brief for a different automation, shown so you can see the format. Your free brief has not been used: try again in a minute.

scope of work

who to hire

Screen for

Effort estimate

questions to ask your hire

Like the brief? Post the job on the board so specialists can apply.

You evaluate an AI agent before shipping it by building a fixed test set of real tasks with known-good answers, running the agent against it on every change, and measuring task success, not vibes. A demo that works three times tells you nothing about the tenth thousand request. The teams whose agents survive production treat evaluation as an engineering discipline: a graded set of representative cases, a clear pass threshold, and adversarial tests for the ways an agent fails quietly. This guide covers what to measure, how to build the test set, and the failure modes a happy-path demo hides.

Most agent projects die the same way. The prototype dazzles in a meeting, it ships, and then real users feed it inputs nobody tried, it confidently makes things up, and trust evaporates in a week. The fix is not a better model. It is knowing, before launch, how often the agent actually gets the job done and where it breaks. That knowledge comes from evaluation.

Why a demo is not an evaluation

A demo is a curated success. You pick the inputs, you know the answer, and you stop when it works. An evaluation is the opposite: a fixed, representative set of tasks you did not cherry-pick, scored the same way every time so you can compare versions honestly. The difference matters because language models are non-deterministic and sensitive to phrasing. An agent that answers one version of a question perfectly can fail a slight rewording, and you will never see it if you only ever test the version you wrote.

The goal of evaluation is a number you trust: on a set of tasks that look like real usage, this agent succeeds X percent of the time. Once you have that number, every change to the prompt, the model or the tools can be measured against it instead of argued about.

What to actually measure

Accuracy is the headline, but a useful evaluation tracks several dimensions, because an agent can be right and still unusable. These are the ones that predict whether an agent survives production.

Dimension Question it answers Why it matters
Task success Did it complete the job correctly? The one metric that maps to business value
Faithfulness Is the answer grounded in real sources? Catches confident hallucination
Tool correctness Did it call the right tool with the right inputs? Wrong tool calls cause real-world damage
Refusal and escalation Does it hand off when it should not answer? A safe "I don't know" beats a wrong answer
Cost and latency How much per task, and how fast? A correct agent nobody waits for still fails

Faithfulness deserves special attention for anything that retrieves information. An agent that pulls the wrong document and answers fluently from it is more dangerous than one that clearly says it cannot find the answer. Much of an agent's real-world accuracy comes down to retrieval quality, the same problem that good enterprise search over your internal knowledge is built to solve, so measure whether the agent found the right source before you measure whether it wrote a good answer.

How to build the test set

The test set is the whole game, and it does not need to be large to be useful. Fifty to a few hundred well-chosen cases beat thousands of random ones. Build it like this:

  • Pull real examples, not invented ones. Mine actual user requests, support tickets or historical tasks so the set reflects how people really phrase things.
  • Write the known-good answer for each. This is the labor, and it is where domain experts earn their keep. Without a reference answer you cannot grade automatically. At a few hundred cases you write them yourself; past a few thousand this becomes a real budget line, and data annotation services price expert judgment work by the hour rather than per item.
  • Cover the edge cases on purpose. Include the ambiguous request, the out-of-scope question, the input with a typo, the case where the right answer is "I can't help with that."
  • Include adversarial cases. Add inputs designed to trick the agent into ignoring its instructions or leaking data, so you measure resistance, not just competence.
  • Freeze it. Once the set exists, do not quietly edit it to make a bad version look good. A fixed set is what lets you compare across changes.

Grading can be a mix. Exact-match works for structured outputs, a rubric works for open text, and an LLM-as-judge, one model scoring another's answer against the reference, scales the middle, as long as you spot-check the judge against human grades so you trust it.

The failure modes a happy-path demo hides

Evaluation exists to surface the failures you would otherwise ship. The recurring ones:

  • Confident hallucination. The agent invents a plausible answer rather than admitting uncertainty. Only a faithfulness check against sources catches it.
  • Silent tool errors. The agent calls the wrong tool or the right tool with bad arguments, and narrates success anyway. Tool-correctness scoring is the only way to see it.
  • Brittleness to phrasing. Small rewordings flip a right answer to wrong. A test set with paraphrased variants exposes it.
  • Prompt injection. Hidden instructions in a retrieved document redirect the agent. Adversarial cases measure resistance before an attacker does.

That last one is why evaluation and security overlap. An agent that can take real actions needs both a success score and a resistance score, a theme we cover in AI agent security and guardrails.

How to test an AI app before shipping

Test an AI app before shipping by running it against a fixed set of 50 to 200 real tasks with known correct outcomes, scoring task success rather than whether the output reads well, and setting a pass threshold you agreed before you saw the results. Re-run that set on every prompt, model or tool change. A demo proves the happy path works once, which is not evidence of anything. If you bring in outside help to fix the prompts, make this set the brief: the specialists worth paying on our hire prompt engineers page are the ones who return a before and after score on it, not just new wording.

The practical difference between testing an AI app and testing ordinary software is that the same input can produce a different output twice, so a single pass tells you very little. Run the set repeatedly and look at the distribution: an agent that succeeds 95 percent of the time on one run and 78 percent on the next has a consistency problem that a single green test run would have hidden completely. Include the awkward inputs deliberately, because real users supply them within the first day.

Three checks belong in every pre-ship run regardless of what the app does. Does it refuse cleanly when it should, instead of inventing an answer? Does it stay inside its instructions when a user tries to talk it out of them? And does every factual claim trace back to a source you supplied? Those three catch most of what reaches production and embarrasses people.

The test set also settles platform arguments. If you are choosing between a hosted builder and a custom agent, score both on the same tasks and then price them on the same unit: a support chat on Voiceflow pricing runs about $0.05 on Haiku and $0.11 on Sonnet, while a Tidio Lyro conversation is $0.70 or more, which is why stores comparing Tidio alternatives should look at resolution rate before sticker price.

Make evaluation part of the build, not an afterthought

The cheapest time to build a test set is while the agent is being built, because the person building it already knows the edge cases. Ask for it as a deliverable: an evaluation set, a pass threshold and a report showing the agent clears it. That single requirement separates a specialist from someone who ships a demo and hopes. It is one of the questions to ask before hiring an AI development company, and it is exactly what a builder expects to be asked.

How many test cases you need before the pass rate means anything

A pass rate is only as precise as the test set is large, and most teams sign off on far too few cases. If an agent passes 90 percent of a 50 case set, the 95 percent confidence interval on its real success rate is roughly plus or minus 8 points, so the true figure could be 82 or 98. Those are two different products. The margin shrinks with the square root of the sample, which is why going from 50 cases to 200 halves it and going from 200 to 1,000 only halves it again.

Graded test cases Margin of error at a 90 percent pass rate What you can honestly claim
50 about 8.3 points Works or does not work, nothing finer
100 about 5.9 points Good enough to compare two very different builds
200 about 4.2 points A reasonable floor for a launch decision
400 about 2.9 points Enough to see a regression of a few points between releases
1,000 about 1.9 points Enough to hold a vendor to a number in a contract

The figures are the standard normal approximation, 1.96 times the square root of p times (1 minus p) over n, at p equal to 0.9. They assume the cases are independent and drawn from real traffic. A set of 200 paraphrases of the same ten questions behaves like a set of ten.

A clean run needs the same caution. When an agent passes every case, the rule of three gives the ceiling: with zero failures in n trials, the true failure rate can still be as high as 3 divided by n at 95 percent confidence. One hundred clean passes rules out a failure rate above 3 percent and nothing tighter. If a wrong answer costs you a refund, a compliance finding or a lost account, and you need to be confident the rate is under 1 percent, you need about 300 clean cases on that specific failure, not a hundred mixed ones.

What to put in the contract when someone else builds the agent

If you are paying a developer or an agency for the build, evaluation stops being a habit and becomes an acceptance clause. A statement of work that says "the agent will answer customer questions accurately" is unenforceable. One that names the test set, the metric, the threshold and who runs it can be signed off or rejected in an afternoon. These are the five lines worth negotiating before the first invoice.

Clause What it should say What goes wrong without it
Test set ownership You supply or approve the cases, and you keep a held-back portion the builder never sees The agent is tuned to the exam and fails on the first real week
Pass threshold A number per metric, measured on the held-back cases, with the sample size stated "Meets expectations" turns into a negotiation at handover
Critical failures A short list of outputs that fail the release on a single occurrence, such as an invented policy or a leaked record A 95 percent average hides the one answer that gets you sued
Regression runs The full set is re-run on every model, prompt or tool change, and the report is a deliverable A provider model update quietly drops quality and nobody notices
Handover The cases, the graders and the scripts transfer to you with the code You cannot verify the next vendor, or the same one, six months later

Builders who work this way already will not push back on any of it. Pushback on the held-back set in particular is the clearest early signal you will get. When you hire AI engineers for an agent that touches customers, ask to see an evaluation report from a previous build before you ask about rates, and if the work is going to a firm rather than a person, the same clauses belong in the proposal from any AI agent development company you shortlist. Teams that are still deciding whether the idea is worth a full build can attach the same clauses to a fixed-scope AI proof of concept, where a small graded set is the whole point of the exercise.

The bottom line

Do not ship an agent because it worked in a demo. Ship it because it passed a fixed set of real tasks with a success rate you can live with, including the edge cases and the attacks. Build the test set from real usage, measure task success and faithfulness rather than impressions, and re-run it on every change. If you want that discipline built in from day one, describe your agent in the hire-brief demo and post the job for a generative AI developer who treats evaluation as part of the job.

Keep reading

Get started

Put this into practice.

Describe your automation in the free demo, get a scoped hire brief, and create your account to post the job.

No card required to start.

BotGigs is a new board. Listed today: 2 screened specialists, 0 agents in the library and 0 open jobs on the board. A job post does not guarantee applications.