Free Microsoft Operationalizing Machine Learning and Generative AI Solutions AI-300 Exam Questions
Page: 1 / 13Total 187 questions
Want more questions? Get Premium Access.
Question 1
You use the Azure Machine learning SDK v2 tor Python and notebooks to tram a model. You use Python code to create a compute target, an environment, and a taring script. You need to prepare information to submit a training job.
Which class should you use?
Correct Answer:B. command
Explanation:
To submit a training job in Azure Machine Learning SDK v2, you need to use the Command class. This class allows you to specify the compute target, environment, training script, and other parameters required to submit a training job. The Command class is the primary way to define and submit command-based training jobs in SDK v2.
Question 2
You have an Azure Machine Learning workspace.
You plan to run a job to tram a model as an MLflow model output.
You need to specify the output mode of the MLflow model.
Which three modes can you specify? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Correct Answer:B. ro mount; C. upload; E. direct
Explanation:
When specifying the output mode for an MLflow model, you can use three modes: (1) Copy - Copies the model artifacts to the output directory. (2) Symlink - Creates symbolic links to the model artifacts instead of copying them, which saves storage space. (3) Pickle - Serializes the model using Python's pickle format for storage. These three modes provide different options for how MLflow model outputs are handled and stored.
Question 3
A company's platform engineers manage the resource settings and governance of Microsoft Foundry.
Developers must be able to create and update project assets but must not be able to change resource-level configurations.
You need to enforce least privilege access for the engineers and developers.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point. Choose two.
Correct Answer:A. Assign a resource-level Azure AI Administrator role to the platform engineers.; C. Assign the Azure AI Developer role to the developers.
Explanation:
Microsoft's Azure AI Foundry documentation defines built-in roles scoped to the resource hierarchy. The Azure AI Administrator role grants permissions to manage the Azure AI Hub resource itself --- including network settings, shared connections, quota, and governance configuration --- which is appropriate for platform engineers who configure resource-level settings. The Azure AI Developer role grants permissions to create, update, and manage project-level assets such as deployments, prompt flows, fine-tuning jobs, and evaluations, without access to resource-level configuration. This precisely matches the developer requirement and enforces least privilege. Disabling Entra ID authentication (option B) violates security policy and removes the identity-based access control that makes RBAC possible. Sharing a single API key (option D) violates the least-privilege principle --- all users would have identical, undifferentiated access with no audit trail.
Microsoft Learn Reference Topic: Manage access to Azure AI Foundry -- Built-in roles: Azure AI Administrator and Azure AI Developer
Question 4
You run Azure Machine Learning training experiments. The training scripts directory contains 100 files that includes a file named. amlignore. The directory also contains subdirectories named. /outputs and./logs.
There are 20 files in the training scripts directory that must be excluded from the snapshot to the compute targets. You create a file named. gift ignore in the root of the directory. You add the names of the 20 files to the. gift ignore file. These 20 files continue to be copied to the compute targets.
You need to exclude the 20 files. What should you do?
Correct Answer:C. Copy the contents of the file named. gift ignore to the file named. amlignore.
Explanation:
The issue is that you're using .gitignore when you should be using .amlignore. The .amlignore file is the Azure Machine Learning-specific file used to exclude files from snapshots sent to compute targets. The .gitignore file is for Git version control and won't affect Azure Machine Learning snapshot behavior. By adding the 20 files to the .amlignore file instead of .gitignore, they will be properly excluded from the compute target snapshot.
Question 5
A financial services company is deploying Microsoft Foundry to host generative AI workloads that process regulated customer dat
a. The Microsoft Foundry environment must prevent any public network exposure while still allowing services managed by Microsoft Foundry to communicate with dependent Azure resources.
Security auditors require that all traffic to and from the Microsoft Foundry resource remain on private networks, with no public endpoints available.
You need to configure the Microsoft Foundry environment so that network access is restricted while maintaining full platform functionality.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point. Choose two.
Correct Answer:A. Configure a managed virtual network for the Microsoft Foundry resource.; E. Disable all inbound network access.
Explanation:
Microsoft's Azure AI Foundry documentation describes two required configurations for fully private network isolation. First, configure a managed virtual network for the Foundry resource: this provisions a Microsoft-managed VNet that encapsulates all internal service communications --- the Foundry control plane communicates with dependent Azure services such as storage, key vault, and cognitive services over private endpoints within this managed VNet, so no traffic crosses the public internet. Second, disable public network access to the Foundry resource: this removes the public endpoint entirely, ensuring that only clients on approved private networks via private endpoint connection can reach it. Together, these two actions ensure all traffic remains on private networks with no public endpoints available, satisfying the security auditor requirement for complete network isolation.
Microsoft Learn Reference Topic: Configure managed virtual network for Azure AI Foundry -- Network isolation and private endpoints
Question 6
You manage an Azure Machine Learning workspace. You design a training job that is configured with a serverless compute. The serverless compute must have a specific instance type and count
You need to configure the serverless compute by using Azure Machine Learning Python SDK v2. What should you do?
Correct Answer:C. Initialize and specify the ResourceConfiguration class
Explanation:
To configure serverless compute with specific instance type and count in Azure Machine Learning Python SDK v2, you should use the ServerlessComputeSettings class. This class allows you to specify the compute instance type (VM size) and the number of instances needed for your training job. You pass this configuration when defining your training job to ensure the serverless compute is provisioned with your desired specifications.
Question 7
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals.
You have an Azure Machine Learning workspace. You connect to a terminal session from the Notebooks page in Azure Machine Learning studio.
You plan to add a new Jupyter kernel that will be accessible from the same terminal session.
You need to perform the task that must be completed before you can add the new kernel.
Solution: Delete the Python 3.6 - AzureML kernel.
Does the solution meet the goal?
Correct Answer:B. No
Explanation:
No. Removing the existing Python 3.6 - AzureML kernel is not a prerequisite for adding a new kernel. Azure Machine Learning supports multiple installed Jupyter kernels on the same compute instance, and notebooks can select among those kernels without requiring one existing kernel to be removed first. Microsoft states that the notebook environment automatically discovers all Jupyter kernels installed on the connected compute instance.
The supported new-kernel workflow begins by creating a separate environment, for example with conda create --name newenv, and activating it. The required pip and ipykernel packages are then installed in the environment before registering it with Jupyter by using python -m ipykernel install --user --name newenv.
Deleting an existing AzureML kernel provides no technical benefit to that workflow. Microsoft also explicitly cautions users not to delete Conda environments or Jupyter kernels they did not create, because doing so can interfere with built-in Jupyter/JupyterLab functionality on the compute instance.
Therefore, the existing Python 3.6 kernel should remain untouched; the new kernel should be installed alongside it in its own environment.
Study Guide Reference: Design and implement an MLOps infrastructure --- Jupyter kernel management, Conda environments, Azure Machine Learning compute instances, and development environment isolation.
Question 8
You have an Azure Machine Learning workspace that includes an AmICompute cluster and a batch endpoint. You clone a repository that contains an MLflow model to your local computer. You need to ensure that you can deploy the model to the batch endpoint.
Solution: Add a compute resource to the workspace.
Does the solution meet the goal?
Correct Answer:A. Yes
Explanation:
Adding a compute resource alone does not fully meet the goal. While compute is necessary for running batch predictions, it is not sufficient. To deploy the model to the batch endpoint, you must also register the model in the workspace, create a scoring script, and create the actual batch deployment configuration that links the model, scoring code, and compute together. Adding compute is only one part of the deployment process.
Question 9
You create an Azure Machine Learning workspace.
You must configure an event-driven workflow to automatically trigger upon completion of training runs in the workspace. The solution must minimize the administrative effort to configure the trigger.
You need to configure an Azure service to automatically trigger the workflow.
Which Azure service should you use?
Correct Answer:A. Event Grid subscription
Explanation:
To configure an event-driven workflow that automatically triggers upon completion of training runs in an Azure Machine Learning workspace while minimizing administrative effort, Event Grid is the appropriate Azure service.
Event Grid is ideal because:
Native integration: Azure Machine Learning natively publishes events to Event Grid when training runs complete, model registration occurs, and other workflow events happen.
Minimal configuration: You create an Event Grid subscription that listens for 'RunCompleted' or other ML events and automatically triggers configured actions (webhooks, Logic Apps, Azure Functions, etc.).
No polling required: Unlike other approaches, Event Grid uses push-based event delivery, eliminating the need for polling mechanisms.
Flexible routing: Events can be routed to multiple endpoints and filtered based on event properties.
Alternative services like Logic Apps or Azure Functions can handle the triggered workflow, but Event Grid is the service that detects and triggers on Azure ML events with minimal administrative setup.
Question 10
You create an Azure Machine Learning workspace.
You must use the Python SDK v2 to implement an experiment from a Jupiter notebook in the workspace. The experiment must log string metrics.
You need to implement the method to log the string metrics.
Which method should you use?
Correct Answer:D. mlflow.log-text0
Explanation:
To log string metrics in an Azure Machine Learning experiment using Python SDK v2, you should note that MLflow and Azure ML distinguish between metrics and artifacts:
Metrics: Numerical values logged with mlflow.log_metric() or client.log_metric(). These are specifically for numeric data like accuracy, loss, etc.
Parameters: Configuration values logged with mlflow.log_param(). These can be strings but are meant for hyperparameters.
Artifacts: Files and objects logged with log_artifact() or log_dict(). These include models, plots, images, and other file-based data.
If you need to log string-based information that doesn't fit the numeric metric model, you have options:
Log as parameter: Use mlflow.log_param() for string values that represent configuration.
Log as artifact: Use log_artifact() or log_text() to save string content as a text file artifact.
For pure string metrics without corresponding numeric values, logging as artifacts (using log_artifact() with a text file) is the appropriate approach, as the metrics system is fundamentally designed for numeric logging.
Question 11
A team uses a hosted Git repository to store training code and pipeline definitions of a machine learning experiment.
The team must ensure that access to the repository is granted without requiring each developer to store personal access tokens on their machines.
Repository access must be secure and centrally managed to reduce credential spread.
You need to enable secure access between an Azure Machine Learning workspace and the repository.
Correct Answer:D. Configure thewhaity for repository access.
Explanation:
A managed identity is the appropriate credential model when an Azure-hosted workload requires centrally controlled, non-user authentication to another service that supports Microsoft Entra identities. Managed identities eliminate developer-managed credentials because Azure manages the identity lifecycle and obtains short-lived Microsoft Entra tokens at runtime. Microsoft explicitly identifies managed identities as a mechanism for Azure-hosted applications to authenticate without storing credentials, and Azure DevOps supports managed identities for secure automation and repository-related access.
This satisfies the key MLOps security requirement: authentication is associated with the workload rather than individual developers. Administrators can grant the identity only the required repository permissions, enforcing least privilege while centralizing authorization. Microsoft also recommends Microsoft Entra-based authentication over higher-risk PAT-based approaches for Azure Repos.
Option A spreads a reusable private credential among developers and creates unnecessary exposure. Option B still introduces a PAT that must be stored, protected, rotated, and revoked. Option C depends on individual interactive authentication and is unsuitable for reliable automated MLOps workflows. Microsoft documents managed identities and workload identities as approaches that eliminate persistent secrets and reduce credential-management overhead.
Study Guide Reference: Design and implement an MLOps infrastructure --- source-control integration, workload authentication, managed identities, least-privilege access, and credential management.
Question 12
You train and publish a machine teaming model.
You need to run a pipeline that retrains the model based on a trigger from an external system.
What should you configure?
Correct Answer:C. Azure logic App
Explanation:
To run a pipeline that retrains a published machine learning model based on a trigger from an external system, you should configure a Scheduled trigger or Event-based trigger.
For external system triggers, the most common approach is:
Scheduled trigger: If retraining should occur at regular intervals (daily, weekly, monthly), configure a schedule using Azure Machine Learning's scheduling capabilities.
Event-based trigger via Event Grid: If the external system can post events to an Event Grid topic, configure an Event Grid trigger in Azure Logic Apps or Azure Functions to detect these events and invoke the retraining pipeline.
Webhook trigger: The external system can call a webhook that initiates the pipeline run directly.
If the external system has flexibility in how it communicates, Event Grid integration provides the most scalable and decoupled approach. The specific configuration depends on how the external system will signal that retraining is needed (time-based, event-based, or direct HTTP call).
Question 13
You are planning to register a trained model in an Azure Machine Learning workspace.
You must store additional metadata about the model in a key-value format. You must be able to add new metadata and modify or delete metadata after creation.
You need to register the model.
Which parameter should you use?
Correct Answer:D. properties
Explanation:
azureml.core.Model.properties:
Dictionary of key value properties for the Model. These properties cannot be changed after registration, however new key value pairs can be added.
You must create and configure a compute cluster for a training job by using Python SDK v2.
You need to create a persistent Azure Machine Learning compute resource, specifying the fewest possible properties.
Which two properties should you define? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Correct Answer:A. max_instances; D. Min_instances
Explanation:
To create a persistent Azure Machine Learning compute cluster with the fewest possible required properties using Python SDK v2, you must define: (1) name - the name of the compute cluster, and (2) vm_size - the virtual machine size for the cluster nodes. These are the two minimum required properties. Other properties like min_instances, max_instances, and location have defaults if not specified.
Question 15
You manage an Azure Machine Learning workspace.
You must log multiple metrics by using MLflow.
You need to maximize logging performance.
What are two possible ways to achieve this goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
Correct Answer:A. MLflowClient.log_batch; B. mlflowlog_metrics
Explanation:
To maximize logging performance when logging multiple metrics with MLflow, you can use two approaches: (1) Batch logging with mlflow.log_metrics() - This method allows you to log multiple metrics in a single call, which is more efficient than logging metrics one at a time. (2) Nested runs with nested=True - This allows parallel logging of metrics across multiple runs, which can improve performance in scenarios where you're logging from multiple processes or tracking multiple experiment variants simultaneously.