BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDeveloping AI Apps and Agents on Azure (AI-103)Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling
Lesson2,891 words

Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling

AI-103 › Unit 1: Plan and manage an Azure AI solution › Implement responsible AI across generative AI and agentic systems › Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling

Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling

Filters block content at runtime. Evaluation tells you whether the system was going to produce that content in the first place — and whether it still behaves the way it did last month. This objective is about the measurement side of responsible AI: which evaluator answers which question, when in the lifecycle you run it, and what an adversarial probe adds that a scored dataset cannot.

Why This Matters

Three ideas separate people who pass this objective from people who guess.

Evaluators are not interchangeable. Each answers one specific question, and the giveaway is what it needs as input. An evaluator that requires ground truth cannot be used where no reference answer exists. One that compares response to retrieved context is not measuring correctness against the world.

Safety measurement is not the same as safety filtering. A filter blocks the output that already exists. A safety evaluation or a red-team run tells you the propensity — how often, under what provocation, and in which category — before real users find out.

Instrumentation is lifecycle-shaped. The same evaluator means different things at model selection, in pre-production, and against live traffic. Post-production adds two modes people confuse constantly: continuous evaluation on sampled production traffic, and scheduled evaluation against a fixed dataset.

Two questions crack most items here

What input does this evaluator need? Ground truth, retrieved context, tool definitions, or nothing but the response. What does drift require? A fixed test dataset run on a schedule — sampled live traffic changes underneath you, so it cannot isolate the model as the variable.

Prerequisites

  • What an evaluator is: a scorer that takes a query, response, and possibly context or ground truth.
  • The difference between an AI-assisted evaluator (a judge model) and a computed metric.
  • That groundedness means supported by supplied context, not true in general.
  • Basic familiarity with tracing and Application Insights from the observability objective.

Learning Objectives

By the end of this lesson you will be able to:

  1. Select an evaluator from a stated requirement, using its required inputs as the discriminator.
  2. Distinguish Groundedness from Groundedness Pro, and know which needs no model deployment.
  3. Apply the agent evaluators to tool-using systems.
  4. Set evaluation_level correctly and respect the no-mixing rule.
  5. Choose between continuous and scheduled evaluation, and say when red teaming is the right instrument.

Building Blocks

The three lifecycle stages. Evaluation runs at base model selection (benchmarks and leaderboards to shortlist), pre-production (your own datasets, adversarial simulation, red teaming before release), and post-production (operational metrics, continuous evaluation, scheduled evaluation, scheduled red teaming, alerts).

Evaluator families.

FamilyAnswersNotable members
General purposeIs the response well-formed and on point?Coherence, Fluency, Relevance, Response Completeness
Textual similarityHow close to a reference?F1, BLEU, ROUGE, METEOR, GLEU, Similarity
RAGDid retrieval and grounding work?Retrieval, Document Retrieval, Groundedness, Groundedness Pro
Risk and safetyCould this cause harm?Violence, Sexual, Self-harm, Hate and unfairness, Indirect attack, Protected material, Code vulnerability, Ungrounded attributes
AgentDid the agent act correctly?Intent Resolution, Task Adherence, Task Completion, Task Navigation Efficiency, Tool Call Accuracy, Tool Selection, Tool Input Accuracy, Tool Output Utilization, Tool Call Success
Rubric (preview)Does it meet my written criteria?Rubric-based scoring
Azure OpenAI gradersCustom judging primitivesModel Labeler, String Checker, Text Similarity, Model Scorer

The two groundedness evaluators. Groundedness is AI-assisted, scores 1–5, and "requires a model deployment to act as a judge". Groundedness Pro (preview) is "powered by Azure AI Content Safety", returns a binary pass/fail with reasoning, and — the exam-relevant point — does not require a model deployment.

Document Retrieval versus Retrieval. Document Retrieval measures retrieval quality using ground truth labels — it needs a labelled reference set. Retrieval assesses "how well the retrieved chunks address the query" without one.

Evaluation level. evaluation_level accepts "turn" (the default — each exchange scored separately) or "conversation" (the thread as a whole). You cannot mix levels in a single run; a run is one level or the other.

AI Red Teaming Agent. Built on PyRIT, it "runs automated scans for content safety risks", "simulates adversarial probing", and produces scorecards over risk categories and attack strategies, so teams can measure risk before deployment. It can also be scheduled post-production.

Cluster analysis. Groups failing cases so you see the pattern rather than a list of individual low scores — the difference between "score fell 4%" and "this class of query fails".

Continuous, scheduled, and red teaming

Attribute
Input

Sampled production traffic

A fixed test dataset

Generated adversarial probes

Answers

How is the live system doing right now?

Has behaviour drifted?

What can be provoked out of it?

Controls the variable

No — traffic changes

Yes — inputs are held constant

By category and strategy

Built on

Evaluators over traces

Evaluators over a dataset

PyRIT

Deep Dive

Picking an evaluator by its inputs

The reliable way to choose is to ask what the evaluator must be handed.

Nothing but the response — Coherence, Fluency. Useful for form, silent about truth.

Response plus the query — Relevance, Response Completeness, Intent Resolution.

Response plus retrieved context — Groundedness, Groundedness Pro, Retrieval. These answer "is this supported by what we gave it", which is the only question a RAG stack can honestly ask without a reference set.

A reference answer — the similarity family, and Document Retrieval. If the scenario says no labelled data exists, these are eliminated immediately.

Tool definitions and the call trace — the agent family.

That last family repays a closer look, because its members are more finely divided than most people expect. Tool Selection asks whether the right tool was chosen; Tool Input Accuracy asks whether the arguments passed to it were correct; Tool Output Utilization asks whether the agent actually used what came back; Tool Call Success asks whether the call succeeded. An agent that picks the right tool, passes a malformed argument, and then ignores the error is failing three distinct evaluators — and a scenario describing exactly that behaviour is naming one of them.

Choosing an evaluator from a requirement

  1. 1

    Name the failure being described

    Wrong tool? Unsupported claim? Repetitive text? Ignored instruction?

Groundedness, Groundedness Pro, and the deployment constraint

Both evaluate the same property — is the response supported by the supplied context — and differ in mechanism and output.

Groundedness is AI-assisted. A judge model scores 1–5, giving a graded signal that suits tracking a number over time. It requires a model deployment.

Groundedness Pro is preview, powered by Azure AI Content Safety, returns binary pass/fail with reasoning, and requires no model deployment. That last point is the discriminator: a scenario that rules out deploying a judge — cost, region, governance — is pointing at Pro. A scenario that wants a graded trend line is pointing at the 1–5 evaluator.

The common error is treating groundedness as factuality. It is not. A response perfectly grounded in a wrong document scores well. Groundedness measures fidelity to the context; correctness of the context is a retrieval and content problem.

Turn against conversation, and the rule you cannot break

evaluation_level defaults to "turn", scoring each exchange independently. "conversation" scores the thread as a whole, which is what you need for properties that only exist across turns — did the agent stay on task, did it carry constraints forward, did it resolve the intent by the end.

The rule to remember: you cannot mix evaluation levels in a single run. A requirement to score both per-turn quality and whole-conversation adherence means two runs, not one run with mixed settings. Answer options offering a single run with both are testing exactly this.

What red teaming adds that datasets cannot

A dataset measures behaviour on inputs you thought of. Red teaming measures behaviour on inputs an adversary thinks of.

The AI Red Teaming Agent is built on PyRIT and automates the probing: it generates adversarial prompts across risk categories, applies attack strategies, and returns a scorecard so results are comparable between runs and across model versions. Because it is scriptable it belongs in the pre-production gate, and because risk can reappear with a model or prompt change it also belongs on a schedule in production.

Note what it is not. It does not replace filters — it tells you what the filters and system prompt are letting through. And it does not replace safety evaluators on ordinary traffic: an application can be adversarially robust and still produce harmful output on innocuous prompts.

Safety evaluators are not only for risky-sounding apps

Risk and safety evaluators apply to any generative application, not just ones with an obviously sensitive domain. A summarizer over user-supplied documents inherits every risk present in those documents. Scoping safety evaluation to "apps that handle sensitive topics" is how teams discover harms in production.

Explanation tooling: from a score to a cause

A quality number tells you something changed; it does not tell you what. Three instruments turn scores into causes.

Traces show the actual path — which tool ran, with what input, what came back, how long each span took. When an evaluator flags a response, the trace is where you find out whether the model reasoned badly or the retrieval returned nothing.

Cluster analysis groups similar failures so a pattern emerges. Fifty scattered low scores are noise; fifty low scores that all involve a date range are a defect with an address.

Evaluator reasoning — Groundedness Pro's pass/fail carries reasoning, and the AI-assisted evaluators explain their score. That text is often the fastest route to the cause.

Used together, the loop is: an alert or a scheduled run flags a drop, cluster analysis names the failing class, traces expose the mechanism, and a targeted dataset confirms the fix.

Worked Examples

Example 1 — no reference answers. A support assistant must be measured for whether answers are supported by the retrieved knowledge base. No labelled answer set exists, and governance forbids deploying an extra judge model.

Groundedness Pro — it evaluates support against context, returns binary pass/fail with reasoning, and requires no model deployment. Plain Groundedness needs a judge; the similarity family and Document Retrieval need ground truth that does not exist.

Example 2 — the agent that ignores its own tool. An agent calls the correct pricing tool, passes a malformed date range, and then answers as if the error had not happened.

Three agent evaluators name three distinct faults: Tool Selection passes, Tool Input Accuracy fails on the malformed argument, Tool Output Utilization fails because the returned error was ignored. Tool Call Success captures whether the call itself succeeded. Naming the specific evaluator matters more than concluding "the agent is wrong".

Example 3 — drift after a model upgrade. A team must detect behaviour change after a version change, and separately watch live quality.

Scheduled evaluation against a fixed dataset isolates the model as the variable — the inputs are held constant, so a score change is attributable. Continuous evaluation on sampled production traffic covers live quality but cannot separate model change from traffic change. Both, for different questions.

Visual Explanations

Evaluator choice as a function of available inputs:

Loading Diagram...
Figure 1 — Mermaid diagram

The post-production loop:

Loading Diagram...
Figure 2 — Mermaid diagram

Common Mistakes

Treating groundedness as factual correctness. It measures support by the supplied context.

Choosing Groundedness when a judge deployment is excluded. Pro requires none.

Choosing Document Retrieval without ground truth. It needs labels; Retrieval does not.

Collapsing the agent evaluators into one. Selection, input accuracy, output utilization, and call success are distinct.

Mixing turn and conversation levels in one run. Not permitted — run twice.

Using continuous evaluation to detect drift. Sampled traffic changes underneath you; drift needs a fixed dataset.

Treating red teaming as a substitute for filters or safety evaluators. It measures what they let through.

Scoping safety evaluation to sensitive-sounding applications only.

Practice Exercises

  1. Distinguish Groundedness from Groundedness Pro on three axes, and say which is chosen when deploying a judge is ruled out.
  2. Which evaluators require ground truth?
  3. An agent picks the right tool, sends a bad argument, and ignores the error. Name the evaluator for each fault.
  4. State the evaluation_level values and the rule about combining them.
  5. Why does drift detection require a fixed dataset rather than sampled traffic?
▶Answers
  1. Mechanism — AI-assisted judge against Azure AI Content Safety. Output — 1–5 against binary pass/fail with reasoning. Requirement — Groundedness requires a model deployment; Groundedness Pro does not, which is why Pro is the answer when a judge is excluded.
  2. The similarity family (F1, BLEU, ROUGE, METEOR, GLEU, Similarity) and Document Retrieval. Retrieval does not — it assesses how well retrieved chunks address the query.
  3. Tool Selection passes. Tool Input Accuracy fails on the malformed argument. Tool Output Utilization fails because the returned error was not used. Tool Call Success records whether the call itself succeeded.
  4. "turn" (the default, per-exchange) and "conversation" (whole thread). You cannot mix levels in a single run — measuring both means two runs.
  5. Because the inputs must be held constant for a score change to be attributable to the system. Sampled production traffic changes with user behaviour, so a shift cannot be separated from a change in what is being asked.

Summary & Concept Map

Responsible AI instrumentation is evaluator selection plus lifecycle placement. Choose evaluators by required inputs: no ground truth eliminates the similarity family and Document Retrieval; support-by-context is groundedness, where Pro needs no judge deployment and returns binary pass/fail while the AI-assisted evaluator scores 1–5; tool-using systems get the agent family, whose members separate selection, input accuracy, output utilization, and call success. Set evaluation_level to turn or conversation and never mix them in one run. In production, continuous evaluation watches sampled live traffic while scheduled evaluation on a fixed dataset is what detects drift, scheduled red teaming on PyRIT probes what filters let through, and cluster analysis plus traces turn a score into a cause.

Loading Diagram...
Figure 3 — Mermaid diagram
Loading flashcards…

Sources and freshness

Written against current Microsoft Learn documentation for the AI-103 skills measured (16 April 2026), reviewed 2026-08-20. Microsoft Learn controls every changing product contract — availability, preview status, quotas, limits, regional support, naming, and retirement dates all move independently of this lesson. Where a scenario turns on a specific number or a GA/preview boundary, confirm it against the product's own page before relying on it.

All Developing AI Apps and Agents on Azure (AI-103) Study Resources

Related Notes

  • Choose an appropriate method for retrieval and indexing2,778 words
  • Quick Note — Choose an appropriate method for retrieval and indexing888 words
  • Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools3,097 words
  • Quick Note — Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools1,041 words
  • Choose appropriate memory, tool, and knowledge integration services for agent solutions2,815 words
  • Quick Note — Choose appropriate memory, tool, and knowledge integration services for agent solutions949 words
  • Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing2,733 words
  • Quick Note — Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing901 words
  • Configure safety filters, guardrails, risk detection, and content moderation2,795 words
  • Govern agent behavior with oversight modes, constraints, and tool-access controls2,863 words
  • Implement auditing through trace logging, provenance metadata, and approval workflows2,624 words
  • Configure security including managed identity, private networking, keyless credentials, and role policies2,695 words

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Developing AI Apps and Agents on Azure (AI-103) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, top to bottom. What data do you have? connects to Ground truth labels?. A connects to Similarity family<br/>Document Retrieval (Yes). A connects to Retrieved context? (No). B connects to Judge model allowed? (Yes). C connects to Groundedness 1-5<br/>Retrieval (Yes). C connects to Groundedness Pro<br/>binary, no deployment (No). B connects to Tool calls involved? (No). D connects to Agent evaluators:<br/>Selection / Input Accuracy /<br/>Output Utilization / Success (Yes). 1 more statements.
Loading Diagram...
Flowchart, left to right. Production traffic connects to Continuous evaluation<br/>sampled. Fixed test dataset connects to Scheduled evaluation<br/>DRIFT. Scheduled red teaming<br/>PyRIT connects to Risk scorecard. CE connects to Azure Monitor alerts. SE connects to AL. SC connects to AL. AL connects to Cluster analysis<br/>group the failures. CA connects to Traces: find the mechanism. 1 more statements.
Loading Diagram...
Flowchart, top to bottom. RAI instrumentation connects to Evaluator selection. RAI instrumentation] --> SEL[Evaluator selection connects to Levels. RAI instrumentation] --> SEL[Evaluator selection connects to Lifecycle. RAI instrumentation] --> SEL[Evaluator selection connects to Explanation tooling. SEL connects to No ground truth: rules out<br/>similarity + Document Retrieval. SEL connects to Context: Groundedness 1-5 /<br/>Pro binary, no deployment. SEL connects to Agent family: Selection,<br/>Input Accuracy, Output Utilization,<br/>Call Success. SEL connects to Risk and safety: all apps. 9 more statements.

RAI instrumentation — retrieval

Card 1 of 6

Front of flashcard 1 of 6

Groundedness vs Groundedness Pro

hard

Groundedness — AI-assisted, 1–5, requires a model deployment as judge. Groundedness Pro — preview, Azure AI Content Safety, binary pass/fail with reasoning, no model deployment required. Both measure support by supplied context, not factual truth.

rag

RAI instrumentation — retrieval

Card 1

Front

Groundedness vs Groundedness Pro

Back

Groundedness — AI-assisted, 1–5, requires a model deployment as judge. Groundedness Pro — preview, Azure AI Content Safety, binary pass/fail with reasoning, no model deployment required. Both measure support by supplied context, not factual truth.

Card 2

Front

Which evaluators need ground truth

Back

The similarity family (F1, BLEU, ROUGE, METEOR, GLEU, Similarity) and Document Retrieval. Retrieval does not — it judges how well retrieved chunks address the query.

Card 3

Front

The four tool evaluators

Back

Tool Selection (right tool?), Tool Input Accuracy (right arguments?), Tool Output Utilization (did it use the result?), Tool Call Success (did the call succeed?). Plus Tool Call Accuracy and Task Navigation Efficiency.

Card 4

Front

evaluation_level

Back

"turn" (default, per-exchange) or "conversation" (whole thread). You cannot mix evaluation levels in a single run — measuring both requires two runs.

Card 5

Front

Continuous vs scheduled evaluation

Back

Continuous — sampled production traffic, live quality. Scheduled — a fixed test dataset, which is what detects drift because the inputs are held constant and a change is attributable.

Card 6

Front

AI Red Teaming Agent

Back

Built on PyRIT. Automates adversarial probing across risk categories and attack strategies, returning a comparable scorecard. Use pre-production as a gate and scheduled in production. It measures what filters let through — it does not replace them.

RAI instrumentation — retrieval

Card 1

Front

Groundedness vs Groundedness Pro

Back

Groundedness — AI-assisted, 1–5, requires a model deployment as judge. Groundedness Pro — preview, Azure AI Content Safety, binary pass/fail with reasoning, no model deployment required. Both measure support by supplied context, not factual truth.

Card 2

Front

Which evaluators need ground truth

Back

The similarity family (F1, BLEU, ROUGE, METEOR, GLEU, Similarity) and Document Retrieval. Retrieval does not — it judges how well retrieved chunks address the query.

Card 3

Front

The four tool evaluators

Back

Tool Selection (right tool?), Tool Input Accuracy (right arguments?), Tool Output Utilization (did it use the result?), Tool Call Success (did the call succeed?). Plus Tool Call Accuracy and Task Navigation Efficiency.

Card 4

Front

evaluation_level

Back

"turn" (default, per-exchange) or "conversation" (whole thread). You cannot mix evaluation levels in a single run — measuring both requires two runs.

Card 5

Front

Continuous vs scheduled evaluation

Back

Continuous — sampled production traffic, live quality. Scheduled — a fixed test dataset, which is what detects drift because the inputs are held constant and a change is attributable.

Card 6

Front

AI Red Teaming Agent

Back

Built on PyRIT. Automates adversarial probing across risk categories and attack strategies, returning a comparable scorecard. Use pre-production as a gate and scheduled in production. It measures what filters let through — it does not replace them.