CertSafari

    Free Microsoft Certified: Azure Data Scientist Associate (DP-100) Sample Questions

    35 free sample questions from our bank of 361+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Design and prepare a machine learning solution

    1.1 Design a machine learning solution

    1.You are designing a workspace architecture. You need to ensure that data scientists can use a shared file system to store their personal notebooks and scripts, which persists even if their specific compute resources are deleted. Which storage resource is automatically provisioned for this purpose when you create the workspace?

    1. A.Azure Blob Storage
    2. B.Azure File Share
    3. C.Azure Data Lake Storage Gen2
    4. D.Azure SQL Database
    Show answer & explanation

    Correct answer: BAzure File Share

    • A. While Azure Blob Storage is part of the default storage account provisioned for the workspace, it is primarily used for storing datasets, experiment artifacts, and logs. It is not the POSIX-compliant shared file system mounted for personal notebooks.
    • B. Azure File Share is automatically provisioned when an Azure Machine Learning workspace is created. It provides a shared file system (typically mapped to the /Users directory) that is mounted onto compute instances, ensuring that notebooks and scripts persist independently of the compute lifecycle.
    • C. Azure Data Lake Storage Gen2 is designed for high-performance big data analytics. While it can be registered as a datastore, it is not the default storage resource provisioned for the purpose of storing and mounting personal workspace files.
    • D. Azure SQL Database is a relational database service. It is not automatically provisioned with an Azure Machine Learning workspace and is not used for storing scripts or acting as a shared file system.

    1.1 Design a machine learning solution

    2.You are designing a data ingestion strategy. You have thousands of small IoT log files in a blob container. For model training, you need to treat this collection of files as a single evolving dataset. Which two actions should you take to define this in Azure ML?(Select 2)

    1. A.Create a Datastore pointing to the blob container.
    2. B.Create a URI File data asset for every individual log file.
    3. C.Create a URI Folder data asset pointing to the root container or folder.
    4. D.Download all files to the compute instance local drive.
    5. E.Upload all files to the Azure ML default storage account manually.
    Show answer & explanation

    Correct answers: A, CCreate a Datastore pointing to the blob container.; Create a URI Folder data asset pointing to the root container or folder.

    • A. Correct. Creating a Datastore that points to the blob container allows Azure ML to securely reference the storage location and manage credentials centrally without copying the data. It is the fundamental step to connect your workspace to external storage.
    • B. Incorrect. Creating individual URI File data assets for thousands of small files is not scalable, efficient, or manageable. It fails the requirement to treat the collection as a single dataset.
    • C. Correct. A URI Folder data asset points to a specific folder or root container. This allows Azure ML to treat the entire collection of files as a single evolving dataset, which supports versioning and can be easily referenced in training jobs.
    • D. Incorrect. Downloading files to a compute instance local drive is not a scalable ingestion strategy. It bypasses centralized data management, lacks versioning, and does not handle evolving datasets effectively.
    • E. Incorrect. Manually uploading files to the default storage account is unnecessary and inefficient since the data already resides in Azure Blob storage. Using a Datastore and URI Folder asset is the preferred architecture to reference existing data.

    1.3 Create and manage assets in an Azure Machine Learning workspace

    3.You manage a team of data scientists working in three different Azure Machine Learning workspaces located in the West US, East US, and North Europe regions. You need to ensure that all data scientists use the exact same Docker container image for training to ensure reproducibility. The image must be versioned and managed centrally. What should you create?

    1. A.A Compute Instance in the West US workspace
    2. B.An Azure Container Registry linked to the West US workspace
    3. C.An Azure Machine Learning Registry
    4. D.A Data Asset in the East US workspace
    Show answer & explanation

    Correct answer: CAn Azure Machine Learning Registry

    • A. Incorrect. A compute instance is a managed development workstation (VM) scoped to a single workspace. It is used for coding and interactive development, not for centralizing or versioning container images for use across multiple regions.
    • B. Incorrect. While an Azure Container Registry (ACR) stores Docker images, an ACR linked to a specific workspace is inherently local to that workspace's infrastructure. It lacks the built-in Azure ML-specific orchestration and versioning required to seamlessly share environments across multiple disparate workspaces and regions.
    • C. Correct. An Azure Machine Learning Registry is a high-level resource designed specifically for cross-workspace collaboration. It allows for the centralized management, versioning, and sharing of assets—such as environments (which encapsulate Docker images), models, and components—across multiple workspaces and geographic regions.
    • D. Incorrect. A Data Asset is used to manage and version datasets or data references within Azure Machine Learning. It does not provide the functionality required to manage Docker container images or training environments.

    1.3 Create and manage assets in an Azure Machine Learning workspace

    4.You are designing a strategy for managing machine learning assets across your enterprise. You plan to use an Azure Machine Learning Registry. Which three types of assets can be created and shared using the registry?(Select 3)

    1. A.Environments
    2. B.Compute Clusters
    3. C.Models
    4. D.Components
    5. E.Datastores
    6. F.Jobs
    Show answer & explanation

    Correct answers: A, C, DEnvironments; Models; Components

    • A. Correct. Azure Machine Learning Registry supports registering and sharing Environments (Conda/Docker definitions). This allows teams to share and reproduce consistent software and dependency stacks across different workspaces and deployments.
    • B. Incorrect. Compute Clusters are workspace-specific infrastructure resources used for executing tasks. They are not assets shared via the Azure Machine Learning Registry; they must be provisioned within the context of a specific workspace.
    • C. Correct. Models are a primary asset type in the registry. By registering models centrally, they can be discovered, versioned, and deployed by different teams across multiple workspaces within an organization.
    • D. Correct. Components are reusable pieces of code or workflow logic used in machine learning pipelines. Sharing them via the registry allows teams to compose complex pipelines using standardized, versioned building blocks.
    • E. Incorrect. Datastores are workspace-level references to storage accounts (like Azure Blob Storage or Data Lake). They are managed at the workspace level and are not registry assets.
    • F. Incorrect. Jobs represent specific executions or runs of experiments. These are historical records of activity tied to a specific workspace and are not considered reusable, versioned assets for registry sharing.

    1.2 Create and manage resources in an Azure Machine Learning workspace

    5.You have a training script that requires a specific dataset. The dataset is hosted in an Azure Data Lake Storage Gen2 account. You need to make this data available to the training job running on a Compute Cluster. What should you create first in the workspace?

    1. A.A Datastore pointing to the ADLS Gen2 account
    2. B.A Data Labeling project
    3. C.An Environment with the azure-storage-blob package
    4. D.A Private Endpoint
    Show answer & explanation

    Correct answer: AA Datastore pointing to the ADLS Gen2 account

    • A. Correct. A Datastore is the fundamental Azure Machine Learning resource used to register and store connection information for external storage services like ADLS Gen2. It provides a secure way for compute targets to access and reference data for training jobs without hardcoding credentials.
    • B. Incorrect. A Data Labeling project is used for coordinating manual data labeling tasks (such as for image or text classification) and does not provide connectivity to storage for a training job.
    • C. Incorrect. An Environment defines the software dependencies and runtime for the training job. While you might include storage libraries in an environment, the environment itself does not facilitate the connection or registration of the storage resource in the workspace.
    • D. Incorrect. A Private Endpoint is a networking feature used to secure traffic between your virtual network and Azure services. It is not the primary workspace resource used to register and expose data to training jobs.

    1.2 Create and manage resources in an Azure Machine Learning workspace

    6.You need to enable a feature that allows you to share machine learning assets, such as environments and models, across multiple workspaces in different Azure regions. What should you implement?

    1. A.Azure Machine Learning Registry
    2. B.Workspace Replication
    3. C.Geo-redundant Storage
    4. D.Azure Traffic Manager
    Show answer & explanation

    Correct answer: AAzure Machine Learning Registry

    • A. Correct. Azure Machine Learning Registry is a centralized repository designed to store and share ML assets—such as models, environments, and components—across multiple workspaces, subscriptions, and even different Azure regions. It enables team collaboration and promotes the reuse of assets with consistent lifecycle management.
    • B. Incorrect. 'Workspace Replication' is not a native feature of Azure Machine Learning. While workspaces are region-scoped, they do not have a built-in mechanism to replicate assets directly to other workspaces; instead, the Registry feature is the architectural solution for this need.
    • C. Incorrect. Geo-redundant Storage (GRS) provides data durability by replicating data to a secondary region for disaster recovery purposes. It does not provide the metadata management, versioning, or orchestration required to share and manage machine learning assets across different workspaces.
    • D. Incorrect. Azure Traffic Manager is a DNS-based load balancing service used for routing user traffic to service endpoints globally. It is a networking service and has no functionality related to the storage or sharing of machine learning assets.

    1.2 Create and manage resources in an Azure Machine Learning workspace

    7.You want to attach an existing Azure Databricks cluster to your Azure Machine Learning workspace to use it as a compute target for data preparation steps. What information is required to create the attached compute?

    1. A.Databricks Workspace URL and Access Token
    2. B.Databricks Workspace URL and SSH Key
    3. C.Subscription ID and Resource Group
    4. D.Databricks Cluster ID and Admin Password
    Show answer & explanation

    Correct answer: ADatabricks Workspace URL and Access Token

    • A. Correct. To attach an Azure Databricks workspace as a compute target, you must provide the Databricks workspace URL (which identifies the specific instance) and a Personal Access Token (PAT). The token is used for secure, token-based authentication between Azure Machine Learning and the Databricks API.
    • B. Incorrect. SSH keys are used for terminal-level access to virtual machines. They are not used for authenticating or attaching Databricks resources to an Azure Machine Learning workspace.
    • C. Incorrect. While Subscription ID and Resource Group identify the Azure resources' location, they are not sufficient for authentication. Azure ML specifically requires the Databricks Workspace URL and an access token to interact with the Databricks service.
    • D. Incorrect. Databricks uses personal access tokens (PAT) for API authentication and service integration rather than an admin password. While a cluster ID may be used to target specific compute within the workspace, the initial attachment requires the workspace-level credentials.

    Domain 2: Explore data, and run experiments

    2.2 Use notebooks for custom model training

    8.You have a large CSV file stored in an Azure Blob Storage container registered as a datastore named `blob_data`. You are working in a notebook and want to load this data into a Pandas DataFrame using the Azure ML SDK v2 integration with `fsspec`. Which code snippet achieves this?

    1. A.pd.read_csv('azureml://datastores/blob_data/paths/data.csv')
    2. B.pd.read_csv('https://blob_data.blob.core.windows.net/data.csv')
    3. C.pd.read_csv('abfss://blob_data/data.csv')
    4. D.pd.read_csv('azureml:blob_data:data.csv')
    Show answer & explanation

    Correct answer: Apd.read_csv('azureml://datastores/blob_data/paths/data.csv')

    • A. Correct. In Azure ML SDK v2, the `azureml://` URI format (`azureml://datastores/<datastore_name>/paths/<file_path>`) is the supported fsspec integration. This allows libraries like Pandas to interact with files in a registered datastore transparently using the workspace's managed identity or user credentials.
    • B. Incorrect. This is a standard HTTPS blob URL. While it can be used if the storage account is public or if a SAS token is provided, it does not leverage the Azure ML Datastore registration or the specific SDK v2 fsspec integration requested.
    • C. Incorrect. The `abfss://` protocol (Azure Blob File System Driver) is specifically used for Azure Data Lake Storage Gen2. It is not the correct scheme for accessing a general Azure ML registered datastore via the Azure ML fsspec implementation.
    • D. Incorrect. This uses an invalid URI syntax. The Azure ML fsspec integration requires the `azureml://` protocol followed by the `datastores` and `paths` keywords to correctly map the request to the registered asset.

    2.2 Use notebooks for custom model training

    9.You are training a model to predict customer churn. You plan to use the Azure ML Feature Store to retrieve features. You need to generate a training dataset that includes feature values corresponding to the time each customer interaction occurred, avoiding data leakage. What must you provide to the `get_offline_features` method?

    1. A.A feature retrieval specification containing an observation DataFrame with timestamps.
    2. B.A list of all feature names in the Feature Store.
    3. C.The latest version of the Feature Set.
    4. D.A SQL query selecting the most recent features.
    Show answer & explanation

    Correct answer: AA feature retrieval specification containing an observation DataFrame with timestamps.

    • A. Correct. To perform a point-in-time join and avoid data leakage, the `get_offline_features` method requires an observation DataFrame that contains entity keys and timestamps. This allows the feature store to retrieve the historical value of each feature as it existed at the specific time of the event, ensuring features from the future are not accidentally included in training.
    • B. Incorrect. While you must specify which features to retrieve, a list of feature names alone is insufficient because it lacks the temporal context (timestamps) required to perform point-in-time lookups and prevent data leakage.
    • C. Incorrect. Providing the latest version of a Feature Set identifies the source data but does not facilitate the temporal alignment between features and specific observations. Point-in-time retrieval requires timestamps from an observation dataset.
    • D. Incorrect. A SQL query for the 'most recent' features would typically retrieve current values regardless of when the interaction occurred, which is a primary cause of data leakage in predictive modeling.

    2.2 Use notebooks for custom model training

    10.Scenario: You are developing a model in a notebook on a Compute Instance. You want to use a dataset that is 10 GB in size. You load the entire dataset into a Pandas DataFrame, but the kernel crashes due to an Out of Memory error. Solution: You should switch the notebook's compute to a Serverless Spark Compute session to handle the data using a Spark DataFrame. Does this solution meet the goal?

    1. A.Yes
    2. B.No
    Show answer & explanation

    Correct answer: AYes

    • A. The statement is true because Serverless Spark Compute provides a distributed computing runtime where Spark DataFrames can process datasets much larger than the memory capacity of a single machine. By distributing the data across a cluster and utilizing Spark's lazy evaluation and memory management, you can avoid the Out of Memory errors encountered when attempting to load a 10 GB dataset into a Pandas DataFrame on a single compute instance.
    • B. The statement is false because while switching to Spark compute is the correct architectural decision, the success of the solution depends on using Spark DataFrames for distributed processing. If the data were still collected into a single Pandas DataFrame on the driver node (e.g., using .toPandas()), the memory bottleneck would remain, leading to a crash regardless of the underlying compute infrastructure.

    2.1 Use automated machine learning to explore optimal models

    11.You are preparing a dataset for an AutoML Natural Language Processing (NLP) job to extract medication names and dosages from unstructured clinical notes. You have labeled the data using Azure Machine Learning Data Labeling. Which file format and task type combination is required?

    1. A.CSV format with Text Classification
    2. B.JSONL format with Text Named Entity Recognition (NER)
    3. C.Parquet format with Text Classification
    4. D.JSONL format with Text Multi-label Classification
    Show answer & explanation

    Correct answer: BJSONL format with Text Named Entity Recognition (NER)

    • A. CSV is typically used for simple text classification where a single label is assigned to an entire document. It is not designed to store the complex span-level annotations (offsets) required for entity extraction, which is needed to identify specific medication names and dosages within a text.
    • B. Text Named Entity Recognition (NER) is the correct task type for identifying and extracting specific spans of text such as medication names and dosages. For AutoML NLP tasks, Azure Machine Learning requires the training data to be in JSONL (JSON Lines) format, where each line represents a document and its associated entity labels with their start and end offsets.
    • C. Parquet is a columnar storage format optimized for large-scale tabular data and analytics, but it is not a supported input format for Azure AutoML NLP NER tasks. Furthermore, Text Classification is unsuitable because it categorizes entire documents rather than extracting specific entity spans.
    • D. While JSONL is the correct file format for NLP tasks in Azure ML, Text Multi-label Classification is the wrong task type. Multi-label classification assigns multiple predefined categories to a whole document (e.g., tagging an article as both 'Sports' and 'Safety') rather than extracting specific information like medication dosages from within the text.

    2.1 Use automated machine learning to explore optimal models

    12.You are defining the search space for an AutoML image classification job. You want to control the choice of model architecture and learning rate. Which two methods can you use to configure this?(Select 2)

    1. A.Use the 'model_settings' configuration to specify 'learning_rate'
    2. B.Use the 'search_space' configuration to define a choice of 'model_name' (e.g., 'vitb16r224', 'seresnext')
    3. C.AutoML for Images does not support hyperparameter sweeping
    4. D.Write a custom training script with PyTorch
    5. E.Edit the 'automl_settings.json' file locally
    Show answer & explanation

    Correct answers: B, DUse the 'search_space' configuration to define a choice of 'model_name' (e.g., 'vitb16r224', 'seresnext'); Write a custom training script with PyTorch

    • A. The 'model_settings' (or 'image_model_settings') configuration is typically used to specify fixed, static hyperparameters for a job. When the objective is to define a 'search space' for optimization, this configuration is bypassed in favor of the search space definition.
    • B. The 'search_space' configuration is the primary method in AutoML for Images to define a range or choice of hyperparameters. It allows you to specify 'model_name' as a hyperparameter, enabling the job to sweep across different architectures like Vision Transformers (ViT) or ResNext, and similarly define ranges for the learning rate.
    • C. This statement is incorrect. AutoML for Images specifically supports hyperparameter sweeping and Neural Architecture Search (NAS) to find the optimal combination of model settings.
    • D. AutoML for Images allows for a custom training script approach. This provides the user with maximum flexibility to define specific architectures (via PyTorch/torchvision/timm) and custom learning rate schedules while still utilizing Azure ML's hyperparameter tuning and experiment tracking capabilities.
    • E. Azure Machine Learning AutoML jobs are configured via the SDK (Python), CLI, or the Azure ML Studio UI. Manually editing a local 'automl_settings.json' file is not a standard or supported method for defining job parameters in the cloud environment.

    2.3 Automate hyperparameter tuning

    13.You are setting up a sweep job using the Azure Machine Learning Python SDK v2. You need to define a continuous search space for the learning rate, ranging uniformly between 0.001 and 0.1. Which distribution function should you use?

    1. A.choice([0.001, 0.1])
    2. B.uniform(0.001, 0.1)
    3. C.qloguniform(0.001, 0.1)
    4. D.normal(0.001, 0.1)
    Show answer & explanation

    Correct answer: Buniform(0.001, 0.1)

    • A. Incorrect. The choice function is used to create a discrete/categorical search space. It would only select exactly 0.001 or 0.1 from the provided list, rather than sampling from the continuous interval between them.
    • B. Correct. The uniform(min_value, max_value) function defines a continuous search space where values are sampled uniformly between the specified minimum and maximum. This is the correct distribution for an unbounded continuous search on a linear scale between 0.001 and 0.1.
    • C. Incorrect. The qloguniform function represents a quantized log-uniform distribution. It samples values on a logarithmic scale and then applies quantization (rounding to a multiple of 'q'), which results in discrete stepped values rather than a continuous uniform linear range.
    • D. Incorrect. The normal function specifies a Gaussian distribution based on a mean and standard deviation. This is not appropriate when a bounded uniform distribution between two specific limits is required.

    2.3 Automate hyperparameter tuning

    14.You have a training script `train.py` that uses `mlflow` to log metrics. You want to run a sweep job. Which three steps are required in your `train.py` script to ensure the sweep job functions correctly?(Select 3)

    1. A.Parse command-line arguments for hyperparameters.
    2. B.Log the primary metric using `mlflow.log_metric()`.
    3. C.Define the search space dictionary inside the script.
    4. D.Use `mlflow.start_run()` context manager.
    5. E.Import the `SweepJob` class.
    Show answer & explanation

    Correct answers: A, B, DParse command-line arguments for hyperparameters.; Log the primary metric using `mlflow.log_metric()`.; Use `mlflow.start_run()` context manager.

    • A. In an Azure Machine Learning sweep job, the service launches multiple trials, passing different hyperparameter values to the script as command-line arguments. The training script must use a library like `argparse` to parse these values and apply them to the model training process.
    • B. A sweep job requires a primary metric to evaluate and compare the performance of different trials. By logging this metric using `mlflow.log_metric()` with a consistent name, the sweep service can monitor the results and perform optimizations like early termination or choosing the best trial.
    • C. The hyperparameter search space is defined in the job configuration or SDK submission code (e.g., in a YAML file or via `command.sweep()`), not inside the training script itself. The training script is intended to be a generic worker that accepts parameters.
    • D. Using the `mlflow.start_run()` context manager ensures that the metrics and parameters logged during the execution are correctly associated with the specific trial run. This enables the sweep orchestrator to track and compare results across multiple runs.
    • E. The `SweepJob` class is used in the orchestration or submission script to define the hyperparameter sweep job parameters (like the search space and sampling method). It is not imported or used within the training script itself.

    2.3 Automate hyperparameter tuning

    15.You have a limited budget for a hyperparameter tuning job. You decide to use the Truncation Selection Policy. This policy cancels a given percentage of runs at each evaluation interval based on their performance compared to other runs. Does this solution meet the goal?

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because the Truncation Selection Policy is an early-termination policy that cancels a specific percentage of the lowest-performing runs at periodic intervals. This reduces the total compute hours consumed by poorly performing trials, thereby helping to optimize the use of a limited budget.
    • B. The statement is false because the Truncation Selection Policy is specifically designed to improve resource efficiency by stopping underperforming runs early, which directly aligns with the objective of managing a limited budget during hyperparameter tuning.

    Domain 3: Train and deploy models

    3.3 Manage models

    16.You are evaluating a credit risk model using the Responsible AI dashboard. You want to determine if the model behaves differently for applicants of different age groups by visualizing the disparity in the False Positive Rate (FPR) across these groups. Which component of the dashboard should you use?

    1. A.Error Analysis
    2. B.Fairness assessment
    3. C.Causal analysis
    4. D.Counterfactual analysis
    Show answer & explanation

    Correct answer: BFairness assessment

    • A. Error Analysis helps identify segments of the data where the model makes more errors and identifies feature interactions related to mistakes. While it uncovers error patterns, it is not the primary component used to compute and visualize specific fairness-related disparity metrics like FPR across protected cohorts.
    • B. The Fairness assessment component is specifically designed to evaluate how a model's performance varies across different groups. It computes and visualizes fairness metrics such as False Positive Rate, Selection Rate, and False Negative Rate, allowing you to directly compare disparities between sensitive features like age groups.
    • C. Causal analysis focuses on understanding the causal relationships between variables and the effects of interventions on outcomes. It is used for decision-making and understanding 'what causes what' rather than measuring statistical disparities in model performance across groups.
    • D. Counterfactual analysis is a local interpretability tool used to explore how minimal changes to an individual input would change the model's prediction. It provides instance-level insights rather than aggregated cohort-level fairness metrics.

    3.3 Manage models

    17.You want to use the Azure ML Model Registry to track the lineage of your models. You use the `mlflow` API to log models to the workspace. Does the Azure ML Model Registry automatically track the experiment run and source code associated with the MLflow registered model?

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because Azure Machine Learning provides native integration with MLflow. When a model is logged or registered using the MLflow API within an Azure ML workspace, the platform automatically captures and maintains lineage metadata, linking the model to its parent experiment run, environment, and the source code or notebook used during execution.
    • B. The statement is false because the integration between Azure ML and MLflow is specifically designed to eliminate manual lineage tracking. It automatically records the relationship between the registered model, the experiment run ID, and the source code context, provided the MLflow tracking URI is set to the Azure ML workspace.

    3.4 Deploy a model

    18.You are designing a real-time inference solution for a fraud detection model. The solution must minimize administrative overhead for operating system patching and infrastructure scaling. You also need to ensure the endpoint allows you to perform safe rolling updates. Which compute target should you choose?

    1. A.Azure Kubernetes Service (AKS)
    2. B.Azure Machine Learning Managed Online Endpoint
    3. C.Azure Machine Learning Compute Cluster
    4. D.Azure Container Instances (ACI)
    Show answer & explanation

    Correct answer: BAzure Machine Learning Managed Online Endpoint

    • A. Azure Kubernetes Service (AKS) is a powerful option for real-time inference, but it carries higher administrative overhead. Users are responsible for managing the Kubernetes cluster, including node maintenance, certain OS patching aspects, and cluster scaling configurations.
    • B. Azure Machine Learning Managed Online Endpoints are specifically designed to minimize administrative overhead by offloading infrastructure management, OS patching, and scaling to Azure. They natively support safe rolling updates through traffic-splitting capabilities and blue/green deployment patterns, making them the ideal choice for production-level real-time inference.
    • C. Azure Machine Learning Compute Clusters are primarily used for model training and high-throughput batch scoring. They are not intended for hosting persistent, low-latency real-time inference endpoints.
    • D. Azure Container Instances (ACI) is a serverless container solution suitable for dev/test scenarios. However, it lacks the production-grade features required here, such as built-in managed autoscaling, traffic-splitting, and native safe rolling update capabilities.

    3.4 Deploy a model

    19.You have deployed a model to a Managed Online Endpoint. You observe that during peak business hours, the endpoint returns HTTP 503 errors due to high traffic volume. You need to configure the deployment to automatically handle increased load without manual intervention. What should you configure?

    1. A.Increase the request_timeout_ms in the deployment configuration.
    2. B.Configure auto-scaling settings with a minimum and maximum instance count based on CPU or memory utilization.
    3. C.Change the instance_type to a SKU with more cores.
    4. D.Deploy a second endpoint and use Azure Traffic Manager.
    Show answer & explanation

    Correct answer: BConfigure auto-scaling settings with a minimum and maximum instance count based on CPU or memory utilization.

    • A. Incorrect. Increasing the request_timeout_ms only extends the duration the service waits for a response before timing out. It does not add compute capacity or increase concurrency, so it will not prevent HTTP 503 (Service Unavailable) errors caused by server-side resource saturation.
    • B. Correct. Configuring auto-scaling settings allows the Managed Online Endpoint to automatically scale out by adding instances during high traffic periods and scale in during low traffic periods. This ensures the deployment can dynamically handle increased load based on metrics like CPU or memory without manual intervention.
    • C. Incorrect. Changing the instance_type to a SKU with more cores (vertical scaling) requires manual intervention and does not provide the elasticity needed to automatically respond to fluctuating traffic spikes during peak business hours.
    • D. Incorrect. Azure Traffic Manager is a DNS-based load distribution service. While it can distribute traffic between endpoints, it is not a native auto-scaling solution for a single managed endpoint and would still require manual configuration and monitoring of multiple deployments.

    3.2 Implement training pipelines

    20.You are building a pipeline using the Azure Machine Learning SDK v2. You have defined a pipeline function `@pipeline(default_compute='cpu-cluster')` and instantiated it. You want to disable the reuse of cached results for a specific step in the pipeline to force it to run every time. What should you configure on the pipeline step?

    1. A.step.settings.force_rerun = True
    2. B.step.settings.allow_reuse = False
    3. C.step.settings.cache_results = False
    4. D.step.settings.continue_on_step_failure = True
    Show answer & explanation

    Correct answer: Bstep.settings.allow_reuse = False

    • A. Incorrect. In the Azure Machine Learning SDK v2, there is no 'force_rerun' property within the pipeline step settings. Controlling whether a step executes depends on the reuse/caching configuration.
    • B. Correct. In Azure ML SDK v2, the `allow_reuse` property within the step's settings determines whether the system can use results from a previous run if the inputs and code haven't changed. Setting `allow_reuse = False` forces the step to execute every time the pipeline is run, regardless of previous cached results.
    • C. Incorrect. While 'cache_results' might sound plausible, the specific parameter name used in the SDK v2 settings for pipeline components to control this behavior is 'allow_reuse'.
    • D. Incorrect. The `continue_on_step_failure` property is used to determine if the pipeline should continue executing downstream steps if the current step fails; it does not control result caching or rerunning.

    3.2 Implement training pipelines

    21.You manage multiple Azure Machine Learning workspaces across different environments (dev, test, prod). You want to create a custom training component that can be easily discovered and used by data scientists in all of these workspaces without manually copying the component definition. What should you use?

    1. A.Azure Container Registry
    2. B.Azure Machine Learning Registry
    3. C.Workspace Blob Storage
    4. D.Azure DevOps Artifacts
    Show answer & explanation

    Correct answer: BAzure Machine Learning Registry

    • A. Azure Container Registry (ACR) is used for storing and managing container images. While it can host the images used by ML environments, it does not provide the metadata, versioning, or discovery features required to manage Azure Machine Learning component definitions across workspaces.
    • B. Azure Machine Learning Registry is specifically designed to enable the sharing and discovery of ML assets (components, models, and environments) across multiple workspaces within an organization. It allows assets to be managed centrally, facilitating reuse and consistent deployment across dev, test, and prod environments.
    • C. Workspace Blob Storage is the default storage account scoped to a single Azure Machine Learning workspace. It is used for storing data and artifacts within that workspace and does not support cross-workspace discovery or sharing of ML components.
    • D. Azure DevOps Artifacts is a service for managing and sharing packages (such as NuGet, npm, or Python packages). It is not integrated into Azure Machine Learning Studio for the discovery or execution of custom training components.

    3.2 Implement training pipelines

    22.You are creating a pipeline that processes data. You want to pass arguments to the script in the format `--input_data ${{inputs.data}}`. You are using the `command` component. Which library should you use inside your Python script to parse these command-line arguments?

    1. A.mlflow
    2. B.azureml-core
    3. C.argparse
    4. D.pandas
    Show answer & explanation

    Correct answer: Cargparse

    • A. Incorrect. MLflow is primarily used for managing the machine learning lifecycle, including experiment tracking, model registry, and deployment. It is not designed to parse command-line arguments passed to a script.
    • B. Incorrect. azureml-core is the main library for interacting with Azure Machine Learning services (specifically in the v1 SDK). While it is used to manage workspaces and runs, it does not provide functionality for parsing command-line arguments inside a training script.
    • C. Correct. argparse is the standard Python library specifically designed for parsing command-line arguments. It is the appropriate choice for handling arguments passed to a script in the format `--input_data ${{inputs.data}}` when using a command component in Azure Machine Learning.
    • D. Incorrect. pandas is a powerful data manipulation and analysis library used for handling DataFrames and series. It does not have built-in functionality to parse command-line arguments.

    3.1 Run model training scripts

    23.You are defining a command job using the Python SDK v2. You want to pass a hyperparameter named `learning_rate` to your script `train.py`. The script uses `argparse` to read arguments. How should you define the command string?

    1. A.command='python train.py --learning_rate ${learning_rate}'
    2. B.command='python train.py --learning_rate ${{inputs.learning_rate}}'
    3. C.command='python train.py --learning_rate inputs[learning_rate]'
    4. D.command='python train.py --learning_rate $env:learning_rate'
    Show answer & explanation

    Correct answer: Bcommand='python train.py --learning_rate ${{inputs.learning_rate}}'

    • A. Incorrect. This option uses a single curly brace and a dollar sign (${learning_rate}), which resembles shell variable syntax. Azure ML v2 interpolation requires double curly braces to signal the runtime to substitute the placeholder with the input value.
    • B. Correct. Azure ML SDK v2 uses the expression interpolation syntax ${{inputs.<name>}} within command strings to reference defined job inputs. This ensures the value of the 'learning_rate' input is correctly injected into the command executed in the compute environment.
    • C. Incorrect. The syntax 'inputs[learning_rate]' is not a recognized substitution pattern in the command string. While it resembles Python dictionary indexing, the job runtime will not evaluate it, and it will be passed as a literal string to the script.
    • D. Incorrect. This uses PowerShell environment-variable syntax ($env:name). Unless you have explicitly configured an environment variable with that exact name in the job settings, this will not correctly retrieve the job input value. The standard and recommended method for command jobs is using the inputs context.

    3.1 Run model training scripts

    24.You are configuring a custom environment for a job. You have a `conda.yaml` file listing dependencies and want to use a standard base image from Microsoft. Which properties must you set in the Environment definition?(Select 2)

    1. A.image
    2. B.dockerfile
    3. C.conda_file
    4. D.build_context
    Show answer & explanation

    Correct answers: A, Cimage; conda_file

    • A. Correct. The 'image' property is used to specify the Docker image to be used as a base. Since the goal is to use a standard base image from Microsoft, this property must be defined with the appropriate image URI (e.g., mcr.microsoft.com/azureml/...).
    • B. Incorrect. The 'dockerfile' property is used when you intend to build a custom Docker image from a set of instructions. When using a pre-existing base image from Microsoft, you define the image directly rather than providing a Dockerfile.
    • C. Correct. The 'conda_file' property is required to specify the path to the conda.yaml file. This allows Azure Machine Learning to install the necessary Python dependencies and packages into the environment on top of the base image.
    • D. Incorrect. The 'build_context' property is only necessary when building a custom Docker image from a Dockerfile and local files. It is not used when pulling a standard base image and applying a conda configuration.

    3.1 Run model training scripts

    25.You have a training script that requires a specific version of the `pandas` library. You create a `conda.yml` file specifying the version and reference it in the `command` job's environment configuration. Does this ensure the script runs with the correct library version?

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because when a Command job references a conda.yml file for its environment, Azure Machine Learning builds or resolves a container image containing those specific dependencies. This ensures the script executes within an environment where the pinned version of pandas is installed.
    • B. The statement is false because Azure Machine Learning environment management is explicitly designed to handle dependency resolution through the conda.yml provided in the job configuration, which prevents version conflicts and ensures environment reproducibility.

    Domain 4: Optimize language models for AI applications

    4.1 Prepare for model optimization

    26.A startup wants to use the Phi-3 model from the Model Catalog. They have strict budget constraints and cannot afford to keep a dedicated endpoint running 24/7. However, they need the model to process large CSV files once a day. Which deployment option should they use?

    1. A.Real-time managed online endpoint
    2. B.Batch endpoint
    3. C.Kubernetes online endpoint
    4. D.Azure Functions with ONNX runtime
    5. E.Development container on local machine
    Show answer & explanation

    Correct answer: BBatch endpoint

    • A. A real-time managed online endpoint is designed for low-latency, synchronous inference and requires compute resources to be running continuously (24/7). This would result in significant unnecessary costs for a job that only runs once a day.
    • B. Batch endpoints are the ideal solution for large-scale, asynchronous data processing. They allow the compute cluster to scale to zero when not in use, ensuring the startup only pays for the compute time required to process the CSV files once a day.
    • C. Kubernetes online endpoints provide container orchestration but typically involve managing cluster infrastructure with baseline costs for availability. This is more complex and less cost-effective than managed batch endpoints for periodic, non-real-time workloads.
    • D. Azure Functions with ONNX runtime are intended for lightweight, event-driven microservices. Large models like Phi-3 often exceed the memory limits and execution timeouts of serverless functions, and they are not optimized for processing large batch files in a single pass.
    • E. A development container on a local machine is unsuitable for production environments as it lacks scalability, high availability, and the managed monitoring features of Azure Machine Learning.

    4.1 Prepare for model optimization

    27.You manage a retail website and want to implement a chatbot. You need the bot to recommend products based on current stock levels stored in an SQL database. Proposed Solution: You choose to fine-tune a Llama 2 model on a snapshot of the database from last month. Does this meet the goal?

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: BFalse

    • A. The statement is false because fine-tuning on a month-old snapshot creates a static model that cannot account for real-time inventory changes. The chatbot would likely recommend products that are no longer in stock, failing to meet the requirement for current stock level accuracy.
    • B. The statement is true because fine-tuning is an inappropriate technique for accessing dynamic, frequently changing data like stock levels. For real-time data integration, a Retrieval-Augmented Generation (RAG) architecture or function calling to query the live SQL database at runtime should be used instead.

    4.4 Optimize through fine-tuning

    28.You are setting up a fine-tuning job and want to stabilize the training process. You decide to update the model weights less frequently, effectively simulating a larger batch size without increasing memory usage. Which parameter should you adjust?

    1. A.Gradient accumulation steps
    2. B.Learning rate
    3. C.Epochs
    4. D.Validation split
    Show answer & explanation

    Correct answer: AGradient accumulation steps

    • A. Gradient accumulation steps allow the model to accumulate gradients over multiple mini-batches before performing a single weight update. This technique effectively simulates a larger batch size without the increased GPU memory requirement, leading to a more stable training process and less frequent updates.
    • B. The learning rate determines the magnitude of updates to the model weights. Although it is a critical hyperparameter for training stability and convergence speed, it does not simulate a larger batch size or reduce the frequency of updates relative to the number of mini-batches processed.
    • C. Epochs represent the total number of full passes through the training dataset. Adjusting the number of epochs affects total training duration and potential for overfitting, but it does not impact the effective batch size or the frequency of weights updates within an epoch.
    • D. Validation split is the portion of the dataset reserved for performance evaluation during training. It helps monitor generalization and informs early stopping decisions, but it has no role in simulating batch sizes or modifying the weight update frequency.

    4.4 Optimize through fine-tuning

    29.You are validating the results of a fine-tuning job using the MLflow tracking UI in Azure Machine Learning. Which key metrics are typically plotted to assess the training progress?(Select 2)

    1. A.Training Loss
    2. B.Inference Latency
    3. C.Validation Loss
    4. D.Disk I/O Speed
    Show answer & explanation

    Correct answers: A, CTraining Loss; Validation Loss

    • A. Training loss is a primary metric plotted during fine-tuning because it shows how well the model is fitting the training data over time. Monitoring training loss helps identify issues like underfitting, exploding/vanishing gradients, or whether the learning rate needs adjustment.
    • B. Inference latency is a deployment/runtime performance metric that measures response time during prediction, not the progress of model training. While important for production environments, it is not used to assess model convergence during the fine-tuning phase.
    • C. Validation loss is commonly plotted alongside training loss to assess generalization and detect overfitting. Comparing validation and training loss trends helps practitioners decide when to stop training or apply regularization techniques.
    • D. Disk I/O speed is an infrastructure metric related to data throughput and hardware performance. It does not provide insights into the model's learning process or the quality of the weights being optimized.

    4.2 Optimize through prompt engineering and prompt flow

    30.You have a large dataset of questions and ground truth answers. You want to run your Prompt Flow against this dataset to calculate aggregate performance metrics. Which operation should you perform?

    1. A.An interactive test in the playground
    2. B.A Batch Run
    3. C.A Deployment to a Managed Online Endpoint
    4. D.A Data Drift Monitor
    Show answer & explanation

    Correct answer: BA Batch Run

    • A. An interactive test in the playground is intended for manual, exploratory testing and debugging of individual prompts or small sets of data. It does not provide the capability to process large datasets or automatically compute aggregate performance metrics across many records.
    • B. A Batch Run (also known as a Bulk Run) is specifically designed to execute a Prompt Flow against a large dataset. This operation allows you to generate outputs for every record in the dataset, which can then be used in an evaluation flow to calculate aggregate performance metrics such as accuracy, F1 score, or groundedness.
    • C. Deployment to a Managed Online Endpoint is used for serving models for real-time inference and low-latency production requests. While you could technically send batch requests to an endpoint, it is not the specialized Azure Machine Learning tool for offline batch evaluation and metric aggregation.
    • D. A Data Drift Monitor is used to observe changes in the distribution of input data over time for deployed models to detect potential performance degradation. It is not a tool for running a specific Prompt Flow against a labeled dataset to compute evaluation metrics.

    4.2 Optimize through prompt engineering and prompt flow

    31.You are using the 'Prompt' tool. You want to include few-shot examples to improve the model's performance on a specific classification task. Where should these examples be defined?

    1. A.In the 'requirements.txt' file.
    2. B.Within the Jinja2 template in the Prompt tool.
    3. C.In the connection string settings.
    4. D.In the Python tool output.
    Show answer & explanation

    Correct answer: BWithin the Jinja2 template in the Prompt tool.

    • A. The 'requirements.txt' file is used to specify Python package dependencies for the project's environment. It is not used for defining prompt content or few-shot examples.
    • B. Correct. In Azure Machine Learning prompt flow, the Prompt tool utilizes Jinja2 templates. To implement few-shot learning, you include the examples directly within the Jinja2 template so they become part of the prompt payload sent to the language model, ensuring the model has the necessary context for the classification task.
    • C. Connection string settings are used to define authentication parameters and endpoints for external services or databases. They do not influence the prompt content or structure.
    • D. The Python tool output contains the results of script execution. While you can pass data from a Python tool into a Prompt tool as an input variable, the actual definition of the few-shot structure and context belongs within the template of the Prompt tool itself.

    4.2 Optimize through prompt engineering and prompt flow

    32.You have a Prompt Flow that summarizes text. You want to evaluate if the summary is coherent. Solution: You create a batch run using an evaluation flow that utilizes the 'Coherence' built-in metric to score the output. Does this meet the goal?

    1. A.True
    2. B.False
    Show answer & explanation

    Correct answer: ATrue

    • A. The statement is true because Azure AI Prompt Flow provides built-in, AI-assisted evaluation metrics, including 'Coherence', which specifically measures the quality of the logical flow and organization of generated text. Using an evaluation flow in a batch run is the standard method to automate the quantitative assessment of summaries at scale.
    • B. The statement is false because the 'Coherence' metric is a valid and supported built-in feature of Prompt Flow designed for scoring large language model outputs; therefore, the described solution correctly implements the necessary evaluation pipeline to achieve the stated goal.

    4.3 Optimize through Retrieval Augmented Generation (RAG)

    33.You are developing a prompt flow for a RAG application. You need to retrieve documents from an Azure AI Search index based on the user's query embedding. Which tool should you use in the flow?

    1. A.Vector Index Lookup
    2. B.Python Script
    3. C.Content Safety
    4. D.LLM Tool
    Show answer & explanation

    Correct answer: AVector Index Lookup

    • A. Correct. The Vector Index Lookup tool in Prompt Flow is specifically designed to perform similarity searches against a vector index (such as an Azure AI Search vector store) using the user's query embedding. It returns the most relevant documents and is the standard, purpose-built component for embedding-based retrieval in a RAG pipeline.
    • B. Incorrect. While a Python tool can be used to write custom code to interact with Azure AI Search, it is not the specialized tool for this task. Using Python would require manual configuration and boilerplate code, whereas the Vector Index Lookup provides a managed, native integration.
    • C. Incorrect. Content Safety is a moderation tool used to detect and filter harmful content (such as hate speech or violence). It does not have the capability to perform vector similarity searches or document retrieval.
    • D. Incorrect. The LLM Tool is used to interact with large language models for text generation, summarization, or reasoning. It does not perform the retrieval step itself; retrieval must be handled by the Vector Index Lookup tool before the LLM processes the context.

    4.3 Optimize through Retrieval Augmented Generation (RAG)

    34.You need to improve the retrieval quality of a RAG system that uses Azure AI Search. Which of the following actions can help improve the relevance of the retrieved chunks?(Select 3)

    1. A.Optimizing the chunk size to capture complete thoughts
    2. B.Enabling Hybrid Search to combine keyword and vector scores
    3. C.Increasing the temperature of the LLM generation
    4. D.Using a Semantic Ranker to re-score top results
    5. E.Reducing the number of dimensions in the embedding model to 10
    6. F.Disabling the vector profile
    Show answer & explanation

    Correct answers: A, B, DOptimizing the chunk size to capture complete thoughts; Enabling Hybrid Search to combine keyword and vector scores; Using a Semantic Ranker to re-score top results

    • A. Optimizing the chunk size ensures that each fragment contains enough coherent context for accurate embedding and retrieval. Chunks that are too small lose context, while those that are too large include irrelevant noise, both of which degrade retrieval relevance.
    • B. Hybrid Search in Azure AI Search combines lexical (BM25) keyword matching with vector similarity. This approach leverages the strengths of both methods—exact term matching and semantic similarity—to provide more accurate and robust results.
    • C. Increasing the temperature affects the randomness and creativity of the LLM during the generation phase. It has no impact on the retrieval or ranking of document chunks within the search engine.
    • D. The Semantic Ranker is a secondary re-ranking layer in Azure AI Search that uses a sophisticated language model to re-score the top candidates from initial retrieval, significantly improving the semantic relevance of the results returned to the LLM.
    • E. Reducing the number of dimensions to such a low value (10) would lead to a massive loss of representational capacity and semantic nuance, destroying the accuracy of the vector embeddings.
    • F. Disabling the vector profile would prevent the system from performing vector searches entirely, removing the ability to match results based on semantic similarity, which is a core component of modern RAG systems.

    4.3 Optimize through Retrieval Augmented Generation (RAG)

    35.You are designing the security architecture for a RAG solution involving Azure Machine Learning and Azure AI Search. The data is highly sensitive. Which security features should you configure?(Select 2)

    1. A.Private Endpoints for both Azure ML and Azure AI Search
    2. B.Public internet access with IP whitelisting only
    3. C.Managed Identity for authenticating the connection between services
    4. D.Shared Access Signatures (SAS) stored in plain text code
    5. E.Anonymous access for the search index
    Show answer & explanation

    Correct answers: A, CPrivate Endpoints for both Azure ML and Azure AI Search; Managed Identity for authenticating the connection between services

    • A. Correct. Private Endpoints ensure that traffic between your virtual network and the services does not traverse the public internet. This keeps service traffic within your virtual network, significantly reducing the attack surface for highly sensitive data and meeting strict compliance requirements for network isolation.
    • B. Incorrect. Public internet access with IP whitelisting still exposes the service endpoints to the public internet and is susceptible to IP spoofing, proxying, or accidental misconfiguration. For highly sensitive data, private endpoints are the preferred architectural choice over IP allowlists.
    • C. Correct. Managed Identity provides a secure, credential-free way to authenticate the connection between Azure services (such as Azure ML and Azure AI Search) using Microsoft Entra ID and RBAC. This eliminates the risk of leaking secrets associated with hard-coded credentials or poorly managed keys.
    • D. Incorrect. Storing Shared Access Signatures (SAS) in plain text code is a significant security risk as embedded secrets can be exposed in source control. While SAS tokens can be scoped and time-limited, they are less secure than managed identities; if used, they should be stored securely in Azure Key Vault.
    • E. Incorrect. Anonymous access completely bypasses authentication and authorization, allowing any user to access the data. This is fundamentally incompatible with the security requirements for highly sensitive information.

    Want the full experience?

    These are just samples. Practice the full Microsoft Certified: Azure Data Scientist Associate (DP-100) question bank in quiz mode — free, no signup, with domain practice and exam simulation.