Free AI-300 practice test

20 questions for the Microsoft Machine Learning Operations Engineer Associate (AI-300) exam, taken from our 251-question bank and spread across its 5domains by their weighting. No sign-up needed: pick an answer to check it, or open “Show answer & explanation” under any question.

What this test covers

Question 1 · Design and implement an MLOps infrastructure

A company is designing an Azure Machine Learning workspace with a managed virtual network. The networking team requires that outbound traffic from the workspace's managed network to the internet be completely blocked, but the workspace must still be able to pull base Docker images from Microsoft Artifact Registry (mcr.microsoft.com) to build custom environments. Which managed network outbound rule type should be configured to allow this traffic?

Show answer & explanation

Correct answer: B

  • B. An FQDN outbound rule allowing outbound traffic to the FQDN 'mcr.microsoft.com'.

Azure Machine Learning managed virtual networks support FQDN outbound rules, which allow outbound traffic to specific fully qualified domain names over HTTPS. Adding an FQDN rule for 'mcr.microsoft.com' is the correct and supported way to allow access to Microsoft Artifact Registry from a managed network with internet outbound blocked. Service tag outbound rules (option A) in managed networks are used for Azure service tags that represent Azure service IP ranges, not for container registry FQDN access; additionally, the 'MicrosoftContainerRegistry' service tag covers the data plane of Azure Container Registry, not MCR specifically. Private endpoint outbound rules (option C) are for private endpoints to your own Azure resources, not for public Microsoft endpoints. User-defined routes (option D) are not a concept within the Azure ML managed virtual network — UDRs apply to customer-managed VNets, not the managed network abstraction.

Question 2 · Design and implement an MLOps infrastructure

A company uses Azure Machine Learning managed online endpoints for model deployment. The MLOps team wants to implement blue-green deployments using traffic splitting. After deploying a new 'green' deployment alongside the existing 'blue' deployment, they want to route 20% of traffic to 'green' and 80% to 'blue'. Using the Azure CLI v2, which command achieves this?

Show answer & explanation

Correct answer: A

  • A. az ml online-endpoint update --name my-endpoint --traffic "blue=80 green=20" --workspace-name ml-workspace --resource-group ml-rg

The correct command is 'az ml online-endpoint update' with the '--traffic' flag specifying deployment name/percentage pairs as a space-separated string. This updates the traffic allocation on the endpoint level. Option C is incorrect because traffic weights are managed at the endpoint level, not the deployment level; 'az ml online-deployment update' does not have a '--traffic-weight' flag. Option D is incorrect because 'az ml online-endpoint create' is for initial creation, not updating traffic, and '--traffic-split' is not the correct flag syntax. Option B confuses '--mirror-traffic', which is used for mirroring a percentage of traffic to a deployment for testing purposes without serving it to users, not for live traffic splitting.

Question 3 · Design and implement an MLOps infrastructure

An MLOps engineer needs to register an Azure Machine Learning datastore that connects to an Azure Blob Storage container. The organization's policy requires that the datastore authenticate using a managed identity rather than account keys or SAS tokens. The workspace has a system-assigned managed identity enabled. Which two steps must the engineer complete to successfully configure this datastore? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: B, C

  • B. Register the datastore using the Azure ML SDK or CLI with the credential type set to 'none' (identity-based access).
  • C. Grant the workspace's system-assigned managed identity the 'Storage Blob Data Contributor' role on the target Azure Blob Storage account.

For identity-based (credential-less) datastore access, two things are required: (1) the workspace's managed identity must be granted an appropriate data-plane role — 'Storage Blob Data Contributor' (or at minimum 'Storage Blob Data Reader') — on the storage account; and (2) the datastore must be registered with credential type 'none' so Azure ML uses the managed identity at runtime instead of a key or SAS token. Uploading an access key to Key Vault (option D) is used for key-based authentication, which contradicts the policy. Assigning 'Contributor' on the workspace to the storage account's service principal (option A) is backwards and irrelevant. Enabling the trusted services firewall exception (option E) may be needed for network access in certain configurations but is not a prerequisite for identity-based datastore authentication in a standard setup.

Question 4 · Design and implement an MLOps infrastructure

An organization is migrating an existing Azure Machine Learning workspace to a new Azure subscription. They need to preserve all registered model versions, curated environments, and reusable pipeline components so that teams in the new subscription can immediately use them without re-registering each asset manually. Which approach MOST efficiently accomplishes this with the LEAST operational overhead?

Show answer & explanation

Correct answer: C

  • C. Create an Azure Machine Learning registry in a scope accessible to both the old and new subscriptions, promote all assets from the old workspace into the registry, and then consume them directly from the registry in the new workspace.

Azure Machine Learning registries are designed precisely for cross-workspace and cross-subscription asset sharing and migration. By creating a registry accessible to both subscriptions and promoting (copying) models, environments, and components into it, all teams in the new subscription can consume them immediately with full version history and metadata—no manual re-registration of each asset is needed. Option A (YAML export and re-registration) works but is highly manual and operationally expensive for large asset catalogs; it also does not preserve lineage. Option D (Azure Resource Mover) does not support Azure Machine Learning workspaces as a movable resource type in the same way—ML workspace migrations are not supported via Resource Mover, and even if they were, it would move the entire workspace rather than selectively migrating assets. Option B (storage account snapshot) would copy underlying artifact files but would not reconstruct the ML asset metadata, versioning, and registry entries that Azure ML uses to track models, environments, and components.

Question 5 · Implement machine learning model lifecycle and operations

A team runs an Azure Machine Learning training pipeline nightly. Recently, a pipeline step that reads raw data from Azure Data Lake fails intermittently with transient network errors, causing the entire pipeline to restart from scratch. The team wants the pipeline to retry only the failed step without re-executing successful upstream steps. Which pipeline configuration option addresses this?

Show answer & explanation

Correct answer: D

  • D. Enable the 'reuse' (allow_reuse=True) setting on all steps so Azure ML caches completed step outputs and skips them on retry.

Setting allow_reuse=True on pipeline steps causes Azure ML to cache the output of each step keyed to its inputs and code. On a re-run (after fixing or retrying the failed step), all steps whose inputs and code are unchanged will be skipped and their cached outputs reused, so only the failed step re-executes. Option A would suppress the error and propagate incomplete data downstream, corrupting results. Option C is incorrect: Azure ML pipelines do not have a 'debug' mode that provides automatic step-level retry. Option B avoids the problem partially but introduces operational complexity and does not solve transient failures within a single pipeline run.

Question 6 · Implement machine learning model lifecycle and operations

A financial services company uses Azure Machine Learning Automated ML to train a credit risk model. The target column is highly imbalanced: 95% of records are non-default and 5% are default. The team notices that Automated ML selects accuracy as the primary metric by default and the winning model achieves 95% accuracy by predicting non-default for every record. Which configuration change should the data scientist make to ensure Automated ML selects a model that meaningfully distinguishes defaulters from non-defaulters?

Show answer & explanation

Correct answer: C

  • C. Change the primary metric to AUC_weighted or average_precision_score_weighted

Changing the primary metric to AUC_weighted or average_precision_score_weighted ensures that Automated ML optimizes for a metric that is sensitive to the minority class performance, unlike accuracy which is dominated by the majority class. A model that predicts only non-default will score poorly on AUC or average precision. Enabling class_weight='balanced' in featurization affects how some learners handle class imbalance, but it does not fix the metric selection problem—accuracy will still reward the trivial classifier. Increasing experiment_timeout_minutes allows more iterations but does not change the optimization objective, so Automated ML may still select the trivially accurate model. Setting enable_early_stopping=False prevents early termination of individual model training but does not address the flawed metric choice.

Question 7 · Implement machine learning model lifecycle and operations

A data scientist is designing an Azure Machine Learning pipeline that includes a Responsible AI component to evaluate a text classification model. The team needs to assess three aspects: (1) model fairness across language subgroups, (2) feature importance for individual predictions, and (3) systematic identification of input segments where the model fails most often. Which THREE Responsible AI dashboard components should be added to address all three requirements?

Select 3 answers.

Show answer & explanation

Correct answers: B, D, E

  • B. Interpretability (feature importance)
  • D. Fairness assessment
  • E. Error analysis

Fairness assessment measures performance disparities across demographic or categorical subgroups (here, language subgroups), satisfying requirement 1. Interpretability (feature importance) surfaces global and local feature attribution scores, explaining which input features drive individual predictions, satisfying requirement 2. Error analysis identifies cohorts and input segments with the highest error rates, helping engineers find systematic failure modes, satisfying requirement 3. Counterfactual analysis generates what-if perturbations for individual instances to explain prediction boundaries but does not address group fairness or systematic error patterns. Data explorer provides statistical summaries and distributions of the dataset but is not an evaluation component for the three stated requirements. Causal analysis estimates causal treatment effects of features on outcomes, which is relevant for intervention planning but does not address fairness, feature attribution for predictions, or error cohort identification.

Question 8 · Implement machine learning model lifecycle and operations

An organization is configuring retraining triggers for a product recommendation model in Azure Machine Learning. The ML team has defined three potential trigger conditions. Which TWO trigger types are natively supported as automated retraining triggers in Azure Machine Learning model monitoring?

Select 2 answers.

Show answer & explanation

Correct answers: C, D

  • C. A data drift metric exceeding a configured threshold
  • D. A prediction drift metric exceeding a configured threshold

Azure Machine Learning model monitoring natively supports alert-based retraining triggers when monitored signals—such as data drift or prediction drift—exceed configured thresholds. Both data drift and prediction drift signals can fire Azure Monitor alerts that can be connected to retraining pipelines via webhooks or event-based triggers. A scheduled calendar interval is a valid retraining trigger, but it is implemented through Azure ML pipeline schedules or Azure Data Factory, not through the model monitoring system itself. A manual approval gate in Azure DevOps is a pipeline release management feature, not a monitoring-native retraining trigger. Request volume limits are not a built-in monitoring signal in Azure ML model monitors.

Question 9 · Implement machine learning model lifecycle and operations

A senior MLOps engineer is designing a retraining trigger strategy for a demand forecasting model in Azure Machine Learning. The model is monitored weekly using the Azure ML model monitor. Which THREE conditions should independently trigger an automated retraining pipeline? (Select THREE.)

Select 3 answers.

Show answer & explanation

Correct answers: A, B, C

  • A. The data drift signal detects that the Jensen-Shannon distance between current and baseline input distributions exceeds the configured threshold.
  • B. The prediction drift signal detects that the model's output distribution has diverged significantly from the production baseline.
  • C. The model quality signal (using collected ground-truth labels) shows that MAE has increased beyond an acceptable business threshold.

Options A, B, and C represent the canonical ML monitoring-based retraining triggers: (A) input data drift indicates the model may be operating outside its training distribution; (B) prediction drift indicates the model's behavior has changed, possibly due to concept drift; (C) degraded model quality (MAE above threshold) against ground truth directly measures production performance degradation. Option D (library update) is a dependency management/DevOps trigger, not a model performance trigger. Option E (decreased request volume) is a business KPI change, not an ML model quality signal — it may indicate reduced business activity rather than model degradation. Option F (new data partition) might warrant retraining but is a data governance decision, not a monitoring signal; it does not independently indicate the current model is degraded.

Question 10 · Implement machine learning model lifecycle and operations

A machine learning engineer needs to deploy a trained model in Azure Machine Learning to serve thousands of synchronous scoring requests per second with sub-100ms latency. Which deployment option is most appropriate?

Show answer & explanation

Correct answer: A

  • A. A managed online endpoint with a real-time deployment

A managed online endpoint with a real-time deployment is designed for synchronous, low-latency, high-throughput scoring scenarios. A batch endpoint processes data asynchronously in bulk and is not suited for sub-100ms synchronous requests, even with a mini-batch size of one. A pipeline endpoint triggered by Azure Data Factory introduces orchestration overhead and is designed for workflow automation, not real-time inference. A serverless batch deployment with auto-scaling disabled would not handle high concurrency and introduces latency from batch scheduling.

Question 11 · Design and implement a GenAIOps infrastructure

A company is deploying Azure AI Foundry infrastructure using Bicep. The security team requires that the Foundry hub and all dependent resources communicate exclusively over private IP addresses, with no public internet exposure. Which two configurations must be included in the Bicep template to satisfy this requirement? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: C, E

  • C. Deploy a Private Endpoint for the Azure AI Foundry hub and link it to the target virtual network.
  • E. Set the publicNetworkAccess property on the Azure AI Foundry hub resource to Disabled.

To eliminate public internet exposure, you must both disable public network access (publicNetworkAccess: 'Disabled') so the service rejects requests arriving over the public endpoint, AND deploy a Private Endpoint so that the hub is reachable via a private IP address within the virtual network. Together these two settings enforce fully private connectivity. Option D (DDoS Protection) adds resilience against volumetric attacks but does not restrict public access to the resource itself. Option B (NAT gateway) controls outbound traffic from a subnet but does nothing to make the Foundry hub private. Option A (NSG allow-all on 443) would actually open inbound traffic rather than restricting it, the opposite of the requirement.

Question 12 · Design and implement a GenAIOps infrastructure

A team is designing RBAC for an Azure AI Foundry hub shared by three departments. Each department has its own project inside the hub. Department A's data scientists should be able to deploy models and manage prompt flows only within Department A's project. They must NOT be able to view or modify resources in Department B's or Department C's projects. What is the MOST appropriate RBAC assignment strategy?

Show answer & explanation

Correct answer: B

  • B. Assign Department A's data scientists the 'Azure AI Developer' role scoped specifically to Department A's project resource, and do not grant them any role at the hub scope.

Scoping the 'Azure AI Developer' role to Department A's project resource grants the necessary permissions (model deployment, prompt flow management) within that project only, with no inherited access to other projects. Azure RBAC is additive and scoped, so a role assignment at the project level does not propagate to sibling projects. Option A is wrong because assigning the role at the hub scope grants access to all child projects, violating the isolation requirement. Option C is wrong because 'Contributor' at the hub scope also grants broad access, and deny assignments add unnecessary complexity and are not the recommended least-privilege approach. Option D is wrong because combining 'Reader' at hub scope with 'Owner' at project scope still provides read visibility across the hub's shared resources and 'Owner' is more permissive than needed.

Question 13 · Design and implement a GenAIOps infrastructure

A team has deployed a GPT-4o model to Azure AI Foundry using a serverless API endpoint. During a model version upgrade, they want to shift 10% of traffic to the new version while keeping 90% on the existing version to validate behavior before full rollout. Which Azure AI Foundry feature supports this traffic-splitting approach?

Show answer & explanation

Correct answer: A

  • A. Deploying both versions as separate serverless endpoints and using Azure API Management policies to route traffic

Azure AI Foundry serverless API endpoints for foundation models do not natively support traffic-weight splitting between two model versions under a single endpoint in the way managed compute endpoints do. The correct approach is to deploy both versions as separate endpoints and use an API gateway such as Azure API Management to implement weighted routing policies, giving 10% traffic to the new version and 90% to the old. Option B describes a feature more aligned with managed compute endpoints for custom models, not serverless foundation model endpoints, where version-level traffic splitting is not directly available. Creating separate Foundry projects (option C) adds unnecessary management overhead and Azure Front Door is not an appropriate tool for this scenario. Azure Monitor (option D) provides observability, not traffic routing control.

Question 14 · Design and implement a GenAIOps infrastructure

A cloud architect is provisioning a new Azure AI Foundry hub for a healthcare organization. The security team mandates that all communication between the Foundry hub and dependent Azure services—such as Azure Storage and Azure Key Vault—must never traverse the public internet. Which configuration should the architect apply to the Foundry hub to satisfy this requirement?

Show answer & explanation

Correct answer: C

  • C. Configure the hub with a managed virtual network and set the isolation mode to 'Allow Only Approved Outbound'

Setting the managed virtual network isolation mode to 'Allow Only Approved Outbound' ensures that all outbound traffic from the hub is restricted to explicitly approved private endpoints for dependent services (Storage, Key Vault, etc.), preventing any traffic from reaching the public internet. 'Allow Internet Outbound' (option D) still permits general internet traffic, which violates the requirement. IP allowlists (option A) control inbound public access but do not prevent outbound traffic from traversing the internet. Placing the hub in a customer VNet without enabling the managed VNet feature (option B) does not automatically enforce private connectivity for dependent managed services.

Question 15 · Implement generative AI quality assurance and observability

A data scientist at Contoso is preparing a test dataset to evaluate a retrieval-augmented generation (RAG) chatbot built in Azure AI Foundry. The dataset must include the fields required by the built-in groundedness evaluator. Which combination of fields is REQUIRED in the test dataset for the groundedness evaluator to function correctly?

Show answer & explanation

Correct answer: A

  • A. query, response, context

The built-in groundedness evaluator in Azure AI Foundry measures whether the model's response is supported by the retrieved context. It requires the 'query' (user input), 'response' (model output), and 'context' (retrieved documents or passages) fields. 'ground_truth' is used by other evaluators such as the similarity or F1 evaluators, not groundedness. Option B is incorrect because groundedness does not compare against a ground-truth answer—it checks whether the response is grounded in the provided context. Option C omits the query, which is needed to frame what is being asked. Option D omits the response, leaving nothing to evaluate.

Question 16 · Implement generative AI quality assurance and observability

A team at Northwind Health is configuring an automated evaluation pipeline in Azure AI Foundry. They want to assess whether their medical-information chatbot produces responses that read naturally and are grammatically correct, so that patients do not perceive output as machine-like. Which built-in evaluator should they prioritize for this goal?

Show answer & explanation

Correct answer: A

  • A. Fluency evaluator

Fluency evaluates the grammatical correctness, natural phrasing, and readability of the generated text—exactly what the team needs to ensure responses do not feel machine-like. Groundedness (option B) checks factual support from context documents, not readability. Relevance (option C) measures whether the response answers the question, not how naturally it is phrased. Coherence (option D) measures logical flow and consistency across sentences, which overlaps somewhat but is distinct from surface-level grammatical fluency. For patient-facing naturalness, Fluency is the primary metric.

Question 17 · Implement generative AI quality assurance and observability

An AI engineer at Fabrikam is reviewing quality metrics produced by Azure AI Foundry's evaluation service for a customer-support language model. The metric score indicates how well the model's response directly addresses the user's question, independent of whether external documents support it. Which metric is being described?

Show answer & explanation

Correct answer: A

  • A. Relevance

Relevance measures how well the model's response addresses the user's question or intent—it is query-centric and does not require external context documents. Groundedness (option D) measures whether the response is factually supported by retrieved context, not whether it answers the question. Coherence (option B) measures the logical flow and consistency of the response text. Fluency (option C) measures grammatical correctness and readability of the response. Only Relevance directly captures whether the answer is on-topic relative to what was asked.

Question 18 · Optimize generative AI systems and model performance

A data science team at a healthcare company is preparing to fine-tune a clinical note summarization model. They have 50,000 de-identified clinical notes but notice significant class imbalance: 80% of notes are from routine outpatient visits, while only 5% are from ICU encounters. The model will be evaluated equally on both note types in production. Which TWO data preparation strategies should the team apply to ensure the fine-tuned model performs well across both note types? (Select TWO.)

Select 2 answers.

Show answer & explanation

Correct answers: B, D

  • B. Oversample ICU encounter notes or apply a weighted sampling strategy during training to ensure the model sees sufficient ICU examples
  • D. Use synthetic data generation techniques (e.g., GPT-4o) to augment the underrepresented ICU note category, followed by domain expert validation of generated examples

Option B (oversampling or weighted sampling) is a standard technique to address class imbalance, ensuring the model trains on enough ICU examples to learn their patterns without discarding the majority class. Option D (synthetic augmentation with expert validation) is particularly valuable here — generating additional ICU note summaries using a capable LLM and validating them with clinical experts expands the rare class while maintaining quality. Option C is incorrect — removing 80% of training data would impoverish the model's ability to generalize and wastes most of the available data. Option E (uniform 256-token chunking) is a chunking strategy unrelated to class imbalance; clinical notes vary in length for valid reasons. Option A describes using a production-distribution test set, which would systematically underreport ICU performance — the test set should be stratified equally across note types to measure performance on both fairly, as stated in the problem's evaluation requirement.

Question 19 · Optimize generative AI systems and model performance

A developer is configuring chunk sizes for a RAG system that will answer questions from dense technical API documentation. The documentation contains many interdependent code snippets and parameter descriptions. Users report that answers are incomplete because responses are missing important contextual details. Which chunking strategy adjustment is MOST appropriate?

Show answer & explanation

Correct answer: C

  • C. Increase chunk size to preserve more surrounding context within each retrieved passage.

When answers are incomplete because context is fragmented across chunks, the appropriate fix is to increase chunk size so that related content (e.g., a function signature plus its parameters and description) is contained in a single retrievable unit. Option B (smaller chunks) would worsen the fragmentation problem. Option A (lower threshold) would bring in more chunks but many would be less relevant, increasing noise rather than improving completeness. Option D (character-level chunking) is a granularity change unrelated to the contextual completeness problem and could introduce its own alignment issues with token-based embedding models.

Question 20 · Optimize generative AI systems and model performance

A company is fine-tuning an Azure OpenAI model to classify customer support tickets into product categories. After training, they notice the model performs excellently on the training set but poorly on new tickets. They have a limited labeled dataset of 2,000 examples. Which two actions are most likely to improve generalization? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: A, C

  • A. Reduce the learning rate multiplier to prevent overfitting to the small dataset
  • C. Generate synthetic training examples using a larger model to augment the dataset

Generating synthetic data (C) expands the training distribution and reduces overfitting caused by limited examples. Reducing the learning rate multiplier (A) prevents the model from memorizing the small training set, improving generalization. Increasing epochs significantly (D) on a small dataset worsens overfitting. Deduplication (E) is good practice but will further shrink an already limited dataset and does not help generalization directly here. Switching to a larger base model (B) does not inherently solve overfitting and may make it worse on a tiny dataset without other regularization.

Pick an answer on each question to check it. 20 questions in this test.

231 more AI-300 questions

Sign up free to start practising, or subscribe (from $4.97/mo) for the full 251-question bank, flashcards and timed mock exams.

Microsoft Machine Learning Operations Engineer Associate course overview and study guides →