By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Cookie Policy for more information.

How to Evaluate an AI Agent Before Production: 8 Steps

Evaluate an AI agent before production with 8 steps and a 5-metric checklist: groundedness, task completion, tool-call accuracy, safety and cost.

How to Evaluate an AI Agent Before Production: 8 Steps
share on

TL;DR: To evaluate an AI agent before production, write down what good looks like, build a test set from real tasks, then score five things: groundedness, task completion, tool-call accuracy, safety and cost. Layer code checks, AI judges and expert review, set a pass bar for each, and keep scoring live traffic after launch.

Most teams can see their agents. Far fewer can prove their agents are right. At Microsoft Ignite 2026, the Microsoft Foundry team cited a LangChain survey of 1,340 practitioners: 89% have some agent observability, but only 52% run offline evaluations on test sets and 37% evaluate live traffic. The same session quoted a Gartner forecast that more than 40% of agentic AI projects will be canceled by the end of 2027.

This guide shows you how to evaluate an AI agent with the tools you already license, and gives you a checklist you can reuse for every agent you ship.

AI agent evaluation is the practice of scoring an agent's answers and actions against a written definition of good, using repeatable tests, so you can decide with evidence whether it is ready for users. It answers a different question from monitoring. Monitoring asks "Is it up?" Evaluation asks "Is it right?"

Who is this guide for, and what will you have at the end?

This guide is for IT leaders, Copilot Studio and Microsoft Foundry platform owners, and the business owners who sign off on agents. By the end you will have a written quality bar, a test set, scores on five dimensions, a release gate and a plan to keep scoring after launch.

It works for agents built in Microsoft Copilot Studio, Microsoft Foundry or any framework you trace with OpenTelemetry. If your agent estate doubled while your controls didn't, evaluation is the control that tells you which agents deserve to stay.

What metrics should you use for agent quality?

Use five metrics: groundedness, task completion, tool-call accuracy, safety and cost. Each has a built-in evaluator in Microsoft Foundry or Copilot Studio, so you rarely need to build scoring from scratch.

Swipe horizontally to see each metric, its evaluator and a starting pass bar.

The 2toLead Agent Release Checklist: five metrics to score before an AI agent goes to production
MetricQuestion it answersMicrosoft evaluatorsStarting pass barLayer
GroundednessIs every claim supported by the sources the agent retrieved?Groundedness (Foundry); Quality test method (Copilot Studio)4 or higher on a 1-5 scale, with zero invented policy or pricing factsAI judge, plus expert spot checks
Task completionDid the agent finish the job and follow its instructions?Task Completion, Task Adherence, Intent Resolution (Foundry)85% or higher pass rate on the test setAI judge
Tool-call accuracyDid it call the right tool, with the right inputs, and use the result?Tool Call Accuracy, Tool Selection, Tool Input Accuracy, Tool Output Utilization (Foundry)100% on tools that write, send or delete; 95% on read-only toolsCode checks first, then AI judge
SafetyCan it be pushed into harmful content, data leaks or forbidden actions?Risk and safety evaluators, AI Red Teaming Agent (Foundry); four safety evaluators (Copilot Studio)Zero high-severity defects; attack success rate tracked and fallingAutomated scans, plus human red team for high-risk agents
CostWhat does one completed task cost in tokens and Copilot Credits?Token usage per run in evaluation results; Fleet cost (Foundry, preview)A cost per completed task the sponsor has approvedCode checks

The Agent Release Checklist. Source: 2toLead, mapped to Microsoft Foundry and Copilot Studio evaluators on Microsoft Learn, December 2026. Pass bars are 2toLead starting points; tune them to your risk.

The 85% bar comes from Microsoft's own example of an acceptance threshold for task adherence. Tighten every bar for agents that act on money, health or personal data.

What do you need before you evaluate an AI agent?

You need an agent with a named owner, a place to run evaluations, tracing switched on and a business sponsor who will sign the pass bars.

Swipe horizontally to see each prerequisite and why it matters.

Prerequisites for evaluating an AI agent before production
PrerequisiteWhat you needWhy it matters
Owner and sponsorA technical owner and a business sponsor recorded for the agent, ideally in Microsoft Agent 365Someone has to define good and accept the risk that remains
Evaluation toolCopilot Studio agent evaluation, or a Microsoft Foundry project with the Foundry User role and a judge model deploymentBuilt-in evaluators save weeks of custom scoring
TracingAutomatic tracing for Foundry agents, or the Microsoft OpenTelemetry distribution for external agents, sent to Application InsightsYou can't score a tool call you can't see
Test environmentA test copy of each knowledge source and tool, with test accountsEvaluations run as a real user and can call real tools
BudgetTokens or Copilot Credits for the judge model and test runsEvaluation runs cost money, so plan for them

How do you test an AI agent before production?

Test an AI agent in eight steps: define good, build a test set, trace, then layer code checks, AI judges, safety scans and expert review before you set a release gate. Plan one to two weeks for a first agent.

  1. Write down what good looks like. With the sponsor, list the three to five jobs the agent must do, the actions it must never take and a pass bar for each metric in the checklist. Expected result: A one-page quality definition the sponsor has signed.
  2. Build a test set from real tasks. In Copilot Studio, open your agent's Evaluation page and create a test set: write questions, generate them from the agent's instructions and knowledge, or reuse test chat conversations. In Foundry, upload a JSONL dataset, generate a synthetic one, or convert real traces into one. Include edge cases and multi-turn conversations. Expected result: A versioned test set the whole team reuses on every change.
  3. Turn on tracing. Foundry agents trace automatically. For agents built elsewhere, add the Microsoft OpenTelemetry distribution and send traces to Application Insights. Expected result: Every run shows each step, tool call and token count.
  4. Run code checks for anything a machine can verify. Check that the agent called the right tool with the right ID and that every response matches the required schema. Expected result: A pass or fail on each objective rule, with no judge model needed.
  5. Run AI judges for quality. In Foundry, select Groundedness, Task Completion, Task Adherence, Intent Resolution and Tool Call Accuracy, or the Output Quality and Tool Use Quality composite evaluators, which score several dimensions in one judge call. Microsoft recommends a rubric evaluator built from your agent's instructions as the primary measure. In Copilot Studio, use the Quality, Similarity or Text match test methods. Expected result: A score and a written reason for every test case.
  6. Probe for safety. Run the four safety evaluators in Copilot Studio, or Foundry's risk and safety evaluators, including Prohibited actions and Sensitive data leakage for agents. Then run the AI Red Teaming Agent, which simulates adversarial users and reports an attack success rate. Expected result: A safety scorecard with every high-severity finding fixed or accepted in writing.
  7. Add expert review where stakes are high. Ask two subject experts to score a sample of conversations against a rubric, especially regulated replies and anything the AI judges disagree on. Foundry Annotations, in preview, records their verdicts on traces. Expected result: Expert agreement with the automated scores, or a list of rubric fixes.
  8. Set a release gate and compare to a baseline. Save the run as the baseline, then rerun the same test set on every change. Automate it with Foundry evaluations in GitHub Actions or Azure DevOps, or with the Copilot Studio REST API or connector in Power Automate. Expected result: No version reaches users unless every metric meets its bar.

For step 8, pair the gate with Power Platform pipelines so a failed evaluation stops a Copilot Studio deployment, not just a report.

How do you keep evaluating an AI agent after it goes live?

Keep evaluating by scoring a sample of live traffic, rerunning your test set on a schedule and red teaming again after every model change. Microsoft frames this as three stages: build, production and scale.

  • Build: Can I see it and measure it? Tracing and a test set, as above.
  • Production: Is it right, and is it getting better? Continuous evaluation scores sampled live conversations, and Foundry Insights, now generally available, finds patterns across traces that nobody thought to test.
  • Scale: How is every agent doing? Fleet overview, in preview, shows health, quality and cost for every agent in one view.

Each finding becomes a new test case, and each better version becomes the new baseline. Users, data and models keep changing, so an agent that passed in December can drift by March.

Evaluation tells you whether an agent works, not whether it is governed. Run it alongside our AI agent governance checklist so quality and control are reviewed together.

What are the most common agent evaluation mistakes?

The most common mistake is testing only the final answer and never the actions. An agent can give a polite, fluent reply after calling the wrong tool.

  • Testing in the chat pane only. One-off chats can't be repeated. Save them into a test set.
  • Using only easy questions. Add out-of-scope, ambiguous and adversarial prompts, plus questions the agent should decline.
  • Trusting the judge blindly. Have experts score a sample and fix the rubric where they disagree.
  • Ignoring cost until the invoice. Track tokens per completed task from the first run.
  • Running one test as one user. Copilot Studio evaluations run as the signed-in user, so test with each role that sees different data.
  • Stopping at launch. Without continuous evaluation, drift shows up as user complaints first.

Indirect prompt injection hides in documents and email, so read our guide to defending Copilot and Copilot Studio agents from prompt injection before you write your safety test cases.

How do you know your evaluation is working?

Your evaluation works when it catches a bad change before users do. Test it on purpose: break something and see whether the gate fails.

  • Remove a key instruction or knowledge source and rerun. Task completion or groundedness should drop below the bar.
  • Swap a tool's parameter name. Tool-call accuracy should fail.
  • Check that two experts agree with the AI judge on most sampled cases.

How do you measure the value of agent evaluation?

Measure value as incidents avoided, review hours saved and cost per completed task. Report the pass rate and cost per task next to adoption.

Microsoft showed a real result at Ignite. Tata Consultancy Services used Foundry evaluation and optimization on an Azure Kubernetes Service diagnosis agent. Tokens per diagnosis fell 66%, from 275,119 to 94,000, and the overall evaluation score rose from 85% to 100%.

Here is a 2toLead illustrative model; swap in your own numbers. A 3,000-person professional services firm launches an HR policy agent without evaluation. Two weeks in, it gives wrong leave-policy answers. Pulling, fixing and relaunching it takes about 120 hours across IT, HR and legal: $14,400 at a loaded $120 an hour.

A two-week evaluation for the same agent takes about 40 hours to define good, build 150 test cases and run the first rounds: $4,800. After that, automated reruns take an hour per release. Spending a third of the cost of one incident buys a gate that runs on every change.

Link evaluation cost to your wider FinOps plan for Copilot Credits, since judge models and test runs bill too.

An agent that can't show its scores isn't ready for your users. Test it like a new hire, then keep reviewing it like one.

What do IT leaders ask about evaluating AI agents?

How many test cases does an AI agent need before production?

Enough to cover every job, edge case and forbidden action in your quality definition. In 2toLead's practice, 100 to 200 cases is a sound start for a single-purpose agent. Microsoft recommends multiple diverse queries and repeating each query to catch inconsistent behavior.

Can I evaluate a Copilot Studio agent without Microsoft Foundry?

Yes. Copilot Studio has built-in agent evaluation with test sets, Text match, Similarity and Quality test methods, and four safety evaluators. You can run it from the Evaluation page, the Power Platform REST API or a Power Automate connector.

What is the difference between agent evaluation and observability?

Observability shows what happened: errors, latency, tokens and traces. Evaluation judges whether what happened was right: the right tool, the right answer, within policy. You need both, and evaluation depends on tracing.

Who should own AI agent evaluation?

The business sponsor owns the definition of good and the pass bars. The technical owner runs the tests and fixes failures. Risk teams own the safety bar.

How can 2toLead help?

2toLead helps organizations in healthcare, financial services, education, nonprofit and government put agents into production with evidence, not hope. Evaluation only sticks inside a wider agent governance operating model. Our Microsoft MVP team can:

  • Write the quality definition and pass bars with your sponsor
  • Build and version a test set for one priority agent
  • Configure Copilot Studio or Foundry evaluators, safety scans and tracing
  • Wire the release gate into your deployment pipeline
  • Hand you a dashboard for quality, safety and cost per task

For the full setup steps, read Microsoft's guide to evaluating your AI agents in Microsoft Foundry.

For the month's other agent changes, see our Agent Intelligence Newsletter for November 2026.

Find more practical guidance on the 2toLead Insights hub, or book a discovery call.

No hype. Just practical, governed AI that actually gets adopted.

Similar posts

Get our perspectives on the latest developments in technology and business.
AI Agents

Working on AI agents?

Agent ideas everywhere, nothing in production? Three ways we help:

  • Agent in a Day
  • Agent Use-Case Sprint
  • Agent Pilot to Production
Book a 30-minute call
Client result
~50 rules

A regulated health system turned its legal contract playbook into a governed Copilot agent that reviews real contracts every day.

Read the case study →
Secure AI Governance

Working on Copilot governance?

Copilot can surface what people shouldn't see. Three ways we help:

  • Copilot Readiness Accelerator
  • AI Governance Assessment
  • Agent PMO Setup
Book a 30-minute call
Client result
~8 weeks

A professional organization built a Purview-based foundation for secure AI adoption with 2toLead.

Read the case study →
Next steps
Have a question, or just say hi. 🖐 Let's talk about your next big project.
Contact us
Mailing list
Occasionally we like to send clients and friends curated articles that have helped us improve.
Close Modal