Domain 4 of 5 · Chapter 1 of 2

Evaluation and Validation for Generative AI

Four evaluator families, one selection rule

Every evaluation starts with one question: what can you compare the answer against? That single choice picks which family of evaluator you reach for, so start there rather than with a specific metric name.

Azure AI Evaluation ships its built-in evaluators[1] in four families, each defined by what does the judging and what input it needs:

  • AI-assisted quality evaluators (groundedness, relevance, coherence, fluency) use a GPT model as an LLM-as-a-judge[2].
  • Textual-similarity (NLP) evaluators (F1, BLEU, GLEU, ROUGE, METEOR) compute token or n-gram overlap against a reference answer, with no model in the loop.
  • Risk and safety evaluators (violence, sexual, self-harm, hate/unfairness, and more) call a Microsoft-hosted service to score harmful content.
  • Agentic evaluators (intent resolution, tool-call accuracy, task adherence) judge how an agent behaved, not just its final text.

Four data terms decide the rest. The query is the input sent to your app, the response is what the app returned, the context is the grounding or source documents a retrieval step supplied, and the ground_truth is a known-correct reference answer written by a human. An evaluation dataset carries whichever of these four each chosen evaluator needs, and no more.

The selection rule falls straight out of the families. If you have a fixed ground_truth, use an NLP-similarity metric. If you have context but no reference, use groundedness or relevance. If you have neither, use the LLM-judge quality metrics. To screen for harmful content, use the hosted safety evaluators. The figure groups the families and their members so you can see the whole catalog at a glance before the sections that follow drill into each one.

Built-in evaluatorsAI-assisted qualityGroundednessRelevanceCoherenceFluencyTextual similarity (NLP)F1ScoreBleuScoreGleuScoreRougeScoreMeteorScoreRisk and safetyViolenceSexualSelfHarmHateUnfairnessIndirectAttackAgenticIntentResolutionToolCallAccuracyTaskAdherence
The four built-in evaluator families and representative members; the family you need follows from what reference data you hold.

The evaluate() harness: dataset, mapping, logging

One evaluator on one row is a spot check; real evaluation runs a set of evaluators over a whole dataset. That is what the evaluate()[2] API in the azure-ai-evaluation SDK does: it runs many built-in and custom evaluators over one dataset in a single pass and returns both aggregate metrics and per-row scores.

The dataset is a file path, not an in-memory list. JSON Lines (JSONL, one JSON object per line) is the standard format used across the documentation and is required for the results charts to render in your project; the SDK API reference for the data parameter states plainly that "JSONL and CSV files are supported"[3]. Passing a Python list or a bare JSON array instead is the classic mistake.

Mapping columns to evaluator inputs

Evaluators look for specific keywords (query, response, context, ground_truth). When your dataset's column names differ, a column_mapping inside evaluator_config re-aligns them: use ${data.<column>} to point at a dataset column and ${outputs.<field>} to point at a value your target (the app or function under evaluation that produced the outputs) generated. A "default" mapping applies to every evaluator, while a per-evaluator mapping overrides it.

Run several evaluators over one JSONL dataset and log to Foundry

from azure.ai.evaluation import evaluate, GroundednessEvaluator, RelevanceEvaluator

# model_config supplies the GPT judge for the AI-assisted evaluators
# ...
result = evaluate(
    data="data.jsonl",                 # file path; JSONL standard, CSV also supported
    evaluators={
        "groundedness": GroundednessEvaluator(model_config),
        "relevance": RelevanceEvaluator(model_config),
    },
    evaluator_config={
        "groundedness": {
            "column_mapping": {
                "query": "${data.queries}",
                "context": "${data.context}",
                "response": "${data.response}",
            }
        },
        # ...
    },
    azure_ai_project=azure_ai_project,  # optional: log the run to Foundry
)
print(result.studio_url)   # link to the run in your Foundry project

The data argument is the JSONL file; the evaluators dict pairs an alias with each evaluator; and the evaluator_config block holds the column_mapping that binds the dataset's queries column to the evaluator's expected query keyword. Passing azure_ai_project logs the run so the aggregate and per-row scores appear in the portal, reachable through result.studio_url. The # ... lines mark model setup and further mappings omitted for brevity. Composite evaluators such as QAEvaluator bundle several quality metrics into a single entry when you want them all at once.

Dataset fileJSONL or CSVcolumn_mappingin evaluator_configevaluate()many evaluatorsScoresaggregate + per-rowFoundry projectresult.studio_url
evaluate() reads one dataset file, applies each evaluator through its column mapping, and returns aggregate plus per-row scores that can log to Foundry.

AI-assisted quality metrics and the LLM judge

When there is no reference answer to diff against, let a model judge the writing. The four AI-assisted quality evaluators do exactly that, and they share one mechanism: each sends the data to a GPT deployment you name in model_config (an AzureOpenAIModelConfiguration), and each returns a 1-to-5 Likert score where higher is better, with a default pass threshold of 3 and a written reason. Because a language model does the scoring, these are the LLM-as-a-judge metrics.

What differs between them is which inputs each one reads:

Evaluator Reads Measures
Groundedness response, context (query optional) Is the answer supported by the supplied context?
Relevance query, response Does the answer address the question?
Coherence query, response Does the answer hang together logically?
Fluency response Is the text grammatical and readable?

Two of these form the retrieval-augmented generation (RAG) pair: groundedness and relevance[4] exist to catch a RAG system that either invents facts absent from its sources (ungrounded) or answers off-topic (irrelevant). The other two are general-purpose[5] writing-quality checks. Watch the input requirement that trips people up: coherence requires both the query and the response, while fluency reads the response alone. It is tempting to assume coherence needs only the answer, but it scores the answer as a reply to the question, so it needs the question too. These relevance and groundedness signals also feed straight into RAG tuning; see optimizing RAG performance.

One member breaks the mold. GroundednessProEvaluator (preview) detects ungrounded claims using the hosted Foundry evaluation service rather than your GPT judge, so it takes azure_ai_project instead of model_config and returns a boolean pass/fail rather than a 1-to-5 score. Treat it as a safety-style evaluator that happens to measure groundedness, and do not wire a model_config to it.

Textual-similarity (NLP) metrics

Sometimes you already know the right answer. When a fixed reference (the ground_truth) exists and exact wording overlap is the test, skip the LLM judge entirely and use the textual-similarity NLP evaluators[6]. They score how much the response overlaps the ground_truth by token or n-gram math, need no GPT deployment, and are all generally available. In the SDK they are named F1Score, BleuScore, GleuScore, RougeScore, and MeteorScore (the F1/BLEU/GLEU/ROUGE/METEOR metrics named elsewhere on this page).

Evaluator Overlap it scores Output Default threshold
F1Score Shared tokens (precision and recall) 0-1 float 0.5
BleuScore N-gram overlap (machine translation) 0-1 float 0.5
GleuScore Per-sentence variant of BLEU 0-1 float 0.5
RougeScore Recall-oriented n-gram overlap 3 floats: precision, recall, F1 0.5 each
MeteorScore Overlap with synonyms and stemming 0-1 float 0.5

All five take just ground_truth plus response and return a 0-to-1 float against a default 0.5 threshold, with one exception: RougeScore returns three separate scores (precision, recall, and F1), each judged against its own 0.5 threshold. The selection rule is deterministic: pick a similarity metric when a fixed reference answer exists and exact overlap is the criterion (machine translation, fixed-answer retrieval, NLP benchmarking); when there is no ground truth to compare against, fall back to the AI-assisted quality metrics from the previous section. These metrics also cannot run at all without a ground_truth.

One name trap: SimilarityEvaluator looks like it belongs in this table, but it does not. It measures semantic similarity with an LLM judge, so it scores 1 to 5 and needs a model_config and deployment, exactly like the quality metrics. The math-only evaluators above never touch a model.

Risk and safety evaluation

Quality is not the only risk; a fluent, well-grounded answer can still be harmful. The risk and safety evaluators[7] catch that, and they work differently from every metric so far: they run inside a Microsoft-hosted Foundry evaluation service, not on your GPT judge. You instantiate them with your Foundry project (azure_ai_project) and a credential, never a model_config or deployment_name.

The 0-to-7 severity scale

The four content-harm evaluators (ViolenceEvaluator, SexualEvaluator, SelfHarmEvaluator, HateUnfairnessEvaluator) return a 0-to-7 severity score, bucketed as Very low (0-1), Low (2-3), Medium (4-5), and High (6-7). Read this scale the opposite way to the quality metrics: here a higher number means more harmful. Given the default threshold of 3, a response scores pass when its severity is at or below 3 and fail when it is above. Over a whole dataset the service reports a defect rate: the percentage of responses whose severity exceeds the threshold, which is the intended dataset-level signal rather than a single worst-case score. ContentSafetyEvaluator is a composite that runs all four harms at once for one combined result.

Beyond the four harms: pass/fail evaluators

Not every safety evaluator uses the 0-7 scale. IndirectAttackEvaluator (cross-domain prompt injection, XPIA) returns a boolean pass/fail: fail means the response obeyed a jailbreak instruction hidden inside retrieved context or a source document, not one typed into the user's own prompt. ProtectedMaterialEvaluator also returns pass/fail, flagging text under copyright (song lyrics, recipes, articles) via the Azure AI Content Safety Protected Material for Text service. So do not assume every risk evaluator emits a severity number; several are simple booleans.

One operational constraint: because these run on hosted safety models, the service (and adversarial red teaming) is available only in select regions[8] such as East US 2, France Central, and Sweden Central. Create the Foundry project in a supported region, and check the current region list before you rely on it, because coverage changes over time.

Content safety severity: 0 to 7 (higher = more harmful)Very low0-1Low2-3Medium4-5High6-7threshold 3Pass: score at or below 3Fail: score above 3Defect rate = share of a dataset's responses above the threshold
Content-safety severity runs 0 to 7 (higher is more harmful); with the default threshold of 3, scores at or below 3 pass and higher scores fail.

Generating test data and red teaming

You cannot evaluate what you cannot feed the evaluators, and real production traffic is often missing early on. Azure AI Evaluation gives you two ways to manufacture inputs, and they serve opposite purposes.

Non-adversarial: the Simulator

The Simulator[9] class generates non-adversarial synthetic query and response conversations from a text blob or a search index. It gives you consistent, repeatable inputs so you can compare prompt variants without waiting for live users. Reaching for a content filter or a blocklist to build a test set is a category error: filters moderate content at runtime, they do not generate a controlled dataset.

Adversarial: red-team data and the AI Red Teaming Agent

For safety testing you want inputs designed to break the system. AdversarialSimulator produces red-team datasets using a service-hosted model with its safety behaviors turned off; DirectAttackSimulator builds user-prompt injection (UPIA) jailbreak data, and IndirectAttackSimulator builds cross-domain (XPIA) data. All of these need a Foundry project (azure_ai_project) and run only in the supported safety regions.

The AI Red Teaming Agent[10] (preview) automates the whole campaign rather than just building a dataset. Built on Microsoft's open-source PyRIT (Python Risk Identification Tool) framework, it probes a model, application, or agent endpoint with seed attack objectives, converts them with attack strategies (such as Base64 encoding, Flip, and the multi-turn Crescendo escalation) to slip past the model's safety alignment, scores each attack-response pair with the hosted Risk and Safety Evaluators, and reduces the run to an Attack Success Rate (ASR): the percentage of attacks that elicited an undesirable response. It emits a scorecard broken down by risk category to drive a pre-deployment go/no-go decision. Keep the three tools straight: Simulator builds benign data, AdversarialSimulator builds a red-team dataset, and the AI Red Teaming Agent runs the end-to-end scan that produces the ASR.

Attack objectives+ PyRIT strategiesBase64, Flip, CrescendoProbe targetmodel / app / agentScore each pairhosted safety evaluatorsAttack Success Rate% successful attacksRisk scorecardgo / no-go
The AI Red Teaming Agent converts attack objectives with PyRIT strategies, probes the target, scores each pair with the hosted safety evaluators, and reports an ASR scorecard.

Agentic evaluation and CI/CD quality gates

Evaluating agents, not just answers

An agent can produce a perfectly fluent final message while calling the wrong tool or ignoring its instructions, so agent quality needs its own agentic evaluators[2]. IntentResolutionEvaluator checks whether the agent correctly understood what the user wanted; ToolCallAccuracyEvaluator checks whether the right tools were called with the right parameters (on a 1-to-5 rubric); and TaskAdherenceEvaluator checks whether the agent followed its instructions and stayed on task. These read the agent message schema, including the tool_calls trace, so evaluating an agent means capturing its tool-invocation trace as input, not only the final assistant message. That is why agent evaluation is tightly coupled to tracing; see observability for generative AI.

Custom evaluators

When no built-in metric fits your domain, write your own and pass it to the same evaluate() run. A custom evaluator[11] is either a code-based Python callable or class (for a deterministic score such as answer length or a regex match) or a prompt-based Prompty file that instructs a judge model with your own rubric. Both slot into the evaluators dictionary alongside the built-ins, so a run can mix built-in and custom metrics in one pass.

From manual check to CI/CD gate

Evaluation earns its keep when it stops being a one-off notebook run. Cloud (remote) evaluation[12] lets you wire evaluation into a CI/CD (continuous integration and delivery) pipeline such as GitHub Actions as an automated quality gate, failing a build or blocking a release when a quality or safety score falls below threshold. Build all of this on the azure-ai-evaluation SDK plus Foundry evaluations. The older Evaluate-with-prompt-flow[13] workflow is on a retirement path, with prompt flow scheduled to retire on April 20, 2027, so it is not the tool to choose for new evaluation work.

Exam-pattern recognition

Most AI-300 questions on this objective test one distinction. Read the stem for the signal, then pick the answer that matches.

  • Data shape: 'a fixed correct answer exists' or 'compare against a reference' points to an NLP-similarity metric (F1, BLEU, ROUGE) and a ground_truth; 'no reference answer' points to the AI-assisted quality metrics.
  • RAG signals: 'grounded in the retrieved documents' means groundedness (needs context); 'answers the question asked' means relevance. No context supplied means groundedness has nothing to score.
  • Coherence vs fluency inputs: coherence needs the query and the response; fluency needs only the response. A stem that supplies just responses and asks about writing quality points to fluency.
  • Config object: a GPT model_config means an AI-assisted quality metric; azure_ai_project with no model means a hosted safety evaluator. Passing model_config to a safety evaluator is wrong.
  • Scale direction: a 1-to-5 score where higher is better is a quality metric; a 0-to-7 score where higher is worse is content-safety severity, with pass at or below the default threshold of 3.
  • Dataset-level safety: the intended aggregate is the defect rate (share above threshold), not a single worst-case score.
  • Generate vs attack: Simulator for benign test data; AdversarialSimulator for a red-team dataset; the AI Red Teaming Agent for an end-to-end scan that reports an Attack Success Rate. Content filters do not generate datasets.
  • Agents: evaluating an agent needs the tool_calls trace and the agentic evaluators (intent resolution, tool-call accuracy, task adherence), not just groundedness on the final text.
  • Automation: 'block a release when quality drops' means cloud evaluation as a CI/CD gate; new work uses the Azure AI Evaluation SDK, not prompt flow.

Built-in evaluator families in Azure AI Evaluation

PropertyAI-assisted qualityTextual similarity (NLP)Risk and safetyAgentic
Example evaluatorsGroundedness, Relevance, Coherence, FluencyF1, BLEU, GLEU, ROUGE, METEORViolence, Sexual, SelfHarm, HateUnfairness, IndirectAttackIntentResolution, ToolCallAccuracy, TaskAdherence
What judgesGPT model as LLM judgeMath over token/n-gram overlap, no judgeMicrosoft-hosted safety serviceLLM judge over the agent trace
Required inputquery, response, context (coherence: query+response; fluency: response only)response + ground_truthquery + responsequery, response, tool-call trace
Score and threshold1-5 Likert, higher better, pass at or above 30-1 overlap, pass at or above 0.50-7 severity, higher worse, pass at or below 3LLM-judge scores, e.g. 1-5
Config objectmodel_config (AzureOpenAIModelConfiguration)noneazure_ai_project + credentialmodel_config
Region-limitedNoNoYes, select regionsNo

Decision tree

Screening forharmful content?Risk & safety evaluatorshosted, azure_ai_projectEvaluating an agent'stool calls?Agentic evaluatorsintent, tool-call, taskHave a fixedground_truth answer?Textual-similarity (NLP)F1, BLEU, ROUGEHave groundingcontext (RAG)?Groundedness / RelevanceLLM judge, 1-5Coherence / FluencyLLM judge, 1-5YesNoYesNoYesNoYesNo

Sharp facts the exam loves — give these one last read before exam day.

Cheat sheet

Sharp facts the exam loves — scan these before test day.

The evaluate() API takes a dataset file path, standardly JSONL

The Azure AI Evaluation SDK evaluate() API takes a test dataset as a file path, not as an in-memory list or a plain JSON array. JSON Lines (JSONL, one JSON object per line) is the standard format used throughout the documentation and tooling, and the current API reference also accepts CSV; each record supplies the fields the chosen evaluators need.

Trap Assuming evaluate() ingests an in-memory Python list or a plain JSON array file; it requires a dataset file path (JSONL standard).

5 questions test this
Evaluation records carry query, response, context, and ground_truth

An evaluation record can contain up to four elements: query (the input sent to the app), response (the app output), context (the grounding/source documents), and ground_truth (a human reference answer). Which are required depends on the evaluator; groundedness and relevance need context, while similarity and F1 need ground_truth.

Trap Omitting context for a groundedness run or ground_truth for a similarity run, so the evaluator scores against empty input.

9 questions test this
column_mapping aligns dataset columns to evaluator inputs

When dataset column names differ from the keywords an evaluator expects, you map them with column_mapping inside evaluator_config, using ${data.} to reference a dataset field and ${outputs.} to reference a value produced by a target; a default mapping applies to all evaluators. Comprehensive evaluation is achieved by mapping every required field for each evaluator.

Trap Assuming columns must literally be named query/response; mismatched names without a column_mapping feed the evaluator empty values.

6 questions test this
Simulator generates non-adversarial synthetic evaluation data

The azure.ai.evaluation.simulator.Simulator class produces non-adversarial synthetic query/response conversations from a text blob or search index, giving consistent, repeatable evaluation inputs when no production data exists. It is the tool for building a controlled dataset to compare prompt variants without live user traffic.

Trap Reaching for content filters or a blocklist to create evaluation inputs; those moderate content, they do not generate a controlled test dataset.

13 questions test this
AdversarialSimulator builds red-team safety datasets and needs a Foundry project

AdversarialSimulator, driven by an AdversarialScenario enum, generates adversarial (red-team) datasets using a service-hosted model with safety behaviors turned off; it requires a Foundry project and runs only in East US 2, France Central, UK South, and Sweden Central. DirectAttackSimulator produces user-prompt (UPIA) jailbreak data and IndirectAttackSimulator produces cross-domain (XPIA) jailbreak data.

Trap Expecting adversarial simulation to run in any region; the hosted safety service is limited to four regions and needs azure_ai_project.

11 questions test this
Groundedness, relevance, coherence, and fluency are the core AI quality metrics

Groundedness, relevance, coherence, and fluency are the AI-assisted quality evaluators. Groundedness and relevance are RAG-oriented (groundedness checks the response against supplied context; relevance checks the response against the query), while coherence and fluency are general-purpose language-quality metrics — coherence scores how well the response hangs together as an answer to the query (requires query + response), whereas only fluency judges the response text alone.

Trap Selecting groundedness when no context/grounding documents are provided; without context there is nothing to measure groundedness against.

8 questions test this
Quality evaluators use an LLM judge and a 1-5 Likert score

AI-assisted quality evaluators use an LLM-as-a-judge, so you must supply a GPT model deployment in model_config (AzureOpenAIModelConfiguration). They score on a 1-to-5 Likert scale where higher is better, apply a default pass threshold of 3, and return a reason for the score.

Trap Configuring a model_config for the risk and safety evaluators; only the AI-assisted quality/RAG evaluators use a GPT judge, safety evaluators do not.

7 questions test this
GroundednessPro uses the hosted safety service, not a GPT judge

GroundednessProEvaluator (preview) detects ungrounded or hallucinated claims using the hosted Foundry evaluation service, so it takes azure_ai_project rather than a GPT model_config and returns a pass/fail label with a reason instead of a 1-to-5 score.

Textual-similarity NLP evaluators score token/n-gram overlap against a supplied ground truth and need no LLM judge

The textual-similarity evaluators (F1Score, BleuScore, GleuScore, RougeScore, MeteorScore) are built-in, generally available metrics that score a response purely by math-based token or n-gram overlap against a supplied ground_truth, so they take only ground_truth plus response and require no GPT model deployment or LLM-as-a-judge (each returns a 0-1 float against a default 0.5 threshold, except RougeScore, which returns separate precision, recall, and F1 scores). The selection rule is deterministic: when a fixed reference answer exists and exact overlap is the criterion (machine translation, fixed-answer retrieval, NLP benchmarking) choose a textual-similarity evaluator; when there is no ground truth to compare against, choose the AI-assisted quality metrics (groundedness, relevance, coherence, fluency) instead.

Trap Reaching for an AI-assisted quality evaluator, or supplying a model_config, when a fixed ground_truth answer already exists — the textual-similarity evaluators need no LLM-judge deployment; conversely, they cannot run at all without a ground_truth.

7 questions test this
Safety evaluators run in the hosted service and need azure_ai_project

The risk and safety evaluators (ViolenceEvaluator, SexualEvaluator, SelfHarmEvaluator, HateUnfairnessEvaluator) are executed by the hosted Microsoft Foundry evaluation service, so they are instantiated with your Foundry project information (azure_ai_project) and a credential, not with a GPT model_config or a deployment_name.

Trap Passing a GPT model_config to a safety evaluator; harm detection is done by Microsoft-hosted safety models reached through your Foundry project.

5 questions test this
Content safety uses a 0-7 severity scale with a default threshold of 3

Content safety evaluators return a 0-to-7 severity score bucketed as Very low (0-1), Low (2-3), Medium (4-5), and High (6-7). Given a default threshold of 3, a score at or below the threshold passes and a higher score fails, with a reason explaining the level.

Trap Reading the safety scale like a quality score; here a HIGHER number means MORE harmful, the opposite of the 1-to-5 quality metrics.

6 questions test this
Safety results aggregate into a defect rate; ContentSafetyEvaluator bundles the four harms

Over a dataset the service reports a defect rate, the percentage of responses whose severity exceeds the threshold, as the aggregate safety signal. ContentSafetyEvaluator is a composite evaluator that runs violence, sexual, self-harm, and hate/unfairness together for a single combined output.

Trap Reporting a single worst-case score instead of the defect rate, which is the intended dataset-level harmful-content metric.

6 questions test this
The safety evaluation service is region-limited

The hosted safety evaluation service (and adversarial simulation) is available only in select regions, so the Foundry project must be created in a supported region such as East US 2, France Central, UK South, or Sweden Central for these evaluators to run.

IndirectAttack and ProtectedMaterial are pass/fail risk evaluators beyond the four harms

Beyond the four content-harm evaluators, the built-in risk and safety set includes IndirectAttack (XPIA / cross-domain prompt injection), which returns a boolean pass/fail verdict where fail means the response fell for a jailbreak instruction injected into retrieved context or a source document, and ProtectedMaterial, which flags text under copyright (song lyrics, recipes, articles) using the Azure AI Content Safety Protected Material for Text service. Both output pass/fail rather than the 0-to-7 severity score used for hate/unfairness, sexual, violence, and self-harm.

Trap Assuming every risk and safety evaluator emits a 0-to-7 severity score, or that IndirectAttack inspects the user's direct prompt; it is a boolean verdict and targets injections hidden in retrieved or grounding content, not the immediate user turn.

The AI Red Teaming Agent automates adversarial scans into an ASR risk-category scorecard

The AI Red Teaming Agent (preview) is Microsoft Foundry's automated adversarial-scanning tool, built on the open-source PyRIT framework, that probes a model, application, or agent endpoint with simulated attacks (applying PyRIT attack strategies such as Base64, Flip, or Crescendo across easy, moderate, and difficult complexity), scores each attack-response pair with the hosted Risk and Safety Evaluators, and reduces the run to an Attack Success Rate (ASR), the percentage of attacks that successfully elicit an undesirable response. It emits a risk-category scorecard broken down by harm category and attack complexity to drive a pre-deployment go/no-go decision, and is distinct from the AdversarialSimulator, which only generates a red-team dataset, and from the hosted per-response safety evaluators, which score a single response at a time rather than run an end-to-end attack campaign.

Trap Confusing the AI Red Teaming Agent with the AdversarialSimulator (which only builds the adversarial dataset) or with the hosted content-safety evaluators (which score the harm severity of one response); the AI Red Teaming Agent runs the whole scan, scoring attack-response pairs into the ASR scorecard used for the deployment go/no-go.

4 questions test this
evaluate() runs many evaluators over one dataset and can log to Foundry

The evaluate() API runs multiple built-in and custom evaluators over one dataset in a single pass, returning aggregate metrics plus per-row scores, and can log results to a Foundry project (surfaced via result.studio_url). Composite evaluators such as QAEvaluator bundle several quality metrics at once.

Trap Running each evaluator by hand row by row; evaluate() batches all evaluators and produces the aggregated report.

9 questions test this
Custom evaluators are code-based callables or prompt-based Prompty files

When built-in metrics do not fit, you author custom evaluators either as a code-based Python callable/class (for example a deterministic score like answer length) or as a prompt-based Prompty file that instructs a judge model, then pass them to evaluate() alongside the built-in evaluators.

Trap Assuming only built-in metrics exist; domain-specific criteria are handled by code-based or Prompty custom evaluators.

7 questions test this
Cloud evaluation wires evaluations into CI/CD as automated quality gates

Cloud (remote) evaluation runs let you integrate evaluation into CI/CD pipelines such as GitHub Actions as automated quality gates, failing a build or blocking a release when quality or safety scores fall below thresholds, which operationalizes evaluation rather than leaving it a manual step.

Trap Treating evaluation as a one-off local check instead of a scheduled or CI/CD-gated automated workflow.

6 questions test this
The Evaluation SDK replaces prompt flow evaluation for new work

The Azure AI Evaluation SDK is the successor to the retired Evaluate-with-prompt-flow workflow; new automated evaluation should be built on azure-ai-evaluation plus Foundry evaluations, not on prompt flow, whose feature development ended on 2026-04-20 and support ends 2027-04-20.

Trap Selecting prompt flow to author or run evaluation workflows; it is on the retirement path and the Azure AI Evaluation SDK is its replacement.

4 questions test this
Agent evaluators score intent resolution, tool-call accuracy, and task adherence

Agentic evaluators judge agent behavior beyond final text: IntentResolutionEvaluator checks whether the agent correctly understood the user's intent, ToolCallAccuracyEvaluator checks whether the right tools were called with correct parameters, and TaskAdherenceEvaluator checks whether the agent followed its instructions and stayed on task.

Trap Evaluating an agent with only groundedness/relevance; agent quality also depends on intent resolution, tool-call accuracy, and task adherence.

20 questions test this
Agent evaluators consume the tool-call trace, not just the response

Agent evaluators read the agent message schema, including tool_calls, so evaluating an agent means capturing its tool-invocation trace as input, not only the final assistant message. This is why agent evaluation is tightly coupled to tracing.

Trap Feeding only query/response to an agent evaluator; without the tool_calls it cannot assess tool-call accuracy.

10 questions test this

References

  1. Observability in Generative AI - Microsoft Foundry
  2. Local Evaluation with the Azure AI Evaluation SDK (classic) - Microsoft Foundry (classic) portal
  3. azure.ai.evaluation package
  4. Retrieval-Augmented Generation (RAG) Evaluators for Generative AI - Microsoft Foundry
  5. General Purpose Evaluators for Generative AI - Microsoft Foundry
  6. Textual Similarity Evaluators for Generative AI - Microsoft Foundry
  7. Risk and Safety Evaluators for Generative AI - Microsoft Foundry
  8. Rate limits, region support, and enterprise features for evaluation - Microsoft Foundry
  9. azure.ai.evaluation.simulator package
  10. AI Red Teaming Agent - Microsoft Foundry
  11. Custom Evaluators - Microsoft Foundry
  12. Cloud Evaluation with the Microsoft Foundry SDK - Microsoft Foundry
  13. What is Azure Machine Learning prompt flow - Azure Machine Learning