Lesson 4 of 4 Monitoring and Tuning AI Solutions

Tuning Agents with AI-Based Tools

This lesson explains AI-based tools for finding issues and a disciplined tuning cycle.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify AI-based analysis tools in Copilot Studio and Foundry.
  • Describe the levers available for tuning.
  • Explain a measured tuning cycle.

AI-based analysis tools

Several Microsoft tools use AI to analyse agent behaviour at a scale people cannot match. In Copilot Studio, themes cluster user questions, the AI summary of analytics highlights notable changes, and the customer comments summary (preview) condenses free-text feedback. Agent evaluation (preview) runs test conversations, which can be generated with AI, and scores the agent's responses for general quality. In Microsoft Foundry, AI-assisted evaluators score groundedness, relevance, coherence, task adherence, tool call accuracy and safety; continuous evaluation applies them to sampled production traffic; the AI Red Teaming Agent probes an agent with attacks and reports the attack success rate; and the agent optimizer (preview) proposes improvements to an agent.

These tools are aids, not judges. AI-assisted evaluators can be wrong, and their scores should be calibrated against human judgement on a sample before they drive decisions.

What can be tuned

Tuning means changing the component that causes an issue. The following list describes the main tuning levers, roughly in order of cost.

  • Instructions and descriptions: clarify scope, steps and the descriptions that guide generative orchestration.
  • Knowledge: add missing content, remove outdated or conflicting content, improve metadata and chunking.
  • Topics and flows: handle common variations, add validation, fix defects.
  • Tools: improve input descriptions, return clearer errors, narrow permissions.
  • Model choice: move steps to a smaller or larger model, or use model router.
  • Fine-tuning: train a custom model when prompting and grounding have reached their limits.

A disciplined tuning cycle

Tuning can make things worse if it is not measured. A disciplined cycle keeps a fixed evaluation set of representative and difficult conversations, measures the baseline, changes one lever at a time, re-runs the evaluation and compares, and deploys only changes that improve the target metric without degrading guardrail metrics such as safety and groundedness. The following table shows how AI-based tools support each step.

StepAI-based support
Find issuesThemes, AI summaries, comment summaries, continuous evaluation alerts
Build test casesAI-generated test conversations in agent evaluation
MeasureAI-assisted evaluators for quality and safety
Probe for weaknessesAI Red Teaming Agent
Propose changesAgent optimizer (preview), Copilot suggestions for instructions
Worked example

Tuning a product agent

A manufacturer's Foundry product agent receives complaints about wrong answers on accessories. Continuous evaluation shows low groundedness for accessory questions only. The team proposes fine-tuning the model on accessory data. What should you recommend?

Low groundedness limited to one subject points to the knowledge for that subject, not to the model. The recommendation is to inspect the accessory content and retrieval with the evaluation results: check whether accessory documents are indexed, current and enriched with product metadata, and fix the content and chunking. An evaluation set of accessory questions measures the effect of each change. Fine-tuning would not fix missing or poor retrieval and would add cost and maintenance.

Check yourself

Why should AI-assisted evaluator scores be calibrated against human judgement?

Show answer

AI evaluators can be wrong, so their scores should be checked on a sample before they drive decisions.

Exam Tips

Remember for the exam

  • Copilot Studio themes, AI summaries and comment summaries reveal patterns; agent evaluation is preview.
  • Foundry evaluators, continuous evaluation, the AI Red Teaming Agent and agent optimizer support tuning.
  • Tune the cheapest lever that addresses the cause: instructions, knowledge, topics, tools, model, then fine-tuning.
  • Calibrate AI-assisted evaluators against human judgement; change one lever at a time.