AI-300 Cheat Sheet
Design and implement an MLOps infrastructure
Machine Learning Workspace Resources
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- The workspace is the top-level Azure ML resource created first
The Azure Machine Learning workspace is the top-level resource and the centralized place where teams collaborate and where assets (datasets, models, components, environments, and jobs) are created and stored. Because every other Azure ML task (registering data or models, running jobs, creating endpoints) happens inside a workspace, a shared workspace must be provisioned first.
Trap A Microsoft Foundry project is for building generative AI apps and agents, not the top-level container for classic Azure ML training assets, so it does not replace the workspace.
14 questions test this
- An MLOps engineer must give a data science team one Azure Machine Learning resource that both organizes their assets — datasets, models, components, environments, and jobs — and also hosts the resourc
- A machine learning team wants one Azure resource that groups all their related work and keeps a history of every training run, including logs, metrics, output, lineage metadata, and a snapshot of the
- A team lead wants one Azure Machine Learning resource per project that acts as the boundary for role-based access control, per-project cost reporting, and data isolation, and that is also the place wh
- A machine learning team wants a single Azure resource that automatically keeps a history of every training run, including logs, metrics, outputs, lineage metadata, and a snapshot of the scripts, and t
- A company already uses Microsoft Foundry to build generative AI agents and chat applications. A separate data science team now wants to begin classic machine learning work: they need one centralized,
- An architect is about to create Azure Machine Learning resources for one small data science team that will run a single project. To 'future-proof' the setup, the architect suggests creating a hub work
- A data science team is adopting Azure Machine Learning. They have an Azure subscription but no Azure Machine Learning resources yet, and they need a single place to register data assets, run training
- A team is planning its first real-time inference service in Azure Machine Learning and intends to deploy a model to a managed online endpoint. They realize that the endpoint, the registered model it s
- A single data science team is starting its first and only machine learning project and simply needs a top-level resource where members can collaborate and organize their datasets, models, and jobs. An
- An organization wants to share a curated set of models, environments, and components across several Azure Machine Learning workspaces in different regions by using an Azure Machine Learning registry.
- A data scientist is given an empty Azure subscription and is asked to register a training dataset as a data asset and then run the team's first model-training job in Azure Machine Learning. No Azure M
- You are the MLOps lead onboarding a new project. Before your data scientists can register data assets, author reusable training pipelines, log models with MLflow, or attach compute, they need the sing
- An engineer needs to create an Azure Machine Learning compute cluster so the team can run training jobs on autoscaling nodes. When the engineer starts to create the cluster, they are prompted to selec
- A team has an Azure subscription and installs the Azure CLI ml extension (v2), expecting to immediately register data assets and submit training jobs. Their commands fail because every az ml operation
- Workspace auto-provisions its associated Azure resources
If you do not supply them, creating a workspace automatically provisions the associated resources it depends on: an Azure Storage account and an Azure Key Vault, plus Application Insights for endpoint monitoring. An Azure Container Registry (ACR) is created lazily, only the first time you build a custom Docker image.
Trap ACR is not always created up front; a workspace can exist without an ACR until a custom environment image is built.
13 questions test this
- You are documenting what happens when a colleague creates an Azure Machine Learning workspace in the Azure portal using default options and supplies none of the dependent resources. You need to state
- A new Azure Machine Learning workspace is created without specifying dependent resources. By default, the workspace uses one of its automatically provisioned associated resources to store machine lear
- Your Azure Machine Learning workspace was created with its default associated resources. You deploy a model to an online endpoint and now need to monitor the endpoint and collect diagnostic informatio
- For cost and quota planning before you deploy an Azure Machine Learning workspace, you must document every additional Azure resource the workspace will create by default and note which one is deferred
- A governance policy requires your team to use a specific, pre-approved Azure Storage account and Azure Key Vault for a new Azure Machine Learning workspace, rather than letting Azure create brand-new
- Immediately after creating a new Azure Machine Learning workspace with default settings, an administrator opens the resource group and sees an auto-created storage account, key vault, and Application
- When you create an Azure Machine Learning workspace without bringing your own resources, one associated resource is provisioned to help you monitor and collect diagnostic information from your inferen
- You are creating an Azure Machine Learning workspace with the Azure CLI ml extension and you do not specify any dependent resources in the command. To plan the deployment, you need to know which assoc
- Shortly after an engineer provisions a new Azure Machine Learning workspace without specifying dependent resources, a teammate notices there is no Azure Container Registry in the resource group, even
- A new Azure Machine Learning workspace was created with all default settings, so its dependent resources were auto-provisioned. A data scientist uploads data and later runs several jobs, then notices
- A data science team creates an Azure Machine Learning workspace with default settings and later builds a custom training environment as a Docker image. They want to know which of the workspace's autom
- An Azure Machine Learning workspace has been running for weeks with a storage account, key vault, and Application Insights, but no Azure Container Registry has ever appeared in its resource group. A d
- A governance team must reuse an existing corporate Azure Storage account and Azure Key Vault that are already hardened for compliance, rather than letting a new Azure Machine Learning workspace spin u
A hub workspace groups multiple project workspaces under shared security settings, connections, and compute; it is the same resource type as a Microsoft Foundry hub, so it can be used from both Azure ML studio and Foundry. A workspace cannot be moved to a different subscription or tenant.
- A datastore references existing storage and secures its credentials
A datastore is a reference to an existing Azure storage service; it does not create or copy the storage. It securely keeps the connection information and credentials in the workspace so scripts connect by a friendly datastore name instead of embedding storage connection strings and secrets in code.
Trap A datastore does not hold the data itself; it stores a pointer plus credentials to the underlying Blob, ADLS, or File storage.
12 questions test this
- Your security team rotates the account key on an Azure Storage account. Immediately afterward, every Azure Machine Learning training job that reads a container through a key-based datastore starts fai
- During onboarding, a data scientist wants the single Azure Machine Learning resource whose job is to hold the connection information and credentials for an existing storage service, so that team membe
- When you register an Azure Machine Learning datastore that uses an account key or SAS token for a storage service, the connection secret must be protected rather than left in plain configuration. Your
- A security policy forbids storing any storage account keys or SAS tokens in your Azure Machine Learning workspace, and requires that data access be authorized using each caller's own Microsoft Entra i
- You register a credential-less (identity-based) Azure Machine Learning datastore to an existing Azure Blob container so that no account key or SAS token is stored in the workspace. When a training job
- Your data science team keeps its training data in an existing Azure Blob Storage container and wants Azure Machine Learning jobs to read it. Before any jobs run, a colleague asks whether registering a
- An MLOps engineer registered an Azure Machine Learning datastore that points to an existing Azure Blob Storage container. Because another team now owns that container, you want to remove the datastore
- You want Azure Machine Learning jobs to connect to an entire existing Azure Blob Storage account by a friendly name, storing its connection details and credentials once so any script can reach the acc
- After you create an Azure Machine Learning datastore that points to an existing Azure Data Lake Storage Gen2 filesystem, a teammate assumes the workspace now contains a second copy of all that data an
- Across an Azure Machine Learning project, several training scripts each embed a different raw storage connection string to reach the same blob container, which is error-prone and leaks secrets. You wa
- Several data scientists on your team each maintain their own copy of the Azure Storage account key in personal notebooks to reach the same training data, causing duplicated secrets and inconsistent ac
- Your Azure Machine Learning workspace already has a datastore that connects to a blob container of curated data. The team now wants a single, named, versioned reference to one specific training file,
- Datastore storage types and credential options
Datastores connect to Azure Blob Storage, Azure Data Lake Storage Gen2, Azure Files, and OneLake (Microsoft Fabric). Each is authenticated with an account key, a SAS token, or a service principal, or created credential-less for identity-based (Microsoft Entra) access. Data Lake Storage Gen1 datastores retired in February 2024.
Trap A credential-less (identity-based) datastore uses the caller's Entra identity at access time rather than a stored account key or SAS token.
10 questions test this
- A team keeps training data in an Azure file share and needs an Azure Machine Learning datastore to connect to it. During design review, a colleague asks which authentication options an Azure Files dat
- You are creating an Azure Data Lake Storage Gen2 datastore and cannot use identity-based access because the workspace must authenticate with a stored credential. During setup you must choose a credent
- A data science team wants their Azure Machine Learning jobs to read files that live in a Microsoft Fabric lakehouse, in its Files area, without copying that data into a separate Azure storage account.
- A security policy forbids storing any storage account keys or SAS tokens in your Azure Machine Learning workspace, and requires that data access be authorized using each caller's own Microsoft Entra i
- You register a credential-less (identity-based) Azure Machine Learning datastore to an existing Azure Blob container so that no account key or SAS token is stored in the workspace. When a training job
- A data science team already keeps curated training files on an existing Azure storage service that is exposed as an SMB file share, which their compute mounts as a network drive. They want to register
- A team keeps the data they want for training in an Azure SQL Database. They ask you to register that database directly as an Azure Machine Learning datastore so jobs can read the rows by a friendly na
- You are reviewing an older runbook that instructs engineers to register an Azure Data Lake Storage Gen1 account as an Azure Machine Learning datastore. Because you can no longer create new datastores
- Your Azure Machine Learning workspace already uses its built-in default datastore, but a new project needs the workspace to also read data from a separate, pre-existing Azure Data Lake Storage Gen2 ac
- A partner team must be granted time-limited, delegated read access to a single Azure Blob container through an Azure Machine Learning datastore, without sharing the storage account key and without rel
- workspaceblobstore is the default datastore
Every workspace is created with built-in default datastores; workspaceblobstore is the default that Azure ML uses when you upload data or write job outputs (path form azureml://datastores/workspaceblobstore/paths/...). Create additional datastores with az ml datastore create --file .
Trap Uploaded data and job outputs land in workspaceblobstore by default; you do not have to create a datastore first to start working.
4 questions test this
- A new Azure Machine Learning workspace was just created and no custom datastores have been added yet. A data engineer uploads a training dataset and later runs a job that writes outputs, without speci
- Your Azure Machine Learning workspace already has its built-in workspaceblobstore, but a new project must read data from a separate, existing Azure Blob container in a different storage account owned
- Your Azure Machine Learning workspace already uses its built-in default datastore, but a new project needs the workspace to also read data from a separate, pre-existing Azure Data Lake Storage Gen2 ac
- During a training job in Azure Machine Learning, the pipeline writes its output files but the author did not specify any datastore in the output path. You need to know exactly which built-in datastore
- Autoscaling compute clusters isolate jobs and scale to zero
An Azure ML compute cluster (AmlCompute) autoscales between its minimum and maximum node counts, provisioning dedicated nodes per submitted job (so workloads stay isolated) and de-allocating back to the minimum when idle. Setting the minimum node count to 0 means you pay nothing between runs.
Trap A fixed-size cluster (minimum nodes greater than 0) keeps billing while idle; only autoscale-to-zero satisfies both per-job isolation and zero idle cost.
8 questions test this
- An MLOps lead worries that letting several data scientists submit training jobs to one shared Azure Machine Learning compute cluster will make the jobs interfere by running on the same nodes. The team
- A research group shares a single Azure Machine Learning workspace and submits unpredictable bursts of independent training jobs during business hours, but the workspace sits completely idle for long s
- A team needs to run distributed training jobs that spread across multiple nodes and automatically add nodes when a job starts, then release them when it finishes, while being shareable across several
- Your data science team runs several independent training jobs each day on an Azure Machine Learning compute cluster that was created with its minimum node count set equal to its maximum. Finance repor
- Your data science team submits bursts of independent retraining jobs to an Azure Machine Learning workspace each night, and nothing runs during the day. You must give each job its own dedicated nodes
- Your Azure Machine Learning workspace already uses an AmlCompute cluster for training, but finance flags that it keeps billing even on weekends when no jobs run because it was created with a minimum n
- To speed up job start times, an engineer configured a training compute cluster with a high minimum node count, so the cluster now runs those nodes continuously. Leadership wants each submitted job to
- You are provisioning an Azure Machine Learning compute cluster for a workload that submits many short, independent training jobs throughout the business day but sits unused overnight and on weekends.
- Compute clusters support low-priority (Spot) VMs
A compute cluster can be set to the low-priority (Spot) VM tier to run training and batch workloads on Azure surplus capacity at a steep discount. Compute instances, Azure Container Instances, and AKS inference do not offer a low-priority tier.
Trap Low-priority/Spot discounting applies to training and batch compute clusters, not to AKS or ACI real-time inference.
7 questions test this
- An MLOps engineer runs a nightly batch-scoring job in Azure Machine Learning that tolerates interruption and can be safely resubmitted if a node is reclaimed. To cut cost, the compute must run on Azur
- A cost-conscious engineer wants the low-priority (Spot) discount applied to the single-node compute instance they use for daily interactive development, so their idle notebook time becomes cheaper. Be
- A team runs its model-training jobs on Azure Machine Learning serverless compute so it never has to create or manage a cluster. The jobs are fault-tolerant and checkpoint regularly, and the team now w
- A team wants to minimize the cost of a long deep-learning training job in Azure Machine Learning. The job writes checkpoints periodically and can safely resume if a node is reclaimed, and the team is
- To reduce spend, an MLOps engineer wants to move eligible workloads onto Azure's discounted low-priority (Spot) surplus-capacity virtual machines, accepting that a node may be evicted at any time. The
- Your data science team runs several independent training jobs each day on an Azure Machine Learning compute cluster that was created with its minimum node count set equal to its maximum. Finance repor
- Your Azure Machine Learning workspace already uses an AmlCompute cluster for training, but finance flags that it keeps billing even on weekends when no jobs run because it was created with a minimum n
- Match the compute target type to the workload
A compute instance is a single-node managed dev workstation for one user (with idle shutdown); a compute cluster (AmlCompute) is multi-node autoscaling training and batch compute; managed online endpoints run on Microsoft-managed compute; attached Kubernetes (AKS or Arc) serves high-scale production inference; serverless compute is Microsoft-managed with no cluster to create.
Trap A compute instance is for interactive development, not distributed training or production serving.
20 questions test this
- An analytics team must score tens of millions of records from files once a night in Azure Machine Learning. The workload is asynchronous and not latency-sensitive, needs to run in parallel across mult
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation to write and run notebooks interactively in Jupyter and VS Code while exploring a datas
- An MLOps lead worries that letting several data scientists submit training jobs to one shared Azure Machine Learning compute cluster will make the jobs interfere by running on the same nodes. The team
- A team registers a model and must expose it as a customer-facing service that returns synchronous, low-latency predictions over HTTPS at production scale. A colleague proposes hosting the service on a
- You author a multi-step training pipeline in Azure Machine Learning and want every step to run without creating, sizing, or maintaining any compute cluster, letting Azure provision and tear down the c
- An MLOps engineer runs a nightly batch-scoring job in Azure Machine Learning that tolerates interruption and can be safely resubmitted if a node is reclaimed. To cut cost, the compute must run on Azur
- A cost-conscious engineer wants the low-priority (Spot) discount applied to the single-node compute instance they use for daily interactive development, so their idle notebook time becomes cheaper. Be
- A company must serve a registered model for real-time inference to production users in Azure and wants Azure Machine Learning to manage the underlying serving compute so the team avoids operating its
- An MLOps team has a registered model and needs to serve it for synchronous, low-latency real-time predictions over HTTPS. They want Microsoft to provision, scale, patch, and secure the underlying comp
- A research group shares a single Azure Machine Learning workspace and submits unpredictable bursts of independent training jobs during business hours, but the workspace sits completely idle for long s
- A team needs to run distributed training jobs that spread across multiple nodes and automatically add nodes when a job starts, then release them when it finishes, while being shareable across several
- A newly onboarded data scientist needs a personal, fully managed cloud workstation in the Azure Machine Learning workspace where they alone can open notebooks in Jupyter and VS Code, prototype models
- A team wants to minimize the cost of a long deep-learning training job in Azure Machine Learning. The job writes checkpoints periodically and can safely resume if a node is reclaimed, and the team is
- To reduce spend, an MLOps engineer wants to move eligible workloads onto Azure's discounted low-priority (Spot) surplus-capacity virtual machines, accepting that a node may be evicted at any time. The
- An engineer is about to create and configure a new compute cluster - choosing a VM size, minimum and maximum node counts, and an idle timeout - just to run a single command training script one time. T
- Your data science team submits bursts of independent retraining jobs to an Azure Machine Learning workspace each night, and nothing runs during the day. You must give each job its own dedicated nodes
- An MLOps engineer must run a one-off command training job in Azure Machine Learning but wants to avoid creating, sizing, scaling, or maintaining any compute infrastructure, and wants Azure to pick an
- Several data scientists in one Azure Machine Learning workspace each submit their own independent training jobs throughout the day. Instead of every person creating and maintaining their own compute,
- Your company must serve a model for real-time inference from its own existing Kubernetes cluster running in an on-premises datacenter, because data-residency rules prevent hosting the endpoint on Micr
- A team's training jobs on a hand-configured Azure Machine Learning compute cluster keep failing to start because the VM size they hard-coded exceeds their available core quota. They want Azure Machine
- Serverless compute runs training jobs with no cluster and quota-aware VM sizing
Serverless compute is a fully managed, on-demand compute that Azure Machine Learning creates, scales, and tears down for you, so there is no cluster to create or manage. You run a command, sweep, or AutoML job on it simply by omitting the compute parameter (for a pipeline job, set default_compute to "serverless"), and if you also leave out resources it defaults the instance count and picks an instance_type using your quota, cost, performance, and disk size, so it selects an appropriate VM size from your quota to avoid insufficient-quota failures.
Trap Reaching for a compute cluster, Azure Container Instances, AKS, or local compute for a 'run training jobs without provisioning or managing infrastructure' scenario; omitting the compute target to use serverless is the no-management answer, and it consumes the same Azure ML compute quota with no min/max node cluster to size.
8 questions test this
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation to write and run notebooks interactively in Jupyter and VS Code while exploring a datas
- You author a multi-step training pipeline in Azure Machine Learning and want every step to run without creating, sizing, or maintaining any compute cluster, letting Azure provision and tear down the c
- A team runs its model-training jobs on Azure Machine Learning serverless compute so it never has to create or manage a cluster. The jobs are fault-tolerant and checkpoint regularly, and the team now w
- An MLOps engineer authors a multi-step Azure Machine Learning pipeline for training and evaluation and wants every step to run on fully managed, on-demand compute so no one has to create or attach a c
- An engineer is about to create and configure a new compute cluster - choosing a VM size, minimum and maximum node counts, and an idle timeout - just to run a single command training script one time. T
- An MLOps engineer must run a one-off command training job in Azure Machine Learning but wants to avoid creating, sizing, scaling, or maintaining any compute infrastructure, and wants Azure to pick an
- A team's training jobs on a hand-configured Azure Machine Learning compute cluster keep failing to start because the VM size they hard-coded exceeds their available core quota. They want Azure Machine
- Your team's training jobs on Azure Machine Learning repeatedly fail because the fixed compute cluster requests a VM size for which the subscription has insufficient quota. You want Azure Machine Learn
- Built-in AzureML RBAC roles
Azure ML provides built-in roles: AzureML Data Scientist can perform all workspace actions except creating/deleting compute or modifying the workspace itself; AzureML Compute Operator can create, manage, delete, and access compute; plus Reader, Contributor, and Owner. Combine AzureML Data Scientist and AzureML Compute Operator to let a user run experiments and self-serve compute.
Trap Granting Owner or Contributor over-privileges a data scientist; AzureML Data Scientist is the least-privilege built-in role for running experiments.
9 questions test this
- A review finds that a junior data scientist was granted the Contributor role on the resource group that contains your Azure Machine Learning workspace so she could start running training jobs. Securit
- A data scientist on your team must run experiments, submit training jobs, and register models inside an existing Azure Machine Learning workspace, but company policy says the person must not be able t
- Your workspace has a large, frequently changing group of data scientists, and managing an individual role assignment for each person has become error-prone and is approaching the Azure subscription li
- Data scientists on your team must be able to run experiments and manage models in an Azure Machine Learning workspace, and they also need to create, resize, and delete their own compute clusters on de
- In your Azure Machine Learning workspace, one operations engineer is responsible solely for provisioning and lifecycle of compute: creating compute clusters and compute instances, resizing them, and d
- A senior data scientist needs to run experiments and submit jobs in an Azure Machine Learning workspace and must also be able to create and delete her own compute clusters on demand, so she is not blo
- A newly created Azure Machine Learning workspace uses its system-assigned managed identity to manage the dependent resources in its resource group, such as the storage account, key vault, and containe
- A platform engineer is responsible only for provisioning and maintaining the compute clusters and compute instances in an Azure Machine Learning workspace for the data science team. The engineer shoul
- A DevOps engineer supporting an Azure Machine Learning project needs to create experiments, create and attach compute clusters, submit runs, and deploy models as web services throughout the workspace.
- The workspace uses a managed identity for dependent resources
The workspace uses a managed identity (system-assigned by default, or user-assigned) to reach its dependent resources such as storage, key vault, and ACR. For workspaces created after 2024-11-19 that identity is granted the Azure AI Administrator role on the resource group, which is narrower (least-privilege) than the older Contributor default.
Trap Prefer scoped Azure RBAC roles and the workspace managed identity over embedding credentials or granting broad Contributor access.
12 questions test this
- When your Azure Machine Learning workspace stores job logs, reads data, and retrieves secrets, it must authenticate to its dependent Azure resources such as the storage account, key vault, and contain
- Three Azure Machine Learning workspaces in your division must share the same storage account and container registry. The security team wants a single identity whose lifecycle is managed independently
- Your platform team notices that new Azure Machine Learning workspaces assign the Azure AI Administrator role, rather than the older Contributor role, to each workspace's system-assigned managed identi
- A colleague is documenting how a newly created Azure Machine Learning workspace communicates with the other Azure services it depends on, such as the storage account and key vault, before any custom c
- Your organization's security policy requires disabling the admin user account on the Azure Container Registry that your Azure Machine Learning workspace uses to store training and inference images. Wi
- You deploy a model to a managed online endpoint in Azure Machine Learning. At inference time, the scoring script must read reference data from an Azure Storage account and fetch a secret from a key va
- Your organization provisions a new Azure Machine Learning workspace this quarter. During a security review, an architect asks which role the workspace's system-assigned managed identity is granted on
- A newly created Azure Machine Learning workspace uses its system-assigned managed identity to manage the dependent resources in its resource group, such as the storage account, key vault, and containe
- A regulated project stores confidential training data in Azure Blob Storage, and policy says the individual data scientists must not be granted direct access to that data. Even so, their training jobs
- An Azure Machine Learning workspace must reach its associated storage account, key vault, and container registry to run jobs and store artifacts. Your security team forbids storing any storage account
- Your team provisions a single, standalone Azure Machine Learning workspace for one data science group. The workspace must authenticate to its dependent storage account, key vault, and container regist
- A datastore in your Azure Machine Learning workspace currently caches the storage account key in the workspace key vault so jobs can reach the data. Your security team is concerned that any workspace
Machine Learning Workspace Assets
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Infrastructure as Code for Machine Learning
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Implement machine learning model lifecycle and operations
Orchestrate Model Training
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- MLflow is Azure ML's native experiment-tracking framework
Azure Machine Learning uses MLflow as its native tracking framework. A job run on Azure ML compute automatically has its MLflow tracking URI set to the workspace, so parameters, metrics, and artifacts logged with mlflow.log_param / mlflow.log_metric are stored in the workspace and shown on the job's Metrics tab.
Trap Assuming you must stand up and configure a separate MLflow tracking server; the Azure ML workspace already IS the tracking backend.
7 questions test this
- A team runs many MLflow training jobs in one Azure Machine Learning workspace for two different projects. Right now every run lands in the same automatically created default experiment, making the two
- A data scientist prototypes a model on a local workstation today but must be able to move the same training code to Azure Machine Learning compute later, while having every run's parameters and metric
- After running several MLflow-tracked training jobs in an Azure Machine Learning workspace, a reviewer wants to visually compare the logged accuracy and loss values across those runs to pick the best m
- An engineer trains a scikit-learn classifier in an Azure Machine Learning job and currently writes a separate MLflow log call for every parameter and metric, which is tedious and error-prone. The engi
- A data science team runs dozens of independent training jobs each week in an Azure Machine Learning workspace and wants one central place where the parameters, metrics, and model artifacts from every
- You submit a training script as a job to an Azure Machine Learning compute cluster, and the script logs parameters and metrics with MLflow. A teammate insists the job will lose its metrics unless you
- After several MLflow-tracked training jobs finish in your Azure Machine Learning workspace, a reviewer wants to open the workspace and visually compare the logged accuracy and loss curves across those
- mlflow.autolog() auto-captures params, metrics, and the model
Calling mlflow.autolog() before training enables automatic logging of parameters, metrics, and the trained model artifact for supported frameworks (scikit-learn, PyTorch, TensorFlow, XGBoost) without writing explicit log calls for each value.
Trap Believing you must hand-log every metric; autolog captures the standard framework metrics automatically.
6 questions test this
- A team relies on MLflow automatic logging to capture parameters and metrics for their Azure Machine Learning training jobs, which they value. For one model, however, they must log the trained model th
- You enable mlflow.autolog() in an Azure Machine Learning training job so the scikit-learn model's standard parameters and metrics are captured automatically. You also compute one custom business metri
- You are training a scikit-learn classifier in an Azure Machine Learning job and want the run to capture the model's hyperparameters, its evaluation metrics, and the trained model itself, but you do no
- An engineer trains a scikit-learn classifier in an Azure Machine Learning job and currently writes a separate MLflow log call for every parameter and metric, which is tedious and error-prone. The engi
- A team enables MLflow automatic logging in an Azure Machine Learning job that trains a supported scikit-learn model, and they now want the fitted model itself captured as an artifact for the run, not
- An engineer adds mlflow.autolog() to a training script but places the call at the very end, after the model has already been fit and evaluated, and then finds the run's parameters and metrics are miss
- Interactive runs off Azure ML compute need the tracking URI set
Code running outside Azure ML managed compute (for example on a local machine) does not inherit the workspace tracking URI. You point MLflow at the workspace with mlflow.set_tracking_uri() so those runs are also recorded in the workspace.
- AutoML supports five task types and optimizes a primary metric
Automated ML explores algorithms and hyperparameters in parallel for classification, regression, time-series forecasting, computer vision, and NLP tasks. You set the task type and a primary_metric (for example accuracy, AUC_weighted, or normalized_root_mean_squared_error) that AutoML optimizes to pick the best model.
Trap Thinking AutoML only handles classification; it also covers regression, forecasting, vision, and NLP.
5 questions test this
- You configure an automated ML classification job on a fraud dataset in which genuine transactions vastly outnumber fraudulent ones. You want automated ML to explore many algorithms and then automatica
- A team has a labeled dataset of support-ticket text and wants Azure Machine Learning automated ML to train a model that assigns each ticket to a category. They need to integrate with the workspace dat
- A retailer's data science team must generate weekly product-demand predictions and wants Azure Machine Learning to explore algorithms and hyperparameters automatically rather than hand-coding a model.
- A data science team submits an automated ML classification job on a highly imbalanced fraud dataset and wants Azure Machine Learning to compare every trial automatically and recommend a single best mo
- A retail analytics team wants Azure Machine Learning automated ML to build a model that predicts weekly product demand for the next quarter from three years of historical, date-stamped sales records.
- AutoML runs featurization automatically by default
In an AutoML job, featurization (scaling and normalization, missing-value handling, text-to-numeric encoding) runs automatically by default, and those steps become part of the produced model so they are reapplied at inference. You can set featurization to custom to override the defaults.
Trap Assuming you must manually engineer and encode all features first; AutoML featurizes automatically unless you customize it.
3 questions test this
- During an automated ML classification job, the default featurization is acceptable for most columns, but a numeric-looking account-ID column must be treated as categorical and one column needs a diffe
- An automated ML run selects a best model that a team now plans to deploy to a managed online endpoint for real-time scoring. An engineer worries the scoring script must re-implement the scaling, imput
- A data science team is about to spend a sprint manually scaling numeric columns, imputing missing values, and encoding text to numbers before submitting an automated ML classification job. They want t
- AutoML stops on configurable exit criteria
An AutoML job ends when it meets the exit criteria you configure, such as experiment_timeout_minutes, max_trials (iterations), or a metric score threshold. Voting and stacking ensemble models are enabled by default and usually appear as the final trials.
Trap Expecting AutoML to run indefinitely; it halts at the timeout, trial cap, or score threshold you set.
4 questions test this
- An MLOps engineer schedules an automated ML classification job on an autoscaling compute cluster and is concerned it could keep searching indefinitely and run up compute cost. The job must stop on its
- A team runs an automated ML regression job and wants to conserve compute by ending the search as soon as any trial produces a model that reaches an acceptable quality score, instead of exhausting ever
- A governance policy requires that an automated ML experiment must never run past a fixed nightly maintenance window, even if its metric has not yet plateaued. Separately, to control cost, the team wan
- After an automated ML classification job completes, a team reviews the ordered list of trials and notices that the two top-scoring models, appearing as the final iterations, are named VotingEnsemble a
- Notebooks run on a compute instance
Interactive experimentation and notebooks run on an Azure Machine Learning compute instance, a managed single-node cloud workstation (personal to one user) with Jupyter, JupyterLab, and VS Code. You start and stop it, and you can configure idle shutdown to avoid paying while it sits unused.
Trap Trying to open notebooks directly on a compute cluster; clusters run submitted jobs, not the interactive notebook environment.
8 questions test this
- A junior analyst attaches to an Azure Machine Learning compute cluster and tries to open JupyterLab on it to explore data interactively, but the cluster only spins up nodes when a job is submitted and
- A new team member provisions a compute cluster to write and debug notebooks interactively and is frustrated that no interactive environment appears. Separately, the team must run a four-node distribut
- Your team must run a distributed, multi-node hyperparameter sweep that provisions several dedicated GPU nodes per submitted job, runs them in parallel, and releases all of them back to zero when the s
- You enabled idle shutdown on a compute instance, but it never stops automatically overnight even though nobody is authoring notebooks on it. Investigating, you discover that a custom application you a
- Your team has been authoring notebooks on a single-node Azure Machine Learning compute instance. They now need to run a large distributed hyperparameter sweep that must execute across many dedicated n
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation where they can open Jupyter, JupyterLab, or VS Code and run exploratory notebooks inter
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation to author and interactively run Jupyter, JupyterLab, and VS Code notebooks for explorat
- Each data scientist on your Azure Machine Learning team needs their own single-owner managed development box in the cloud, preloaded with common ML frameworks and offering Jupyter, JupyterLab, and VS
- Compute instance vs compute cluster
A compute instance is single-node and stays running while started, for interactive authoring; a compute cluster (AmlCompute) is multi-node, autoscales dedicated nodes per submitted job, and can scale to 0 nodes when idle. Use the instance for notebooks and the cluster for training jobs and sweeps.
Trap Picking a cluster for interactive dev, or an instance for a distributed multi-node training job.
8 questions test this
- To control spend, your governance team requires that every Azure Machine Learning compute instance is automatically stopped at 7 PM and started again at 8 AM on weekdays, whether or not anyone is acti
- A junior analyst attaches to an Azure Machine Learning compute cluster and tries to open JupyterLab on it to explore data interactively, but the cluster only spins up nodes when a job is submitted and
- A new team member provisions a compute cluster to write and debug notebooks interactively and is frustrated that no interactive environment appears. Separately, the team must run a four-node distribut
- Your team must run a distributed, multi-node hyperparameter sweep that provisions several dedicated GPU nodes per submitted job, runs them in parallel, and releases all of them back to zero when the s
- You want an Azure Machine Learning compute target that automatically provisions dedicated nodes each time you submit a training job, runs the job in isolation, and then de-allocates those nodes on its
- Your team has been authoring notebooks on a single-node Azure Machine Learning compute instance. They now need to run a large distributed hyperparameter sweep that must execute across many dedicated n
- Each data scientist on your Azure Machine Learning team needs their own single-owner managed development box in the cloud, preloaded with common ML frameworks and offering Jupyter, JupyterLab, and VS
- An MLOps engineer leaves an Azure Machine Learning compute instance running after a notebook session and is surprised the next morning to see it still billing all night, having expected it to drop to
- Idle shutdown and start/stop schedules are how you stop paying for an idle compute instance
A compute instance is a single dedicated VM that keeps billing compute hours the whole time it is running and does not scale to zero like a compute cluster, so its main cost control is enabling idle shutdown (set idle_time_before_shutdown_minutes; the inactivity window must be at least 15 minutes and at most 3 days) and attaching start/stop schedules (up to four per instance). It only counts as inactive when there are no running kernels, terminals, jobs, VS Code connections, or custom apps.
Trap Expecting a compute instance to auto-scale to zero when idle like a compute cluster; it keeps billing until idle shutdown or a schedule stops it.
7 questions test this
- To control spend, your governance team requires that every Azure Machine Learning compute instance is automatically stopped at 7 PM and started again at 8 AM on weekdays, whether or not anyone is acti
- You enabled idle shutdown on an Azure Machine Learning compute instance, but it keeps billing hour after hour and never shuts down, even though every Jupyter notebook and terminal is closed and no tra
- You enabled idle shutdown on a compute instance, but it never stops automatically overnight even though nobody is authoring notebooks on it. Investigating, you discover that a custom application you a
- You want an Azure Machine Learning compute target that automatically provisions dedicated nodes each time you submit a training job, runs the job in isolation, and then de-allocates those nodes on its
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation where they can open Jupyter, JupyterLab, or VS Code and run exploratory notebooks inter
- A data scientist joining your Azure Machine Learning workspace needs a personal, fully managed cloud workstation to author and interactively run Jupyter, JupyterLab, and VS Code notebooks for explorat
- An MLOps engineer leaves an Azure Machine Learning compute instance running after a notebook session and is surprised the next morning to see it still billing all night, having expected it to drop to
- Sweep jobs sample a search space with grid, random, or bayesian
A sweep job automates hyperparameter tuning by exploring a defined search space with a sampling algorithm: random, grid, or bayesian sampling. You also set a primary_metric plus its goal (maximize or minimize) that the sweep optimizes across trials.
Trap Choosing grid sampling for a large or continuous search space, where random or bayesian sampling is far more efficient.
6 questions test this
- You configure an Azure Machine Learning sweep job to tune several continuous hyperparameters, such as learning rate and dropout, across a wide range of values. Your compute budget is limited, and you
- Your team has already narrowed an Azure Machine Learning sweep job to a few important hyperparameters and has enough compute budget to run many trials sequentially. You want each new trial to be selec
- An MLOps engineer must tune a model whose search space includes continuous hyperparameters over wide ranges. Two requirements apply at once: the sweep must attach an early-termination policy to cancel
- You are setting up an Azure Machine Learning sweep job to tune a classification model. You have already defined the search space and chosen a sampling algorithm, but the sweep still needs to know what
- An MLOps engineer sets up a sweep job in Azure Machine Learning to tune a model whose search space mixes discrete and continuous hyperparameters over wide ranges. The team has a limited compute budget
- Your Azure Machine Learning sweep job tunes continuous hyperparameters with Bayesian sampling, and a teammate suggests adding an early-termination policy to cancel weak trials and save cost. You need
- Early-termination policies cancel poorly performing trials
To cut cost, a sweep job can apply an early-termination policy that cancels underperforming trials early: bandit (slack_factor or slack_amount off the best run), median_stopping, or truncation_selection. Policies use evaluation_interval and delay_evaluation to control when they start acting.
Trap Confusing bandit's slack (distance from the best run) with truncation selection's fixed percentage of worst trials.
8 questions test this
- Your Azure Machine Learning sweep job trains many trials, and you want a conservative early-termination policy that saves cost with little risk of cancelling a trial that might still become the best.
- You run an Azure Machine Learning sweep job with many trials and want a cost-saving rule that, at every evaluation interval, cancels a fixed percentage of the worst-performing trials so far and keeps
- Your Azure Machine Learning sweep job uses Bayesian sampling to tune a model, and to reduce compute cost you plan to attach a bandit early-termination policy so that weak trials are cancelled before t
- An MLOps engineer must tune a model whose search space includes continuous hyperparameters over wide ranges. Two requirements apply at once: the sweep must attach an early-termination policy to cancel
- A sweep job runs a large number of trials, and the team wants an early-termination policy that, at each evaluation interval, cancels a set proportion of the worst-performing trials so far, rather than
- A sweep job in Azure Machine Learning runs many trials with random sampling to tune a classification model. To control cost, the team wants to automatically cancel any trial whose primary metric falls
- Your Azure Machine Learning sweep job tunes continuous hyperparameters with Bayesian sampling, and a teammate suggests adding an early-termination policy to cancel weak trials and save cost. You need
- A colleague configured an Azure Machine Learning sweep job with Bayesian sampling and also set a bandit early-termination policy, expecting underperforming trials to be cancelled and cut cost. After t
- Bayesian sampling does not support early termination
Bayesian sampling chooses each new set of hyperparameter values from the results of prior trials and does NOT support early-termination policies (set the policy to None). Random and grid sampling do support early termination.
Trap Pairing bayesian sampling with a bandit or median-stopping policy; only random and grid sampling allow early termination.
4 questions test this
- Your Azure Machine Learning sweep job uses Bayesian sampling to tune a model, and to reduce compute cost you plan to attach a bandit early-termination policy so that weak trials are cancelled before t
- An MLOps engineer must tune a model whose search space includes continuous hyperparameters over wide ranges. Two requirements apply at once: the sweep must attach an early-termination policy to cancel
- Your Azure Machine Learning sweep job tunes continuous hyperparameters with Bayesian sampling, and a teammate suggests adding an early-termination policy to cancel weak trials and save cost. You need
- A colleague configured an Azure Machine Learning sweep job with Bayesian sampling and also set a bandit early-termination policy, expecting underperforming trials to be cancelled and cut cost. After t
- A command job runs a training script on a compute target
You run a training script as a command job that specifies the command (for example python train.py), the code folder, an environment (a curated or custom Docker/conda image), and a compute target. Submit it with az ml job create -f job.yml.
Trap Confusing environment with compute; a command job needs both an environment (dependencies) and a compute target (hardware).
7 questions test this
- You define a command job to train a model. You have already written the training script, its start command, and identified the source code folder. Before the job can run in the cloud, two more pieces
- You submit a training script as an Azure Machine Learning command job on a compute cluster. The job reaches the cluster and starts, but the run fails within seconds with a ModuleNotFoundError because
- A data scientist has been running train.py interactively on an always-on Azure Machine Learning compute instance. The team now needs each training run to be reproducible, tracked with its inputs and o
- A team wants to run a single Python training script that they package with its code folder, a curated environment, and a compute target, and submit it as one reproducible, tracked run in Azure Machine
- An engineer authors a command job that sets the training script's start command, the code folder, and an Azure Machine Learning compute cluster as the target, then submits it. The run reaches the clus
- A training command job needs a Python library that is not present in any Azure Machine Learning curated environment, and the team wants every future run of the job to resolve to the exact same set of
- A data scientist has a single Python training script in a source folder and wants to run it in the cloud on an Azure Machine Learning compute cluster, packaging the script, its start command, and its
- Typed inputs/outputs bind data to the job
A command job's inputs mount or download data assets and URIs into the script, and its outputs write results back to workspace-managed storage. You reference them in the command with ${{inputs.}} and ${{outputs.}} placeholders instead of hardcoding storage paths.
Trap Hardcoding blob/datastore paths in the script rather than using typed inputs/outputs, which breaks portability and lineage.
9 questions test this
- A command job's training script writes its trained model and metrics to a local folder on the compute node. After the job finishes and the node is de-allocated, the team cannot find the results. They
- An MLOps engineer must feed a specific versioned data asset that is already registered in the workspace into a training command job, and the team requires each run to record exactly which data version
- Your command job's script needs a large registered data asset that lives in the workspace. You want Azure Machine Learning to make that data available to the script at runtime, either by mounting it o
- A data scientist has been running train.py interactively on an always-on Azure Machine Learning compute instance. The team now needs each training run to be reproducible, tracked with its inputs and o
- A command job trains a model and must persist its output metrics and model files so they are captured as tracked job outputs in workspace-managed storage and remain available after the compute scales
- A command job runs correctly in a development workspace, but the team must promote the identical job to separate test and production workspaces without editing the training script for each one. Today
- A command job runs today against data referenced by an absolute storage account URL written into the training code. The team must run the identical job in another workspace whose data sits in a differ
- An engineer's training script currently opens its dataset directly from a hard-coded blob storage URL. When the data is later moved to a different container the command job breaks, and the workspace s
- A training script for a command job currently opens its dataset by reading a hardcoded blob storage URL embedded in the code. The team wants the same job to run unchanged against different registered
- Distribution config scales training across nodes
To train large or deep-learning models across multiple nodes, a command job sets a distribution with type pytorch, tensorflow, or mpi (for example Horovod), together with instance_count (number of nodes) and process_count_per_instance (processes or GPUs per node).
Trap Setting instance_count greater than 1 without a distribution config; the workers then run independently instead of coordinating.
9 questions test this
- A team must cut the training time of a large deep-learning model that currently trains on a single Azure Machine Learning node. They want each node in a GPU cluster to hold a full copy of the model, p
- You already run a working distributed PyTorch command job in Azure Machine Learning, and its distribution type and per-node process count are set correctly. Training is still too slow, so you decide t
- You scale an Azure Machine Learning command job that trains a deep-learning model onto a four-node GPU cluster by raising the job's node count. The job now runs on every node, but training finishes no
- An engineer scales a PyTorch DistributedDataParallel job onto a two-node Azure Machine Learning cluster whose virtual machines each expose four GPUs. She adds a PyTorch distribution and sets instance_
- A machine learning engineer submits an Azure Machine Learning command job to train a large deep-learning model on a four-node GPU compute cluster. She sets instance_count to four, but training runs no
- A team ports a legacy TensorFlow 1.x training script that uses the parameter-server strategy to Azure Machine Learning. They correctly choose the TensorFlow distribution for the command job and set a
- Your team wants to train a very large language model on Azure Machine Learning and plans to use DeepSpeed's ZeRO memory optimizations to fit the model across many GPU nodes. An engineer starts writing
- A data science team trains a very large deep-learning model that now takes several days on a single powerful GPU virtual machine, and the deadline no longer allows that. They want the training run its
- An engineer wants a training command job to run across three nodes of an Azure Machine Learning compute cluster. The cluster already allows up to eight nodes, and a PyTorch distribution is configured
- process_count_per_instance usually equals GPUs per node
process_count_per_instance is typically set to the number of GPUs on each node, and scaling out with a larger instance_count requires a compute cluster whose VM SKU provides those GPUs.
- Distribution type must match the training framework
Set distribution.type (or use the typed PyTorchDistribution, TensorFlowDistribution, or MpiDistribution object) to match the framework the script uses: PyTorch for torch.distributed/DistributedDataParallel scripts, TensorFlow for tf.distribute (using worker_count, plus parameter_server_count for the parameter-server strategy), and mpi for MPI or Horovod. DeepSpeed is not a separate distribution type; you launch it through either the PyTorch or the MPI distribution.
Trap Selecting mpi for a plain PyTorch DistributedDataParallel script, which needs the PyTorch type, or treating DeepSpeed as its own distribution.type instead of launching it through the PyTorch or MPI distribution.
7 questions test this
- An engineer scales a PyTorch DistributedDataParallel job onto a two-node Azure Machine Learning cluster whose virtual machines each expose four GPUs. She adds a PyTorch distribution and sets instance_
- Your training script initializes torch.distributed and wraps the model in PyTorch DistributedDataParallel, and you now configure an Azure Machine Learning command job to run it across several GPU node
- A data science team's training script uses Horovod to run synchronous distributed training and calls hvd.init() to set up communication between the workers. You are configuring an Azure Machine Learni
- You are configuring an Azure Machine Learning command job for a training script that uses torch.distributed with DistributedDataParallel and the NCCL backend on a multi-node GPU cluster. A colleague s
- You are moving a TensorFlow 2 deep-learning training script to Azure Machine Learning. The script uses the tf.distribute.Strategy API (MultiWorkerMirroredStrategy) to synchronize gradients across work
- A team ports a legacy TensorFlow 1.x training script that uses the parameter-server strategy to Azure Machine Learning. They correctly choose the TensorFlow distribution for the command job and set a
- Your team wants to train a very large language model on Azure Machine Learning and plans to use DeepSpeed's ZeRO memory optimizations to fit the model across many GPU nodes. An engineer starts writing
- A training pipeline chains reusable components
A training pipeline is a pipeline job made of components, where each component is a self-contained step with typed inputs/outputs, an environment, and code. Components are registered, versioned assets that can be reused across pipelines and shared, and each step can run on its own compute.
Trap Treating a standalone command job as reusable; the component is the registerable, shareable unit that pipeline steps consume.
11 questions test this
- In an Azure Machine Learning workspace, you want to register the reusable data-preparation step of your training pipeline as a first-class, versioned asset — the same way you register models and envir
- You are building an Azure Machine Learning training pipeline in which a data-preparation component produces a processed dataset that the downstream model-training component must consume. You need the
- A data engineer built a data-preparation step as a standalone Azure Machine Learning command job. Several other teams now want to reuse that identical step inside their own training pipelines, without
- On a data science team, one engineer owns data preparation, another owns model training, and a third owns evaluation. You want each engineer to develop, test, and optimize their own step independently
- In Azure Machine Learning v2, resources such as compute and datastores are separate from assets, which are versioned and can be registered in the workspace. Within a pipeline job, each step consumes o
- Your data science team keeps three separate scripts that prepare data, train a model, and evaluate it, and today an engineer runs them by hand in sequence for every experiment. You want to orchestrate
- Your organization runs separate Azure Machine Learning workspaces for the development, test, and production teams. A data-preparation component built by the development team must be discoverable and r
- A training step must run identically no matter which team's Azure Machine Learning pipeline uses it, with the exact same Python code and package dependencies every time, so that no team has to re-crea
- In an Azure Machine Learning training pipeline, the data-preparation step is CPU-bound while the model-training step needs GPUs. You want the preparation step to run on an inexpensive CPU cluster and
- You author three reusable Azure Machine Learning components — data preparation, model training, and model evaluation. You need to run them as one automated, end-to-end workflow in which Azure Machine
- A shared Azure Machine Learning training component is registered and consumed by several teams' production pipelines. You need to ship an improved version of the component's logic, but the existing pi
- Pipeline steps can reuse unchanged outputs
Azure ML can reuse a prior step's cached output when that component's code and inputs are unchanged, skipping recomputation to save time and cost on subsequent pipeline runs.
- Compare metrics across runs to choose the best model
Because each run logs metrics to the workspace via MLflow, you compare model performance across jobs by selecting multiple runs in an experiment and viewing their logged metrics side by side in the studio (or querying them with the MLflow API) to identify the best model.
Trap Comparing on training loss instead of the agreed primary/validation metric used to select the production candidate.
9 questions test this
- When you open Azure Machine Learning studio to compare several completed training jobs, a few of the runs show no value for the agreed validation metric, so you cannot rank them against the others. Yo
- Your team agreed before training that the model with the highest validation AUC would be promoted to production. After a dozen MLflow runs finish in the experiment, a colleague suggests choosing the w
- Several completed runs in an Azure Machine Learning experiment each logged both a training-set loss and a validation metric that the team agreed in advance is the criterion for selecting the productio
- Different members of your team logged runs for the same model into several separate Azure Machine Learning experiments over multiple project iterations. You must pull every run's logged metrics into a
- The same model was trained by different teammates who each logged their runs in a separate Azure Machine Learning experiment. You must compare all of those runs against the one agreed validation metri
- An engineer needs to compare the logged metrics of every run in an Azure Machine Learning experiment from a script, with no studio UI, and then select the best run by the agreed validation metric. The
- A data science team runs many independent training jobs inside a single Azure Machine Learning experiment, and every job logs its evaluation metrics to the workspace through MLflow. The team now wants
- An Azure Machine Learning experiment holds fifteen finished training jobs, each having logged its evaluation metrics to the workspace with MLflow. Before registering a model, you need to determine whi
- A data science team completes a dozen independent training jobs for the same model in one Azure Machine Learning experiment, each logging its metrics to the workspace through MLflow. To choose the pro
- Sweep and AutoML surface the best trial by primary_metric
AutoML and sweep jobs already rank trials by the configured primary_metric and surface the single best trial, so choosing a production candidate means taking that best trial's model rather than manually re-ranking every run.
Trap Re-picking a model by a different metric than the primary_metric the job optimized, which can select a worse model.
8 questions test this
- You configure an Azure Machine Learning AutoML classification job, set its primary_metric to accuracy to match the agreed business goal, and let it train and evaluate many candidate models across seve
- You add an Azure Machine Learning AutoML training step to an MLOps pipeline, and a downstream step must automatically register the single best model that the AutoML job produced, judged by the job's c
- You run an Azure Machine Learning hyperparameter sweep job whose objective sets primary_metric to "accuracy" with the goal to maximize. After all trials finish, you need the single model that performe
- A colleague finished an Azure Machine Learning sweep job that maximized F1-score as its primary metric across forty trials. To save time they plan to skip the sweep's own ranking and instead scroll th
- You configure an Azure Machine Learning AutoML classification job with AUC_weighted set as the primary metric because your dataset is imbalanced. When the job completes, dozens of trials have run. You
- An Azure Machine Learning AutoML regression job used normalized_root_mean_squared_error as its primary_metric, chosen to match the business need, and finished by recommending a best model. A colleague
- In Azure Machine Learning studio you open a completed AutoML regression job that optimized normalized_root_mean_squared_error as its primary metric. Leadership asks which of the many trained models th
- You submit an Azure Machine Learning hyperparameter sweep job whose objective sets a primary_metric and a goal to maximize it, and the sweep runs many trials as child jobs. After the sweep completes,
Model Registration and Versioning
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Deploy Models for Production
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Monitor and Maintain Models
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Design and implement a GenAIOps infrastructure
Foundry Environments and Platform Configuration
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- Foundry project is the default; a hub-based project is only for Azure ML / open-model workloads
Microsoft Foundry offers two project types. A Foundry project is the default, generally available choice and the only one that exposes the Foundry API and Foundry Agent Service; a hub-based project is required only when you need Azure Machine Learning compatibility, managed compute, or open-source model hosting and fine-tuning.
Trap Choosing a hub-based project 'to use prompt flow' — prompt flow is on a retirement path (support ends 2027-04-20), so it is not a reason to pick a hub project for new work.
14 questions test this
- A generative AI team must run the Foundry Agent Service under a generally available service level for a production agent, and they want the project type that also gives first-class access to the Found
- Your organization's governance policy forbids using preview features for any production workload. A team needs to run agents built on the Foundry Agent Service in production and call the Foundry API.
- A team plans to bring an open-weight foundation model from the model catalog into Microsoft Foundry, host it, and fine-tune it on Azure Machine Learning managed compute so they control the underlying
- A team is planning a brand-new agent solution in Microsoft Foundry. A developer proposes provisioning a hub-based project specifically so the team can build the orchestration in prompt flow, the tool
- A team must build generative AI features but also needs Azure Machine Learning compatibility, including managed compute and the Azure Machine Learning studio tooling, within the same project. A plain
- A team has historically used a hub-based project, but they are starting a new use case that only needs to build agents and work with Foundry Models, with no Azure Machine Learning or managed-compute r
- An engineer is selecting a project type for a new customer-facing assistant that calls foundation models and uses the Foundry Agent Service. A colleague suggests a hub-based project, but the team conf
- An organization is beginning its first generative AI initiative and wants a single top-level Azure resource that will hold its Foundry projects and centrally govern networking, security, and model dep
- An administrator must decide where to configure security, connectivity to other Azure services, and model deployments so that the settings apply across a team's generative AI work, while individual us
- A developer wants to independently spin up an environment to prototype ideas with foundation models without provisioning extra Azure resources or waiting for an administrator to build shared infrastru
- While planning a new generative AI application, a developer recommends creating a hub-based project so the team can use prompt flow to author and compare prompt variants. The application only needs to
- A team currently works in a hub-based project created a year ago. New agent and model-centric capabilities, including the generally available Foundry Agent Service and Foundry API, are landing only on
- A development team is starting a brand-new generative AI application in Microsoft Foundry. They need to build agents with the Foundry Agent Service and call models through the Foundry API, and they wa
- An ML team wants to deploy an open-source Hugging Face model to managed compute in Microsoft Foundry and fine-tune it with Azure Machine Learning compatibility. The default Foundry project type does n
- The Foundry resource is the top-level Azure resource that contains projects
A Microsoft Foundry resource is the top-level Azure resource you create first; projects are child scopes inside it that group models, agents, connections, and deployments. The Azure Machine Learning workspace remains the top-level resource for classic ML assets, not for generative AI work.
Trap Treating the Azure Machine Learning workspace as the container for Foundry generative-AI projects.
8 questions test this
- A developer working inside an existing Microsoft Foundry resource wants to keep two use cases - a support-ticket agent and a document-summarization agent - separated, each with its own files, evaluati
- A platform administrator manages several Foundry projects that different teams use to build agents. The administrator must apply one shared set of model deployments, network security rules, and connec
- Within one company, a data science group trains classic (non-generative) machine learning models such as AutoML regression and scikit-learn classifiers, registering datasets, components, and scheduled
- An engineer is about to start building generative AI agents and plans to place the new Foundry projects inside the team's existing Azure Machine Learning workspace, assuming the workspace is their con
- An organization is beginning its first generative AI initiative and wants a single top-level Azure resource that will hold its Foundry projects and centrally govern networking, security, and model dep
- An administrator must decide where to configure security, connectivity to other Azure services, and model deployments so that the settings apply across a team's generative AI work, while individual us
- A data platform group already uses an Azure Machine Learning workspace as the top-level resource for its classic ML assets, such as datasets, components, and training jobs. A separate team is now star
- A development team is starting a brand-new generative AI application in Microsoft Foundry. They need to build agents with the Foundry Agent Service and call models through the Foundry API, and they wa
A Foundry connection is a named, project-scoped object that stores the endpoint and credentials for an external dependency such as Azure Storage, Azure AI Search, or Application Insights, so components and agents reuse the connection instead of embedding secrets in each definition.
Trap Hard-coding a resource key into each agent or prompt rather than referencing one shared connection.
27 questions test this
- A Microsoft Foundry project's agents already reuse an existing connection to reach the team's Azure AI Search service. Leadership now requires those same agents to also send their traces and metrics t
- A Microsoft Foundry project hosts several agents that all query the same Azure AI Search service to ground their answers. Your security team requires that the search endpoint and its key live in exact
- A Microsoft Foundry project must call a third-party, non-Azure REST service that authenticates with an API key. You want the key stored securely inside the project and referenced by name, together wit
- In a Microsoft Foundry project, several components and agents each paste the same Azure Storage account key directly into their definitions. Each new component copies the key again, and any change to
- During a design review for a Microsoft Foundry project, a teammate asks you to explain what a connection actually is before the team standardizes on using them for every external dependency such as Az
- A security review of a Microsoft Foundry project finds that the same Azure AI Search key has been pasted into a dozen different agent definitions. You must remove the duplicated secret from the defini
- A reviewer asks how a Foundry connection keeps an external resource's API key from being exposed inside the agent and prompt definitions that reuse it. The project uses key-based authentication and ha
- You are provisioning a standard Microsoft Foundry agent that must store the vector indexes it builds in a resource in your own subscription, and the agent has to authenticate to that resource through
- You are deploying a Standard Agent in a Microsoft Foundry project so that the agent keeps its uploaded files and its retrieval index in your own Azure Storage and Azure AI Search resources for data re
- Your team needs server-side tracing turned on for every agent in a Microsoft Foundry project so that latency and tool calls are captured for debugging, and you want this to work without changing each
- You are adding a remote MCP server tool to a Foundry agent so it can call an external developer API that requires a bearer token on every request. Several agents in the project will use the same serve
- A Foundry agent must answer questions about breaking news and other information published after the model's training cutoff, drawing on current public web results rather than any internal index. The t
- Within one Microsoft Foundry project, several components and a prompt-based workflow all need to call the same external Azure AI Search dependency. You want each component to reuse the same stored aut
- A team integrates a Foundry agent with a non-Microsoft REST service used in a LangChain flow. They must store the service's endpoint URL, an API version label, and its access key together as one reusa
- A Microsoft Foundry project's agents must call GPT-4o deployments hosted in an existing Azure OpenAI resource that already lives in the same subscription. You want every agent to reach those model dep
- An operations team runs a Foundry generative-AI application in production and wants distributed tracing of each request, including LLM calls, tool invocations, latency, and errors, so they can diagnos
- An MLOps engineer is grounding a Foundry agent in the company's internal product manuals so it can answer support questions with citations from that proprietary content. The documents are already load
- You are configuring the Azure AI Search knowledge tool on a Microsoft Foundry agent so it can retrieve documents from an existing search index and return cited answers. The tool must reach the search
- You are creating a Foundry connection from a project to an Azure AI Search service that will be used inside a private virtual network. Security policy forbids storing static resource keys and requires
- A data science team is operationalizing several Foundry agents in one project. Today each agent definition embeds the same Azure AI Search admin key directly in its configuration, and rotating that ke
- By default a Microsoft Foundry project stores its connection secrets in a platform-managed key vault. Your security team's governance standard requires that the secrets backing the project's connectio
- Two separate Microsoft Foundry projects on your team each need to use the same Azure AI Search service, and your governance standard says one project must never inherit another project's stored creden
- A Foundry project team is deploying a Standard agent that must read a large collection of raw PDF manuals, product images, and installer files that currently sit in a cloud storage account. The team n
- A new engineer joins a Microsoft Foundry project and needs to build a component that reads from the project's Azure Storage account. Project policy forbids sharing raw storage keys with individuals, y
- An MLOps engineer must let a Microsoft Foundry agent answer employee questions by grounding its responses in documents that live in the company's internal SharePoint site, while keeping each employee'
- Your team standardizes several Microsoft Foundry agents on models served directly from OpenAI's own hosted platform rather than an Azure OpenAI resource. You must store the OpenAI account's API creden
- You configure a standard Microsoft Foundry agent whose conversation threads and messages must persist in your own Azure Cosmos DB account for compliance. The agent has to authenticate to Cosmos DB wit
- A connection can authenticate with an Entra identity instead of a key
A Foundry connection can authenticate to its target resource with a Microsoft Entra identity (the resource's managed identity) rather than an API key, keeping secrets out of the connection object and letting Azure RBAC govern who can use it.
- System-assigned vs user-assigned managed identity for a Foundry resource
A Foundry resource can use a system-assigned managed identity (created and deleted with the resource, one-to-one) or a user-assigned managed identity (a standalone Azure resource you can attach to several resources and manage independently) to access dependencies such as Storage or Key Vault without stored credentials.
Trap Using an account key or SAS token where a managed identity is required for keyless, credential-free access.
12 questions test this
- A production application hosted on Azure must call your Microsoft Foundry inference endpoint. Company policy prohibits storing any API keys or secrets in the application's configuration or code, and e
- A newly created Microsoft Foundry project must connect to its associated Azure Storage account and Azure Key Vault so it can store prompt-flow data and retrieve secrets. Company policy forbids placing
- Your team provisions a single Microsoft Foundry resource that must read training data from one dedicated Azure Storage account, with no credentials kept in code or connection strings. The security tea
- Your MLOps pipeline deploys new Microsoft Foundry resources on demand, and each new resource must already have permission to a shared Azure Storage account the moment it is created, with no manual rol
- Your MLOps platform tears down and recreates a Microsoft Foundry resource on every release so it always matches the latest template. Each rebuilt resource must keep the exact same access to a shared A
- During a Microsoft Foundry platform design review, an architect asks which identity option is a standalone Azure resource that has its own independent lifecycle and can be attached to several differen
- Your organization runs many independent Microsoft Foundry resources, one per project team. Security requires that each resource authenticate to its own dependencies with a distinct identity that no ot
- Your platform team runs several Microsoft Foundry resources across development, test, and production, and wants all of them to authenticate to a shared Azure Key Vault by using one identity with a sin
- An MLOps engineer provisions a single Microsoft Foundry resource that must read training data from one Azure Storage account and pull secrets from one Key Vault without any stored connection strings o
- A self-contained Microsoft Foundry resource hosts one workload that needs credential-free access to a single storage account. The team wants an identity that requires no separate object to create, adm
- An MLOps engineer configures a Microsoft Foundry agent that must call downstream tools and its Foundry project using a managed identity, with no secret stored anywhere in the workload. The team also w
- Your team provisions a dedicated Microsoft Foundry resource for a short-lived proof of concept that must read data from one Azure Storage account without any stored credentials. When the proof of conc
- Prefer Microsoft Entra (keyless) authentication over API keys
For production Foundry access, Microsoft Entra ID token authentication with a managed identity is preferred over API keys; you can disable local (key) authentication so every data-plane call is authorized through Entra ID and RBAC rather than a shared secret.
Trap Assuming API keys are as safe as Entra ID — keys cannot be scoped by RBAC and are harder to rotate or revoke per user.
12 questions test this
- A production application hosted on Azure must call your Microsoft Foundry inference endpoint. Company policy prohibits storing any API keys or secrets in the application's configuration or code, and e
- A newly created Microsoft Foundry project must connect to its associated Azure Storage account and Azure Key Vault so it can store prompt-flow data and retrieve secrets. Company policy forbids placing
- A developer argues that the shared API key on a Microsoft Foundry resource is 'just as safe' as Microsoft Entra ID because the key is long and random. As the MLOps lead, you must counter this with the
- A developer must build and run agents against a production Microsoft Foundry resource and also start evaluation runs on it. In Foundry, the Agents service and evaluations are not supported with key-ba
- A new developer needs to build and test agents against a production Microsoft Foundry resource but must not receive broad control-plane rights or the resource's shared key. You want to grant only the
- Your organization is moving a Microsoft Foundry inference workload into production. The security team mandates that every data-plane call be attributable to an individual principal, authorized by leas
- An organization has migrated every client of a production Microsoft Foundry resource to Microsoft Entra ID token authentication and verified that no workload still depends on a key. To satisfy a compl
- You migrated every client of a production Microsoft Foundry resource to Microsoft Entra ID token authentication. Compliance now requires that the resource reject any request that still presents a reso
- An MLOps engineer provisions a single Microsoft Foundry resource that must read training data from one Azure Storage account and pull secrets from one Key Vault without any stored connection strings o
- An MLOps engineer configures a Microsoft Foundry agent that must call downstream tools and its Foundry project using a managed identity, with no secret stored anywhere in the workload. The team also w
- A production application authenticates its data-plane calls to a Microsoft Foundry resource with a single shared API key that every service instance embeds. Security now requires per-user attribution
- Your team provisions a dedicated Microsoft Foundry resource for a short-lived proof of concept that must read data from one Azure Storage account without any stored credentials. When the proof of conc
- Foundry User grants the minimum permissions to use a project and its models
The built-in Foundry User role (formerly Azure AI User) grants the least-privilege access needed to work inside a project and call its deployed models; assign it to team members who build and test rather than granting a broad Owner or Contributor role.
Trap Granting Owner or Contributor for everyday build-and-test work, over-provisioning access beyond what Foundry User already allows.
13 questions test this
- In Microsoft Foundry, developers finish an agent that must be published as an Agent Application with a stable callable endpoint. Your governance rules say the publisher should receive the least-privil
- You are configuring a new Microsoft Foundry project. At runtime the project's system-assigned managed identity must call the project's deployed models and use its resources, but it should hold only th
- A team lead in Microsoft Foundry must both build and develop within their team's project and onboard new developers by granting them the Foundry User role, all without being assigned the subscription
- A senior developer in Microsoft Foundry needs to both build and iterate on agents inside a project and publish finished agents as Agent Applications with stable endpoints, but should not be able to cr
- A team lead in Microsoft Foundry must build and test agents in their team's project and also onboard new teammates by granting them the Foundry User role themselves, without waiting on a subscription
- A developer already holds the Contributor role on a Microsoft Foundry resource but receives 403 errors when creating an agent and calling a deployed model in a project. You determine the failure is a
- You administer a Microsoft Foundry resource. A group of developers needs to work inside a single project, building and testing agents and calling the project's already-deployed models, but they should
- A colleague is provisioning access for a small team in a Microsoft Foundry project. Because the team spends most of its time calling the project's deployed models, the colleague proposes granting only
- A developer with the Foundry User role finished building and testing an agent in a Microsoft Foundry project and now needs to publish it as an Agent Application with a stable endpoint for others to ca
- You are planning role assignments for a new Microsoft Foundry project. A colleague suggests giving every developer the Foundry Project Manager role so they have room to grow. In practice these develop
- In Microsoft Foundry, a developer who holds the Foundry User role tries to deploy a model from the model catalog to the resource, but the action is blocked. You need to grant the role that is required
- In a Microsoft Foundry project, one team of developers must build agents, iterate on them, and test them against the project's deployed models, while a separate downstream service principal only needs
- After you create a Microsoft Foundry project, its system-assigned managed identity must access the parent Foundry resource at runtime so the project can use deployed models and features. Following Mic
- Foundry Project Manager is the elevated build role whose distinctive power is publishing agents
The Foundry Project Manager role (formerly Azure AI Project Manager) is the elevated developer role: it is the minimum role that can publish agents (Foundry Account Owner cannot publish) and it can conditionally assign the Foundry User role to others. Microsoft pages currently disagree on whether it can also create projects or manage model deployments - the canonical rbac-foundry matrix (2026-07) marks both as NOT granted - so questions must not anchor on those claims; Foundry Account Owner and Foundry Owner cover full resource management and model deployment.
Trap Assuming Project Manager can create projects or deploy models; the canonical RBAC matrix denies both, and its distinctive documented power is agent publishing plus conditional Foundry User assignment.
8 questions test this
- In Microsoft Foundry, developers finish an agent that must be published as an Agent Application with a stable callable endpoint. Your governance rules say the publisher should receive the least-privil
- A team lead in Microsoft Foundry must both build and develop within their team's project and onboard new developers by granting them the Foundry User role, all without being assigned the subscription
- Your automation assigns Foundry roles by their role definition IDs. During the Foundry rename rollout, you notice the Azure portal shows 'Azure AI Project Manager' in one blade and 'Foundry Project Ma
- A senior developer in Microsoft Foundry needs to both build and iterate on agents inside a project and publish finished agents as Agent Applications with stable endpoints, but should not be able to cr
- A team lead in Microsoft Foundry must build and test agents in their team's project and also onboard new teammates by granting them the Foundry User role themselves, without waiting on a subscription
- A developer with the Foundry User role finished building and testing an agent in a Microsoft Foundry project and now needs to publish it as an Agent Application with a stable endpoint for others to ca
- You are planning role assignments for a new Microsoft Foundry project. A colleague suggests giving every developer the Foundry Project Manager role so they have room to grow. In practice these develop
- In Microsoft Foundry, a developer who holds the Foundry User role tries to deploy a model from the model catalog to the resource, but the action is blocked. You need to grant the role that is required
- Managed VNet isolation modes: Allow internet outbound vs Allow only approved outbound
A Foundry managed virtual network supports two isolation modes: Allow internet outbound (agents may reach public endpoints) and Allow only approved outbound (outbound is limited to approved private endpoints and FQDN rules). Only Allow only approved outbound enables automatic data-exfiltration protection, and adding an outbound FQDN rule automatically provisions an Azure Firewall.
Trap Believing Allow internet outbound provides data-exfiltration protection — only Allow only approved outbound does.
15 questions test this
- In a Foundry managed virtual network, the platform created managed private endpoints so agents can reach Azure Storage privately. An engineer opens the subscription's network resources to inspect the
- Your organization wants Foundry agents to reach only a curated list of external domains and requires that no team has to deploy, patch, or operate a firewall themselves. You are choosing how to contro
- Your Foundry managed virtual network runs in Allow only approved outbound mode, and you add an outbound rule that permits egress to a specific approved fully qualified domain name your agents must cal
- You enable a Microsoft Foundry managed virtual network so that agents in your projects can reach a curated set of approved Azure resources but must not send data to arbitrary public endpoints. You nee
- An enterprise networking team must inspect and log all outbound traffic from Foundry agents through the company's own Azure Firewall instance and apply user-defined routes. They evaluate the Foundry m
- Your security team requires that agents in a Microsoft Foundry project reach only an approved Azure Storage account and one approved external API, with automatic data-exfiltration protection so nothin
- A team deploys a Microsoft Foundry resource with its managed virtual network in Allow only approved outbound mode. Because outbound traffic is now restricted to approved destinations, the team is conc
- A Foundry managed virtual network runs in Allow only approved outbound mode. An agent must read data from an Azure Storage account that has public network access disabled, and all connectivity must st
- In a Foundry managed virtual network set to Allow only approved outbound, an agent must be allowed to reach an Azure platform service that publishes a large, changing set of public IP ranges, and you
- You are provisioning a Microsoft Foundry managed virtual network for a development team whose agents must be able to call many public endpoints across the internet. Unrestricted outbound access is acc
- Your Microsoft Foundry managed virtual network is running in Allow only approved outbound mode. Agents in the project must query a specific Azure AI Search service over a private connection that keeps
- Your Foundry managed virtual network is set to Allow only approved outbound. An agent must reach a specific external SaaS API by its fully qualified domain name over HTTPS, so you plan to add an outbo
- Your Foundry agents legitimately need broad, unrestricted connectivity to many public internet endpoints, and the workload has no data-exfiltration or curated-destination requirement. You are enabling
- A machine learning team enabled a Microsoft Foundry managed virtual network for their Foundry resource in Allow only approved outbound mode. A new development workload now requires the project's agent
- After enabling a Foundry managed virtual network, an engineer opens the Azure portal to find the network interface (NIC) and private IP that the managed private endpoint to the storage account created
- Use a private endpoint and disable public network access to reach Foundry privately
To keep traffic off the public internet, create a private endpoint for the Foundry resource and set public network access to Disabled, so the resource is reachable only over a private IP inside your virtual network. Managed private endpoints created by the managed VNet are fully Microsoft-managed and do not expose a customer-visible network interface (NIC).
Trap Using a service endpoint instead of a private endpoint, or leaving public network access enabled after adding the private endpoint.
16 questions test this
- In a Foundry managed virtual network, the platform created managed private endpoints so agents can reach Azure Storage privately. An engineer opens the subscription's network resources to inspect the
- A team enabled a Microsoft Foundry managed virtual network in Allow only approved outbound mode, and the platform created managed private endpoints so the project's agents reach Azure Storage and Azur
- An engineer added a private endpoint to a Foundry resource and confirmed that clients inside the virtual network can reach it over the private IP. However, a penetration test shows the resource still
- A teammate added a private endpoint to a Microsoft Foundry resource, but a security scan shows the resource is still reachable from the public internet. The private endpoint connection is Approved and
- Your security team requires that agents in a Microsoft Foundry project reach only an approved Azure Storage account and one approved external API, with automatic data-exfiltration protection so nothin
- A team enabled a virtual network service endpoint for a Microsoft Foundry resource, expecting it to give the resource a private IP in their subnet and let them disable public network access. Testing s
- A team deploys a Microsoft Foundry resource with its managed virtual network in Allow only approved outbound mode. Because outbound traffic is now restricted to approved destinations, the team is conc
- You disabled public network access on a Microsoft Foundry resource and put it behind a private endpoint in an Azure virtual network. Data scientists working from the corporate on-premises network now
- A Foundry managed virtual network runs in Allow only approved outbound mode. An agent must read data from an Azure Storage account that has public network access disabled, and all connectivity must st
- You must connect your Foundry resource to a virtual network so client traffic reaches it over a private IP address from your VNet, and you also intend to disable the resource's public endpoint entirel
- Your Microsoft Foundry managed virtual network is running in Allow only approved outbound mode. Agents in the project must query a specific Azure AI Search service over a private connection that keeps
- A security review requires that all client traffic to your Foundry resource stay off the public internet and reach the resource only over a private IP address from your existing virtual network. You m
- Your compliance policy requires that all client access to a Microsoft Foundry resource stay on your private network and never traverse the public internet. Data scientists connect from an Azure virtua
- You must lock down a Microsoft Foundry resource so the general public internet cannot reach it, yet a small, fixed set of administrator workstation IP addresses at headquarters must still connect for
- After you create a private endpoint for a Foundry resource and disable its public network access, an application team worries they must rewrite their code to use a new private hostname or IP address.
- After enabling a Foundry managed virtual network, an engineer opens the Azure portal to find the network interface (NIC) and private IP that the managed private endpoint to the storage account created
- Provision Foundry resources repeatably with Bicep templates and Azure CLI
Define Foundry resources, projects, and model deployments as Bicep templates and deploy them with the Azure CLI (for example az deployment group create) so environments are versioned, reviewable, and reproducible. A managed-network Foundry resource currently has no portal creation UI and must be deployed via Bicep or Terraform, or with az rest / Azure CLI.
Trap Relying on portal click-ops, which is not source-controlled or repeatable across dev/test/prod environments.
21 questions test this
- Your security team requires a Microsoft Foundry resource that uses a Microsoft-managed virtual network for outbound isolation of the Agent service. You also need the whole setup to be source-controlle
- An MLOps engineer already provisions a Microsoft Foundry resource and project with a Bicep template. The team now wants the specific model deployment, such as which model, version, and SKU, captured i
- Your team redeploys the same Microsoft Foundry environment definition many times a week as part of continuous delivery. You need an approach where rerunning the deployment with unchanged inputs leaves
- Your MLOps team must roll out the same Azure OpenAI model deployment - identical model, version, and deployment settings - into several Microsoft Foundry resources across regions, and be able to recre
- Before applying a change to a production Microsoft Foundry environment that is managed with a Bicep template, your team wants to see exactly which resources a deployment would add, modify, or delete,
- Your company has standardized on Terraform as its single infrastructure-as-code tool for every cloud platform, and a governance policy forbids provisioning cloud resources through the Azure portal. A
- You authored a single Bicep template that defines a Microsoft Foundry resource, one project, and a model deployment, all intended to live together inside one existing resource group named rg-foundry-p
- Your organization wants Microsoft Foundry environments to be provisioned automatically by its release pipeline for dev, test, and production, with no engineer clicking through the Azure portal during
- Your security team requires a Microsoft Foundry resource that uses managed virtual network isolation for its Agent workloads. When you open the Azure portal to create it, you find there is currently n
- Auditors require that every change made to your production Microsoft Foundry environment be traceable to a specific, reviewable record and be reproducible on demand, and your team wants to avoid maint
- Your platform team must stand up identical Microsoft Foundry resources and projects across separate development, test, and production subscriptions. Leadership requires that every environment change b
- You maintain a Bicep template that provisions a Microsoft Foundry resource and project. The dev, test, and production deployments are identical except for the resource names, the region, and the SKU.
- A Microsoft Foundry environment is defined in a Bicep template that your team stores in Git and treats as the source of truth. During an incident, an engineer changed several settings on the Foundry r
- Your organization wants Microsoft Foundry infrastructure provisioned through an automated CI/CD pipeline. The requirements are that every infrastructure change is submitted as a pull request and peer-
- A colleague already created a Microsoft Foundry resource and project by clicking through the Azure portal, and it is configured correctly. Leadership now wants this exact configuration reused as repea
- A regional outage takes down the Azure region that hosts your production Microsoft Foundry resource, project, and model deployment. Your recovery plan requires you to rebuild the entire environment in
- Your MLOps platform team repeatedly provisions Microsoft Foundry environments by clicking through the Azure portal, and small inconsistencies keep slipping in, so dev, test, and production gradually d
- A platform team must stand up three identical Microsoft Foundry environments for development, test, and production, each containing the same Foundry resource, project, and model deployments. Every cha
- Before you apply an updated Bicep template that changes a shared Microsoft Foundry resource in production, your change-management process requires you to see exactly which resources the deployment wil
- Over the past year your three Microsoft Foundry environments were each adjusted directly in the Azure portal whenever a fix was needed. They have quietly drifted apart, and a change that works in test
- Your team is starting to manage Microsoft Foundry with infrastructure as code, but the current Foundry resource and project were set up in the Azure portal and no Bicep or ARM template for them exists
Deploy and Manage Foundation Models
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Prompt Versioning and Source Control
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Implement generative AI quality assurance and observability
Evaluation and Validation for Generative AI
Read full chapterCheat 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
- An engineer is generating a 500-record evaluation dataset for a Foundry chat app and must hand it to the Azure AI Evaluation SDK evaluate() API so the batch run parses every record. The engineer needs
- A teammate prepares an evaluation dataset for a Foundry app by writing all of the test records into one file as a single, comma-separated JSON array wrapped in square brackets, then points the Azure A
- An engineer on your team writes a Python script that builds the test cases for a Foundry app as a list of dictionaries in memory, then calls the Azure AI Evaluation SDK evaluate() API and passes that
- A data scientist prepared an evaluation dataset for a summarization app as a single .json file containing one big JSON array of all the record objects, then passed it to the Azure AI Evaluation SDK ev
- Your GenAIOps team maintains a set of test cases for a retrieval-augmented chatbot in Microsoft Foundry and wants to run several built-in quality evaluators over the whole set at once with the Azure A
- 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
- An MLOps engineer configures one evaluate() run that applies two evaluators to the same JSONL dataset for a RAG assistant: GroundednessEvaluator to check the answer against its source, and F1ScoreEval
- A new MLOps engineer asks you what an evaluation record in an Azure AI Evaluation SDK JSONL dataset may contain, because different built-in evaluators need different inputs. You explain that a record
- You run the groundedness evaluator over a JSONL dataset for a Foundry RAG assistant. On some rows the context field is missing or null because those turns had no retrieved passages. The run completes
- A team has a JSONL evaluation dataset for a RAG assistant in which every record contains a query, the app's response, and the retrieved context, but no human-authored reference answer was ever collect
- An MLOps engineer runs the GroundednessEvaluator across a JSONL test dataset for a retrieval-augmented assistant, but every record contains only a query and a response. Because groundedness measures w
- You evaluate a live Foundry app by giving the Azure AI Evaluation SDK evaluate() API a target callable so the app generates each response at run time. Your JSONL dataset contains only a query column;
- Your evaluation dataset for a Foundry chatbot stores each turn under the column names user_question, bot_answer, and source_docs, but the built-in relevance and groundedness evaluators expect the keyw
- You are preparing a JSONL test dataset to evaluate a retrieval-augmented assistant in Microsoft Foundry with the Azure AI Evaluation SDK. You will run the groundedness evaluator, which checks whether
- Your GenAIOps team maintains a set of test cases for a retrieval-augmented chatbot in Microsoft Foundry and wants to run several built-in quality evaluators over the whole set at once with the Azure A
- 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
- An engineer calls evaluate() with a target set to a live askwiki app so the app generates each answer at run time, while the input questions come from a column in the JSONL dataset. In the evaluator_c
- An engineer configures an evaluate() run that applies four different evaluators to the same JSONL dataset, whose columns share the same nonstandard names across every evaluator. Rather than repeat an
- An engineer runs evaluate() with the RelevanceEvaluator over a JSONL dataset whose columns are named user_question and bot_answer rather than the query and response keywords the evaluator expects. Eve
- You run five built-in evaluators over one JSONL dataset with the Azure AI Evaluation SDK. The dataset uses the same nonstandard column names for query, response, and context across every row, and all
- You evaluate a live Foundry app by giving the Azure AI Evaluation SDK evaluate() API a target callable so the app generates each response at run time. Your JSONL dataset contains only a query column;
- Your evaluation dataset for a Foundry chatbot stores each turn under the column names user_question, bot_answer, and source_docs, but the built-in relevance and groundedness evaluators expect the keyw
- 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
- Your team is preparing to compare three prompt variants for a new retail-support chatbot in Microsoft Foundry, but the assistant has not launched yet, so no real user conversations exist. You must bui
- Your team wants to score a new knowledge-base assistant by using the Azure AI Evaluation SDK's relevance and groundedness evaluators, but the assistant has no production traffic and you have no labele
- You have only a plain-text export of your product documentation. No Azure AI Search index has been built for it, and there is no production conversation history. To evaluate a knowledge-base assistant
- Before launching a Foundry question-and-answer assistant, your team has a list of candidate questions but no answered examples and no production data. To benchmark two prompt variants, you first need
- A QA lead wants a stable benchmark of user inputs that stays identical on every evaluation run, so that when developers tweak the prompt or swap the model the team can attribute score changes to those
- A safety team must assemble a red-team dataset that measures how often a deployed assistant emits hateful, violent, sexual, or self-harm content across question-answering and summarization tasks. They
- An MLOps engineer needs a red-team dataset of harmful prompts to test how a deployed customer assistant responds, but when the team tries to make their own model deployment produce such prompts, its c
- A GenAIOps engineer must regression-test a Foundry summarization app across weekly builds. Each week the same set of benign evaluation inputs must be reproduced so score changes reflect the model, not
- A healthcare support team must benchmark two system-prompt variants of a new patient-facing assistant before launch. There is no production traffic yet, and compliance rules forbid using real patient
- Two teams share a Foundry project. The quality team only needs a benign set of typical customer questions and grounded answers to benchmark three prompt variants of a travel-booking assistant before l
- You are configuring the Simulator class in the Azure AI Evaluation SDK to produce grounded, non-adversarial query-response pairs for a knowledge-base assistant that answers questions about your produc
- Your team already generates benign evaluation data with the Simulator, which needs no Azure AI project. You now want to add a red-team safety dataset by running the AdversarialSimulator against your d
- An MLOps engineer tries to run AdversarialSimulator to build a jailbreak safety dataset, but the job errors out before generating anything. The Foundry project backing the run lives in the Central Ind
- 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
- You are hardening a generative AI chatbot and need a dataset that specifically tests its resistance to jailbreak instructions that a malicious end user types directly into the chat, a user-prompt-inje
- You have only a plain-text export of your product documentation. No Azure AI Search index has been built for it, and there is no production conversation history. To evaluate a knowledge-base assistant
- A team wants to run AdversarialSimulator to generate a safety-evaluation dataset, but their Azure AI Foundry project is deployed in Central US and the run fails to start. The adversarial capability de
- A safety team must assemble a red-team dataset that measures how often a deployed assistant emits hateful, violent, sexual, or self-harm content across question-answering and summarization tasks. They
- You initialize AdversarialSimulator with your credential and azure_ai_project and now must tell it which category of adversarial content to generate for a summarization app, such as content-harm probi
- An MLOps engineer needs a red-team dataset of harmful prompts to test how a deployed customer assistant responds, but when the team tries to make their own model deployment produce such prompts, its c
- A healthcare support team must benchmark two system-prompt variants of a new patient-facing assistant before launch. There is no production traffic yet, and compliance rules forbid using real patient
- Two teams share a Foundry project. The quality team only needs a benign set of typical customer questions and grounded answers to benchmark three prompt variants of a travel-booking assistant before l
- A retrieval-augmented Foundry assistant answers questions using documents it pulls from an internal knowledge store. Your security team is worried an attacker could hide malicious instructions inside
- Your team already generates benign evaluation data with the Simulator, which needs no Azure AI project. You now want to add a red-team safety dataset by running the AdversarialSimulator against your d
- An MLOps engineer tries to run AdversarialSimulator to build a jailbreak safety dataset, but the job errors out before generating anything. The Foundry project backing the run lives in the Central Ind
- 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
- A team tries to evaluate an open-ended brainstorming assistant in your Foundry project by running the BLEU and ROUGE textual-similarity metrics, but every row errors out because the feature has no sin
- A summarization capability in Microsoft Foundry produces multi-paragraph summaries. Reviewers report that some summaries are factually correct and grammatically clean, yet read as disjointed, with ide
- A Principal MLOps engineer operates a retrieval-augmented customer-support assistant in a Microsoft Foundry project. Each answer is generated from passages retrieved from a grounding knowledge base, a
- An internal engineering-support assistant in a Microsoft Foundry project answers each question from wiki articles retrieved into the prompt as context. Reviewers find the replies are on-topic and well
- In a Microsoft Foundry project you must automatically check whether an assistant's answers actually address what each user asked, scoring the accuracy, completeness, and direct relevance of the respon
- A policy-question assistant in a Microsoft Foundry project answers from HR handbook sections retrieved as context. Every reply stays faithful to the retrieved text and invents nothing, but reviewers n
- A question-answering feature in Microsoft Foundry sometimes returns well-written, fluent answers that drift off and never actually address what the user asked. You need an evaluator that scores how di
- In Microsoft Foundry you must evaluate an open-ended brainstorming assistant whose creative responses have no single fixed correct answer, so no ground-truth reference exists. A teammate proposes scor
- 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
- For an open-ended chat feature in your Foundry project with no reference answers, a stakeholder wants an automated evaluator that not only assigns a quality score to each response but also returns a n
- In a Microsoft Foundry evaluation you already run coherence and relevance with a GPT judge model. You now add the violence and hate/unfairness safety evaluators, and a teammate suggests assigning that
- Your team ships a machine-translation feature in a Foundry project and has a set of human reference translations for each source segment. You want an automated, math-based score of how closely the mod
- A Foundry project already runs the Groundedness and Relevance quality evaluators, which you configured with a GPT judge in model_config. You now add the Violence and Hate/unfairness risk-and-safety ev
- You configure the Coherence, Fluency, Groundedness, and Relevance evaluators from the Azure AI Evaluation SDK to score an open-ended assistant in your Foundry project, where no reference answers exist
- A colleague asks you to interpret the raw output of the coherence and relevance evaluators after a Microsoft Foundry evaluation run, so the team knows how to read the results dashboard. Setting aside
- In Microsoft Foundry you must evaluate an open-ended brainstorming assistant whose creative responses have no single fixed correct answer, so no ground-truth reference exists. A teammate proposes scor
- 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
- A team tries to evaluate an open-ended brainstorming assistant in your Foundry project by running the BLEU and ROUGE textual-similarity metrics, but every row errors out because the feature has no sin
- For an open-ended chat feature in your Foundry project with no reference answers, a stakeholder wants an automated evaluator that not only assigns a quality score to each response but also returns a n
- Your team ships a machine-translation feature in a Foundry project and has a set of human reference translations for each source segment. You want an automated, math-based score of how closely the mod
- In a Microsoft Foundry project you must automatically check whether an assistant's answers actually address what each user asked, scoring the accuracy, completeness, and direct relevance of the respon
- You configure the Coherence, Fluency, Groundedness, and Relevance evaluators from the Azure AI Evaluation SDK to score an open-ended assistant in your Foundry project, where no reference answers exist
- A colleague asks you to interpret the raw output of the coherence and relevance evaluators after a Microsoft Foundry evaluation run, so the team knows how to read the results dashboard. Setting aside
- In Microsoft Foundry you must evaluate an open-ended brainstorming assistant whose creative responses have no single fixed correct answer, so no ground-truth reference exists. A teammate proposes scor
- 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
- You are building a mixed evaluation suite in Microsoft Foundry that includes both response-quality checks and harmful-content checks. Some evaluators must be instantiated with a GPT model_config that
- You are operationalizing safety checks for a customer-support assistant in Microsoft Foundry and must run the built-in violence, sexual, self-harm, and hate/unfairness evaluators across a labeled resp
- You build a single Foundry evaluation run that scores each chatbot response for both coherence, an AI-assisted quality metric, and violence, a content-safety metric. You correctly configured the coher
- Your team wants to measure how often a customer-support chatbot emits violent, sexual, self-harm, or hateful content, but your Foundry project has no Azure OpenAI GPT deployment provisioned and procur
- You are adding automated content-safety scoring to your Microsoft Foundry evaluation pipeline. For the coherence and fluency quality evaluators you passed a GPT model_config with a deployment_name, so
- 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
- During a content-safety review in Microsoft Foundry, your violence evaluator returns a severity score near the bottom of the 0-to-7 scale for a chatbot response and marks it pass. A teammate who norma
- During a safety review in Microsoft Foundry, your team runs the violence evaluator over model responses and gets per-response severity numbers on the content-safety scale. A reviewer who is used to th
- You run the content-safety evaluators across a 2,000-response test dataset in Microsoft Foundry and must report a single dataset-level safety signal that a release gate can check before the model ship
- You present an evaluation dashboard to stakeholders that shows, for each model build, a fluency score and a violence severity score side by side. A stakeholder notices that build 2 has a higher fluenc
- In Microsoft Foundry, your violence evaluator returns a per-response severity score on the 0-7 content-safety scale together with a configured threshold, and your release pipeline needs a deterministi
- Your release sign-off for a customer-support chatbot in Microsoft Foundry currently reports only the single highest content-safety severity seen across a 2,000-response test dataset. You argue that on
- 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
- Your team has run the AI Red Teaming Agent against two candidate versions of a Microsoft Foundry agent, launching many simulated attacks and scoring each attack-response pair. Leadership wants one hea
- You run the content-safety evaluators across a 2,000-response test dataset in Microsoft Foundry and must report a single dataset-level safety signal that a release gate can check before the model ship
- You need to score every chatbot response for violence, sexual, self-harm, and hate/unfairness content before a release. To keep the evaluation run simple, you want one combined safety result per respo
- You are assembling a safety evaluation in Microsoft Foundry and want the violence, sexual, self-harm, and hate/unfairness checks to run together over your dataset and return one combined harmful-conte
- Your release sign-off for a customer-support chatbot in Microsoft Foundry currently reports only the single highest content-safety severity seen across a 2,000-response test dataset. You argue that on
- You must score every response from a customer-support assistant in Microsoft Foundry for violence, sexual, self-harm, and hate/unfairness content before a release gate. To keep the evaluation run simp
- 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
- Before deploying a generative AI agent in Microsoft Foundry, your team must automatically probe its endpoint with simulated adversarial attacks, score each attack-response pair, and roll the run up in
- Your team has run the AI Red Teaming Agent against two candidate versions of a Microsoft Foundry agent, launching many simulated attacks and scoring each attack-response pair. Leadership wants one hea
- A colleague says that one Microsoft Foundry safety tool merely produces a synthetic adversarial dataset of attack prompts, which you must then run against your endpoint and score yourself, whereas ano
- Your safety team plans a manual red-teaming exercise and just needs a batch of realistic adversarial prompts to hand to human reviewers, who will send them and judge the responses themselves. They exp
- 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
- An MLOps engineer says your evaluation can only measure what the built-in evaluator catalog already provides, so a domain-specific correctness rule unique to your insurance product simply can't be sco
- Your Foundry generative AI application must return each answer as well-formed JSON that matches a fixed schema, and your quality bar scores every response by whether it parses and conforms - a purely
- Your GenAIOps team has a JSONL test dataset of query-and-response pairs for a retrieval-augmented chat app in a Microsoft Foundry project. You must score every row with the groundedness, relevance, an
- Your team has a JSONL test dataset of query-and-response rows for a generative AI application. You must score every row with several built-in quality evaluators together with one custom metric, obtain
- Your team currently runs its quality evaluation through a prompt flow evaluation flow. Because prompt flow is no longer recommended for new development and is on the retirement path, you must move the
- After you run local evaluation with the Azure AI Evaluation SDK over a dataset, the aggregate metrics and per-row scores stay as JSON files on the engineer's laptop. Reviewers need to open the results
- An engineer on your team is scoring a large JSONL dataset of query-and-response rows and wrote a script that iterates every row, calling the groundedness, relevance, and fluency evaluators individuall
- Your MLOps team measures a chatbot's quality with built-in groundedness and relevance evaluators, but compliance also requires a deterministic, rule-based check that every answer includes a mandatory
- Your GenAIOps team keeps a JSONL file of several hundred test queries for a Microsoft Foundry chat application, but the file holds only the queries and not the application's answers. Before the next r
- 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
- An MLOps engineer says your evaluation can only measure what the built-in evaluator catalog already provides, so a domain-specific correctness rule unique to your insurance product simply can't be sco
- Your Foundry generative AI application must return each answer as well-formed JSON that matches a fixed schema, and your quality bar scores every response by whether it parses and conforms - a purely
- Your GenAIOps team has a JSONL test dataset of query-and-response pairs for a retrieval-augmented chat app in a Microsoft Foundry project. You must score every row with the groundedness, relevance, an
- Your team has a JSONL test dataset of query-and-response rows for a generative AI application. You must score every row with several built-in quality evaluators together with one custom metric, obtain
- Your team needs a custom evaluation metric that is a purely deterministic rule - score each response by whether its length falls within a target character range - with no language-model judgment invol
- Your MLOps team measures a chatbot's quality with built-in groundedness and relevance evaluators, but compliance also requires a deterministic, rule-based check that every answer includes a mandatory
- The built-in evaluators don't cover a domain-specific quality your team needs: a subjective brand-tone judgment that a language model must reason about for each response. You want to add this metric a
- 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
- Today your team runs evaluation manually on a laptop before each release, and low-quality builds occasionally slip through to production. You want evaluation to run automatically inside the deployment
- A deployed Foundry agent serves live production traffic, and your team wants ongoing assurance that answer quality and safety don't silently drift over time, without an engineer manually kicking off a
- Your team must run evaluation over a large dataset as part of automated pre-deployment testing in the CI/CD pipeline, and you don't want to provision or manage the compute that runs the evaluators. Co
- Before promoting an updated Microsoft Foundry agent to production, your team wants an automated step in their GitHub-hosted pipeline that invokes the agent with a set of test queries, runs selected ev
- Today your team runs quality evaluation by hand on a laptop just before each release, and occasionally a build with regressed groundedness still reaches production. You want evaluation to run automati
- Your team wants every pull request that changes a Foundry agent's prompts to automatically trigger an evaluation, and to block the merge or release when quality and safety scores fall below agreed thr
- 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
- You are standardizing the evaluation tooling for a brand-new GenAIOps project in Microsoft Foundry and must pick the framework your team will build all future automated evaluations on. One option's fe
- Before promoting an updated Microsoft Foundry agent to production, your team wants an automated step in their GitHub-hosted pipeline that invokes the agent with a set of test queries, runs selected ev
- Your team currently runs its quality evaluation through a prompt flow evaluation flow. Because prompt flow is no longer recommended for new development and is on the retirement path, you must move the
- Your platform team is adding an automated pre-deployment evaluation stage for a brand-new Foundry generative AI project. A colleague suggests reusing the organization's existing prompt flow evaluation
- 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
- A GenAIOps lead explains to the team that, in Microsoft Foundry, evaluating an agent is tightly coupled to tracing in a way that evaluating a single text response is not. A new engineer asks why captu
- While reviewing a Microsoft Foundry agent that integrates several APIs, an engineer wants a single process-level evaluator that judges the overall quality of the agent's tool calls, whether it chose t
- A team wants to start using the Tool Call Accuracy and Task Adherence evaluators on a Microsoft Foundry agent, but their current logging saves only each user query and the agent's final text answer; t
- A Foundry travel agent is instructed to never book flights over a set price and to always confirm dates first. In testing it books an over-budget flight without confirming. The team wants an evaluator
- A team reuses the evaluation harness from their RAG chat application for a new Microsoft Foundry agent. The harness records each query, the final response, and the retrieved context, and it runs groun
- During evaluation of a Foundry agent, reviewers find the agent frequently invokes the wrong function tool and passes it malformed arguments, even though its final wording is fluent and on-topic. The t
- A GenAIOps team is defining the pre-release acceptance suite for a Microsoft Foundry agent that resolves customer requests by calling several function tools. Beyond content-safety checks, leadership w
- An MLOps engineer reviews a Microsoft Foundry agent that completes tasks by calling internal function tools. Testing shows the agent's final replies read fluently, but it sometimes calls a tool that f
- An engineer configures two evaluators on the same Microsoft Foundry agent output. The Coherence evaluator runs fine against the agent's plain-text response, but the Tool Call Accuracy evaluator return
- A Microsoft Foundry shopping agent replies to a customer who says 'I want to return this and buy the newer model' with a fluent, on-topic message that only processes the purchase and ignores the retur
- A Microsoft Foundry HR-benefits agent answers employee questions by retrieving policy documents. In a pre-release review, the team notices that when an employee asks a two-part question, the agent oft
- A GenAIOps team has been running a Microsoft Foundry customer-support agent in production, where its tool calls and results are captured as traces in Application Insights. Auditors now want to score t
- A QA engineer is assembling the offline evaluation dataset for a multi-tool Microsoft Foundry agent so that the Tool Call Accuracy evaluator can score each recorded interaction. Alongside the user que
- A Microsoft Foundry symptom-triage agent is given a system message stating it must direct users with emergency red-flag symptoms to call emergency services and must never provide a specific diagnosis.
- A GenAIOps engineer maintains a Foundry agent that answers billing questions by calling internal tools. Its final answers already pass the Groundedness and Relevance evaluators, yet reviewers say it o
- A team enabled the Foundry Observability monitoring dashboard and set Azure Monitor alerts, then tried to run the tool-call accuracy agent evaluator on their agent. The evaluator reports it has no too
- In a regulated financial-support scenario, compliance reviewers must confirm that a Microsoft Foundry agent follows the rules and constraints written in its system instructions and stays on its assign
- An MLOps engineer prepares a tool-call accuracy evaluation for a Microsoft Foundry agent that books travel through several function tools. So far the evaluation dataset captures only each user query a
- A team builds an agent with Microsoft Foundry Agent Service. Each user request produces a long thread of assistant and tool messages containing many tool invocations. The team wants to score the run w
- A financial-services team runs a Foundry support agent whose system message forbids giving investment advice and requires escalation of complaints to a human. Before release they must confirm the agen
- 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
- A GenAIOps lead explains to the team that, in Microsoft Foundry, evaluating an agent is tightly coupled to tracing in a way that evaluating a single text response is not. A new engineer asks why captu
- A team wants to start using the Tool Call Accuracy and Task Adherence evaluators on a Microsoft Foundry agent, but their current logging saves only each user query and the agent's final text answer; t
- A team reuses the evaluation harness from their RAG chat application for a new Microsoft Foundry agent. The harness records each query, the final response, and the retrieved context, and it runs groun
- An engineer configures two evaluators on the same Microsoft Foundry agent output. The Coherence evaluator runs fine against the agent's plain-text response, but the Tool Call Accuracy evaluator return
- A GenAIOps team has been running a Microsoft Foundry customer-support agent in production, where its tool calls and results are captured as traces in Application Insights. Auditors now want to score t
- A QA engineer is assembling the offline evaluation dataset for a multi-tool Microsoft Foundry agent so that the Tool Call Accuracy evaluator can score each recorded interaction. Alongside the user que
- A team enabled the Foundry Observability monitoring dashboard and set Azure Monitor alerts, then tried to run the tool-call accuracy agent evaluator on their agent. The evaluator reports it has no too
- An MLOps engineer prepares a tool-call accuracy evaluation for a Microsoft Foundry agent that books travel through several function tools. So far the evaluation dataset captures only each user query a
- A team builds an agent with Microsoft Foundry Agent Service. Each user request produces a long thread of assistant and tool messages containing many tool invocations. The team wants to score the run w
- A GenAIOps team asks why agent evaluation in Microsoft Foundry is described as tightly coupled to tracing. Their agent runs several tool calls per user request, and they want the Tool Call Accuracy an
Observability for Generative AI Applications
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Optimize generative AI systems and model performance
Optimize RAG Performance and Accuracy
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- Text Split skill chunks documents before embedding in integrated vectorization
In Azure AI Search integrated vectorization, a skillset runs the Text Split skill to break documents into chunks and then an embedding skill (for example the Azure OpenAI Embedding skill) vectorizes each chunk. textSplitMode is set to "pages" (default fixed-size chunks) or "sentences", and maximumPageLength plus pageOverlapLength control chunk size and overlap. Chunking is required because embedding models cap input length (text-embedding-3 models accept at most 8,191 tokens per call).
Trap Trying to embed whole documents directly: inputs over the model's 8,191-token limit are rejected, so documents must be chunked first.
7 questions test this
- Your Azure AI Search index holds wiki pages that are already small enough to stay under the embedding model's input limit, so chunking is not required for size. Each page, though, mixes many unrelated
- You configure an Azure AI Search skillset that sends full documents directly to the Azure OpenAI Embedding skill for a RAG index. Indexing fails for your largest documents with an error that the input
- A RAG solution indexes long manuals with the Text Split skill using very large page chunks. Reviewers find that vector search often returns a chunk whose overall topic only loosely matches the questio
- You configure a Text Split skill for integrated vectorization. Your source files are long reports, and you want fixed-length chunks of roughly a target size so that most chunks are similar in length a
- Your team's RAG assistant sometimes misses answers that sit exactly where the Text Split skill ends one chunk and begins the next, because a relevant sentence is cut between two adjacent chunks and ne
- You want Azure AI Search to automatically split documents into chunks and generate vector embeddings for those chunks during indexing, without writing and hosting a separate preprocessing service. You
- Your team runs integrated vectorization over a set of long technical manuals for a RAG assistant. Testers report that some answers are incomplete because a passage that fully answers a question is bei
- Chunk size and overlap trade retrieval precision against context
Smaller chunks return more precise matches but can lose surrounding context, while larger chunks preserve context but dilute relevance and cost more to embed. Microsoft recommends starting near a 512-token chunk size with about 25 percent overlap (roughly 128 tokens); pageOverlapLength repeats text at chunk boundaries so a relevant passage is not split across two chunks.
Trap Setting overlap to 0 to avoid duplicate text: zero overlap can cut a relevant passage in half across two chunks and lower recall.
7 questions test this
- You are setting the page overlap for the Text Split skill in a new RAG pipeline. You want to reduce the chance that a relevant passage is split across two chunks, but you also do not want to waste emb
- In a RAG pipeline, the chunks your Text Split skill produces are used two ways: they are embedded for vector search, and the top retrieved chunks are also passed to a chat model that summarizes them i
- In your RAG solution the Text Split skill currently emits very large chunks, and users complain that results return long passages where the specific answer is buried among unrelated text, lowering ans
- A RAG solution indexes long manuals with the Text Split skill using very large page chunks. Reviewers find that vector search often returns a chunk whose overall topic only loosely matches the questio
- Your team's RAG assistant sometimes misses answers that sit exactly where the Text Split skill ends one chunk and begins the next, because a relevant sentence is cut between two adjacent chunks and ne
- A RAG assistant answers questions over legal contracts where an answer usually depends on a full clause spanning several sentences. With the current small chunks, retrieved passages frequently start o
- Your team runs integrated vectorization over a set of long technical manuals for a RAG assistant. Testers report that some answers are incomplete because a passage that fully answers a question is bei
- HNSW gives fast approximate search; exhaustive KNN gives exact but slow search
A vector field's algorithm sets the retrieval strategy: HNSW performs fast approximate nearest-neighbor search (tunable with m, efConstruction, and efSearch) and scales to large indexes, while exhaustive KNN scans every vector for exact nearest neighbors, which is more accurate but slower and costlier. An HNSW field can be forced to run exact search on a per-query basis with "exhaustive": true.
Trap Choosing exhaustive KNN for a large production index because it is 'exact': it does not scale; HNSW approximate search is the default for large indexes.
6 questions test this
- You are tuning the Azure AI Search vector index that grounds a Microsoft Foundry RAG assistant. The index already holds several million chunks embedded with an Azure OpenAI model, the corpus keeps gro
- You operationalize a retrieval-augmented generation assistant in Microsoft Foundry whose grounding data lives in an Azure AI Search index of several million embedded document chunks. Query latency mus
- Your Azure AI Search RAG pipeline runs a hybrid query with semantic ranking, but the semantic reranker seems starved of candidates and its ordering looks poor. You already set top to control how many
- Your production RAG vector field in Azure AI Search is indexed with HNSW so normal traffic stays fast. For one high-stakes compliance lookup, an auditor requires an exact, complete comparison against
- Users report that your Foundry RAG assistant often answers from too little context and misses relevant passages that exist in the Azure AI Search index. The retrieval step currently returns only a han
- Before you promote a large HNSW-based RAG index to production, you must measure how much recall its approximate search sacrifices. On a small, fixed evaluation corpus you need a ground-truth list of t
- The k parameter sets how many nearest neighbors a vector query returns
A vector query's k (k-nearest-neighbors) controls how many documents the retrieval step returns; increasing k raises recall by giving the reranker or LLM more candidates, at the cost of latency and noise. For hybrid queries that feed semantic ranking, Microsoft recommends setting k to 50 so the reranker receives a full candidate set.
Trap Confusing k with the embedding dimension count: k is the number of returned neighbors, unrelated to the 1,536/3,072 vector dimensions.
10 questions test this
- During a RAG tuning review, a teammate proposes returning more grounding passages by raising the Azure OpenAI embedding model's dimension count from 1,536 to 3,072. You need to correct the plan and id
- You operationalize a retrieval-augmented generation assistant in Microsoft Foundry whose grounding data lives in an Azure AI Search index of several million embedded document chunks. Query latency mus
- Your Azure AI Search RAG pipeline runs a hybrid query with semantic ranking, but the semantic reranker seems starved of candidates and its ordering looks poor. You already set top to control how many
- To cut low-quality grounding chunks, your team wants to apply a minimum-score threshold to a hybrid query in Azure AI Search that fuses keyword and vector results with Reciprocal Rank Fusion. In testi
- Users report that your Foundry RAG assistant sometimes omits facts that clearly exist in the Azure AI Search index. Investigation shows the vector query returns too few chunks, so relevant grounding n
- Users report that your Foundry RAG assistant often answers from too little context and misses relevant passages that exist in the Azure AI Search index. The retrieval step currently returns only a han
- While tuning retrieval for a Foundry RAG solution, a teammate argues that to make each Azure AI Search vector query return more candidate chunks you must increase the embedding dimension count of the
- A colleague changed the similarity metric on your production Azure AI Search vector field to euclidean, hoping to improve relevance for your Azure OpenAI-embedded RAG corpus. Since then, retrieved chu
- Your Foundry RAG pipeline runs a hybrid query against Azure AI Search and then applies semantic ranking as a second-stage reranker. Evaluation shows recall is low: relevant chunks that exist in the in
- Your RAG team has tried to eliminate off-topic grounding from a single-vector Azure AI Search query by first lowering k and then experimenting with a different similarity metric, yet low-scoring, weak
- Cosine is the correct similarity metric for Azure OpenAI embeddings
The vector field's similarity metric must match how the embedding model was trained: cosine is the default and correct choice for Azure OpenAI text-embedding models, with dotProduct and euclidean as the alternatives. On pure single-vector queries, a per-query similarity threshold (preview) can additionally drop low-scoring matches so weakly related chunks never reach the generator; hybrid/RRF queries are not eligible because their fused score ranges are too small and volatile for a cutoff.
Trap Switching the metric to euclidean to 'improve' OpenAI embedding relevance: OpenAI embeddings are tuned for cosine, so a mismatched metric degrades results.
7 questions test this
- During a RAG tuning review, a teammate proposes returning more grounding passages by raising the Azure OpenAI embedding model's dimension count from 1,536 to 3,072. You need to correct the plan and id
- You operationalize a retrieval-augmented generation assistant in Microsoft Foundry whose grounding data lives in an Azure AI Search index of several million embedded document chunks. Query latency mus
- Your Azure AI Search RAG pipeline runs a hybrid query with semantic ranking, but the semantic reranker seems starved of candidates and its ordering looks poor. You already set top to control how many
- Users report that your Foundry RAG assistant often answers from too little context and misses relevant passages that exist in the Azure AI Search index. The retrieval step currently returns only a han
- A colleague changed the similarity metric on your production Azure AI Search vector field to euclidean, hoping to improve relevance for your Azure OpenAI-embedded RAG corpus. Since then, retrieved chu
- Your RAG team has tried to eliminate off-topic grounding from a single-vector Azure AI Search query by first lowering k and then experimenting with a different similarity metric, yet low-scoring, weak
- You are configuring a new Azure AI Search vector index whose embeddings come from an Azure OpenAI text-embedding-3-large deployment used by your Foundry RAG app. Relevance in early tests is weak, and
- A vector-query similarity threshold drops weak matches that k would still return
A pure vector query always returns its k nearest neighbors even when they are barely similar, because the nearest-neighbor search just finds the closest vectors regardless of score. To drop weak, off-topic matches, set a per-query threshold (kind vectorSimilarity, in preview) that excludes any result scoring below the minimum even if fewer than k results remain; this is a precision lever distinct from top-k and from the similarity metric. Apply it only to single-vector queries, not to hybrid/RRF queries, whose fused rank ranges are too small and volatile for a score cutoff.
Trap Expecting a smaller k or a different similarity metric to filter out irrelevant chunks; k always returns k results, so only a similarity threshold removes weak matches, and the threshold does not apply to hybrid/RRF queries.
4 questions test this
- Your Azure AI Search RAG retrieval currently runs a hybrid query that fuses vector and keyword results with Reciprocal Rank Fusion. Weakly related chunks still reach the generator, and you want to enf
- To cut low-quality grounding chunks, your team wants to apply a minimum-score threshold to a hybrid query in Azure AI Search that fuses keyword and vector results with Reciprocal Rank Fusion. In testi
- A pure single-vector query in your Azure AI Search RAG index keeps returning a fixed number of chunks, and several of them are only weakly related to the user's question, which pollutes the grounding
- Your RAG team has tried to eliminate off-topic grounding from a single-vector Azure AI Search query by first lowering k and then experimenting with a different similarity metric, yet low-scoring, weak
- text-embedding-3-large defaults to 3072 dimensions, 3-small to 1536
text-embedding-3-large outputs 3,072-dimensional vectors by default and text-embedding-3-small outputs 1,536; both accept up to 8,191 input tokens. A larger, higher-dimensional model captures more semantic nuance to improve domain accuracy, but it increases vector storage and query cost.
Trap Believing text-embedding-ada-002 produces 3,072 dimensions: ada-002 is fixed at 1,536, and only the v3 models reach 3,072.
13 questions test this
- You are designing a RAG index in Azure AI Search that must hold tens of millions of document chunks. The vector storage budget is tight and p95 query latency must stay low, while moderate retrieval ac
- You are sizing a vector field in an Azure AI Search index and want to reserve exactly the number of dimensions that text-embedding-ada-002 emits, because a teammate insists ada-002 now produces the sa
- Your team must choose between text-embedding-3-large and text-embedding-3-small for a new RAG index and needs the accurate default-dimensionality tradeoff to decide, because storage cost and retrieval
- Retrieval accuracy for a specialized legal RAG assistant in Microsoft Foundry is poor because relevant clauses are often missed. A teammate proposes fine-tuning text-embedding-3-large on your labeled
- A customer-support RAG app in Microsoft Foundry keeps returning off-target passages whenever users type product-specific acronyms and part numbers, which pure vector search struggles to match exactly.
- Your team already fine-tunes the gpt-4o chat model that writes RAG answers, and now wants the same customization applied to the text-embedding-3-large model that retrieves context, expecting better do
- A GenAIOps engineer is building a retrieval-augmented generation solution over a large, specialized biomedical corpus in Microsoft Foundry. Domain answer accuracy is the top priority, the backing vect
- A RAG assistant over legal contracts keeps returning off-topic passages, and leadership asks whether you can train the embedding model on the contract set to make it domain-aware. You must explain the
- You are building a high-volume RAG feature where millions of chunks must be embedded and stored cheaply, and moderate retrieval quality is acceptable. You want the newest-generation Azure OpenAI embed
- Domain retrieval accuracy on your Azure OpenAI RAG pipeline over financial filings is too low, and a data scientist proposes fine-tuning text-embedding-3-large on your labeled domain corpus to special
- You already index a knowledge base with text-embedding-3-large at its full default dimensionality, but vector storage and query latency in Azure AI Search have grown beyond budget. You must shrink the
- A cost review flags that your text-embedding-3-large index consumes roughly twice the vector storage of a comparable text-embedding-3-small index, and finance asks you to justify it. You must explain
- Your team is building a retrieval-augmented generation solution over a large corpus of dense biomedical research papers, and for nuanced domain queries retrieval accuracy matters far more than vector
- The dimensions parameter shortens v3 embeddings via Matryoshka learning
text-embedding-3 models support a dimensions parameter that truncates the output vector (for example from 3,072 down to 1,536 or 256) using Matryoshka Representation Learning, trading a small accuracy loss for lower storage and faster search. The same dimensions value must be used at indexing time and query time or the vectors are not comparable.
Trap Reducing dimensions only on the query side: index and query embeddings must share the same dimension count or the similarity comparison breaks.
11 questions test this
- You are designing a RAG index in Azure AI Search that must hold tens of millions of document chunks. The vector storage budget is tight and p95 query latency must stay low, while moderate retrieval ac
- To reduce query latency, an engineer truncated the query-side embeddings for a RAG solution to 512 dimensions, but the Azure AI Search index was built with full 3,072-dimension text-embedding-3-large
- You have a single text-embedding-3-large deployment and want it to serve full 3,072-dimension vectors for a high-accuracy index and shorter 256-dimension vectors for a latency-sensitive index, without
- You reduce your text-embedding-3-large vectors to 1,024 dimensions with the dimensions parameter to save storage, and you reindex the whole corpus at 1,024. After release, vector search returns irrele
- A GenAIOps engineer is building a retrieval-augmented generation solution over a large, specialized biomedical corpus in Microsoft Foundry. Domain answer accuracy is the top priority, the backing vect
- A production RAG index in Azure AI Search stores millions of text-embedding-3-large vectors at their full 3,072 dimensions, and both storage cost and query latency are climbing beyond target. Your tea
- You are building a high-volume RAG feature where millions of chunks must be embedded and stored cheaply, and moderate retrieval quality is acceptable. You want the newest-generation Azure OpenAI embed
- Domain retrieval accuracy on your Azure OpenAI RAG pipeline over financial filings is too low, and a data scientist proposes fine-tuning text-embedding-3-large on your labeled domain corpus to special
- You already index a knowledge base with text-embedding-3-large at its full default dimensionality, but vector storage and query latency in Azure AI Search have grown beyond budget. You must shrink the
- To cut storage costs, you configured the Azure OpenAI embedding skill to build your Azure AI Search index using 1,024-dimension vectors truncated from text-embedding-3-large. You now need queries to r
- A stakeholder asks how text-embedding-3-large can output a 3,072-dimensional vector for one workload and a 256-dimensional vector for another from the very same deployment. You must identify the model
- Azure OpenAI embedding models are chosen and dimension-tuned, not fine-tuned
Azure OpenAI text-embedding-3 models cannot be fine-tuned; fine-tuning applies to chat/completion models only. To raise domain-specific retrieval accuracy you select the right embedding model and dimension count, improve chunking, or add hybrid and semantic ranking, rather than training the embedding model itself.
Trap Fine-tuning text-embedding-3-large on domain data: Azure OpenAI offers no embedding-model fine-tuning; model and dimension selection plus retrieval tuning are the levers.
6 questions test this
- Retrieval accuracy for a specialized legal RAG assistant in Microsoft Foundry is poor because relevant clauses are often missed. A teammate proposes fine-tuning text-embedding-3-large on your labeled
- A customer-support RAG app in Microsoft Foundry keeps returning off-target passages whenever users type product-specific acronyms and part numbers, which pure vector search struggles to match exactly.
- Your team already fine-tunes the gpt-4o chat model that writes RAG answers, and now wants the same customization applied to the text-embedding-3-large model that retrieves context, expecting better do
- A RAG assistant over legal contracts keeps returning off-topic passages, and leadership asks whether you can train the embedding model on the contract set to make it domain-aware. You must explain the
- Business stakeholders complain that a RAG knowledge assistant misses answers because retrieved passages are either too broad or cut off mid-topic. Leadership asks whether you should train the embeddin
- Domain retrieval accuracy on your Azure OpenAI RAG pipeline over financial filings is too low, and a data scientist proposes fine-tuning text-embedding-3-large on your labeled domain corpus to special
- Hybrid search fuses vector and keyword results with Reciprocal Rank Fusion
Hybrid search runs a vector (HNSW) query and a BM25 keyword query in parallel over one index and merges them with Reciprocal Rank Fusion (RRF), which combines results by rank position rather than by raw score because BM25 and cosine scores are on incompatible scales. Hybrid retrieval usually beats either method alone, especially for queries that mix exact keywords with semantic intent.
Trap Thinking RRF averages the BM25 and cosine scores: it fuses by rank position, and the raw scores are never added or averaged.
15 questions test this
- You are building a retrieval-augmented generation app on Azure AI Search to ground a Foundry chat model. User questions mix exact tokens such as part numbers and error codes with paraphrased, conceptu
- A RAG solution over an internal parts catalog uses vector-only retrieval in Azure AI Search. Support agents report that queries containing exact part numbers and rare model codes often fail to surface
- Your team enables hybrid search on an Azure AI Search index so that a keyword query and a vector query run together for each request. During a design review, a colleague asks how the two independently
- A teammate wants your Azure AI Search RAG index to return grounding that reflects both semantic similarity and exact keyword precision, and proposes adding a scoring profile to a keyword-only query to
- You are preparing an Azure AI Search index to support hybrid retrieval for a RAG chatbot. A teammate proposes keeping the plain-text content in one index and the generated embeddings in a separate vec
- While reviewing a hybrid RAG query on Azure AI Search, a colleague notes that BM25 keyword scores have no fixed upper bound while the vector cosine scores fall in a small bounded range, and asks how t
- Users of a RAG assistant on Azure AI Search report that for some questions the correct answer is missing entirely from the cited sources, even though the source document exists in the index. Your curr
- An existing RAG solution on Azure AI Search retrieves grounding chunks with a vector-only query. Users report that questions containing exact identifiers, such as SKUs, invoice numbers, and acronyms,
- You are documenting the ranking pipeline of a hybrid semantic query in Azure AI Search for your team's runbook. The request runs a keyword query and a vector query, merges them, and then applies the s
- Your RAG retrieval on Azure AI Search issues a full-text keyword query together with two vector queries against different embedding fields in the same request, and the response must come back as one u
- You are optimizing grounding relevance for a RAG chat app on Azure AI Search and Microsoft Foundry. Microsoft's benchmark testing on real-world datasets indicates one retrieval configuration consisten
- Your RAG app on Azure AI Search grounds a Foundry model, but several documents that clearly answer users' questions never appear anywhere in the results. A teammate turned on semantic ranking expectin
- Your team stores each document chunk in a single Azure AI Search index with both a searchable text field and its embedding vector. Today the app runs a keyword query and a vector query as two separate
- After switching a RAG retriever from pure vector search to hybrid search in Azure AI Search, an engineer notices the @search.score values dropped from around 0.8 to roughly 0.03 and files a bug claimi
- You are tuning the retrieval quality of a RAG application on Azure AI Search to give the language model the most relevant grounding passages. Microsoft's own benchmark guidance points to one combinati
- Semantic ranker L2-reranks the top 50 results and scores them 0 to 4
Setting queryType=semantic adds an L2 reranking pass that rescores the top 50 RRF/BM25 results with Microsoft's language models and returns @search.rerankerScore from 4.0 (highly relevant) down to 0.0 (irrelevant). It reranks only the existing top 50 candidates and never re-queries the whole corpus, so first-stage recall still depends on the vector/keyword query.
Trap Expecting semantic ranker to surface documents the first-stage query missed: it only reorders the top 50 already retrieved, so raise recall in the retrieval query, not the reranker.
11 questions test this
- During a RAG design review, an engineer claims that enabling semantic ranking on your Azure AI Search hybrid query will let the app find and return relevant documents that the current keyword-and-vect
- A RAG solution over an internal parts catalog uses vector-only retrieval in Azure AI Search. Support agents report that queries containing exact part numbers and rare model codes often fail to surface
- A RAG pipeline on Azure AI Search returns roughly the right documents with hybrid search, but the single most on-topic passage is often not in the top position, so the language model sometimes grounds
- A RAG application on Azure AI Search already retrieves the right grounding documents with a hybrid query, but stakeholders want the ranking of those results to better match the meaning of each user qu
- Users of a RAG assistant on Azure AI Search report that for some questions the correct answer is missing entirely from the cited sources, even though the source document exists in the index. Your curr
- You are documenting the ranking pipeline of a hybrid semantic query in Azure AI Search for your team's runbook. The request runs a keyword query and a vector query, merges them, and then applies the s
- You are optimizing grounding relevance for a RAG chat app on Azure AI Search and Microsoft Foundry. Microsoft's benchmark testing on real-world datasets indicates one retrieval configuration consisten
- Your RAG app on Azure AI Search grounds a Foundry model, but several documents that clearly answer users' questions never appear anywhere in the results. A teammate turned on semantic ranking expectin
- In a RAG solution on Azure AI Search you enable semantic ranking and want to drop weakly relevant passages before sending grounding context to the language model, keeping only strongly relevant ones.
- You are tuning the retrieval quality of a RAG application on Azure AI Search to give the language model the most relevant grounding passages. Microsoft's own benchmark guidance points to one combinati
- You are reasoning about how the semantic ranker fits into a hybrid retrieval pipeline on Azure AI Search before you enable it for a RAG workload. You want to set expectations for how much of the resul
- Semantic ranker also returns captions, answers, and query rewrites
Beyond L2 reranking, semantic ranker returns verbatim semantic captions (usually under 200 words) and optional semantic answers extracted from indexed text, and with query rewrite enabled it expands a query into up to 10 semantically similar variants that each run and are rescored. Captions and answers are always verbatim from the index; no generative model composes new text.
Trap Assuming semantic answers are generated by an LLM: they are extracted verbatim from your index, not synthesized.
- RAG evaluators score Retrieval, Groundedness, and Relevance from 1 to 5
The Azure AI Evaluation SDK and Foundry evaluations provide built-in RAG evaluators that each return a 1-to-5 score: Retrieval rates how well the retrieved chunks rank the relevant context, Groundedness rates whether the response is supported by that context without fabrication, and Relevance rates whether the response addresses the user's query. Combine them, often with content-safety evaluators, for a full quality picture.
Trap Treating Groundedness and Relevance as the same metric: Groundedness checks support by the retrieved context (hallucination), while Relevance checks that the answer addresses the question.
8 questions test this
- A retrieval-augmented generation assistant in Microsoft Foundry returns answers that are fully supported by the retrieved passages and read well, but users complain that the answers often discuss rela
- During evaluation of a RAG assistant in Microsoft Foundry, you find responses that faithfully repeat only what the retrieved context says - no fabrication - yet wander into related material and never
- You evaluate a retrieval-augmented generation assistant in Microsoft Foundry. The Retrieval score is high, confirming the correct passages are being returned, but the Groundedness score is low because
- You are preparing a pre-deployment quality assessment for a RAG customer-support assistant in Microsoft Foundry. You want a well-rounded view that covers whether the search step surfaces the right con
- You review Azure AI Evaluation SDK results for a RAG assistant and see a consistently high Retrieval score paired with a low Relevance score on the shared evaluation dataset. You must explain to the t
- You evaluate a retrieval-augmented generation assistant in Microsoft Foundry. The Retrieval score is high and Groundedness is acceptable, but the Relevance score is low: answers are supported by the r
- A team building a retrieval-augmented generation app in Microsoft Foundry wants a full quality picture that separately captures how relevant the retrieved chunks are, whether the response is supported
- An evaluation run on your Foundry RAG assistant reports a high Retrieval score but a low Groundedness score across the shared evaluation dataset, while Relevance is acceptable. The retrieved chunks cl
- A/B test RAG configurations on one fixed evaluation dataset
To improve a RAG system, run A/B tests that change one variable at a time (chunk size, overlap, k, embedding model or dimensions, hybrid on/off, semantic ranker on/off) and score each variant on the same evaluation dataset, then keep the configuration with the higher aggregate evaluator scores. A consistent, controlled test set, synthetic if production data is unavailable, is what makes the comparison valid.
Trap Comparing two configurations on different query sets: only a shared, fixed evaluation dataset yields a valid A/B comparison.
8 questions test this
- Before deploying a retrieval-augmented generation assistant in Microsoft Foundry, your team has no production traffic yet but needs a consistent, repeatable set of query and response inputs to A/B tes
- Your team wants to know whether increasing the retrieval chunk size improves a RAG application in Microsoft Foundry. One engineer proposes indexing the corpus with the larger chunk size, then judging
- You complete an A/B test of two RAG configurations in Foundry, changing only the retrieval chunk size and scoring both variants on the same fixed evaluation dataset. Variant B earns higher aggregate R
- A team compares two retrieval-augmented generation configurations in Microsoft Foundry, one with the semantic ranker on and one with it off. They scored the first configuration on last quarter's logge
- A colleague is running an A/B test to decide whether a new embedding model improves your RAG system in Foundry. To save time, the colleague also turns on the semantic ranker and doubles the retrieved-
- You are tuning a retrieval-augmented generation pipeline in Microsoft Foundry and suspect that a larger chunk size will improve answer quality. You already have a fixed evaluation dataset of represent
- Before launching a RAG knowledge assistant in Microsoft Foundry, you want to A/B test two retrieval configurations, but the application has no production traffic yet and therefore no real user queries
- You A/B tested two retrieval-augmented generation configurations in Microsoft Foundry on the same fixed evaluation dataset, changing only whether the semantic ranker was enabled. One variant now shows
- Evaluator scores localize a RAG fault to retrieval or generation
The evaluators show where to fix a RAG system: a low Retrieval score points to indexing (chunking, embedding model or dimensions, k, or hybrid search), while a high Retrieval score with low Groundedness or Relevance points to the generation step (prompt or model), because the right context was retrieved but the answer did not use it. Fix retrieval first when Retrieval is the weak metric.
Trap Rewriting the prompt when Retrieval is low: if the right chunks were never retrieved, no prompt change can ground the answer, so fix retrieval first.
6 questions test this
- You evaluate a retrieval-augmented generation assistant in Microsoft Foundry. The Retrieval score is high, confirming the correct passages are being returned, but the Groundedness score is low because
- An Azure AI Evaluation SDK run on your RAG assistant returns a low Retrieval score together with low Groundedness and Relevance scores on the shared evaluation dataset. A teammate suggests rewriting t
- You review Azure AI Evaluation SDK results for a RAG assistant and see a consistently high Retrieval score paired with a low Relevance score on the shared evaluation dataset. You must explain to the t
- You evaluate a retrieval-augmented generation assistant in Microsoft Foundry. The Retrieval score is high and Groundedness is acceptable, but the Relevance score is low: answers are supported by the r
- You evaluate a retrieval-augmented generation solution in Microsoft Foundry and the built-in Retrieval evaluator returns a low score across the dataset, yet spot checks confirm the model answers well
- An evaluation run on your Foundry RAG assistant reports a high Retrieval score but a low Groundedness score across the shared evaluation dataset, while Relevance is acceptable. The retrieved chunks cl
Advanced Fine-Tuning and Model Customization
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.