# Free AI-300 practice questions

> 10 free AI-300 practice questions with the correct answer and an explanation.

Page: https://devopscodelab.com/exams/microsoft-ai-300/free-practice-questions/
Practice exams: https://devopscodelab.com/exams/microsoft-ai-300/

### Question 1 of 10

A regulated company requires that its Azure Machine Learning workspace can reach only approved destinations, such as specific PyPI mirrors and storage accounts, while all managed compute stays in a Microsoft-managed network. Which configuration meets the requirement with the LEAST operational overhead?

- A. Deploy compute into a customer-managed virtual network and route all egress through a self-managed Azure Firewall with application rules
- B. Disable public network access on the workspace and allow outbound traffic only to the AzureMachineLearning service tag
- C. Enable the workspace managed virtual network in Allow Internet Outbound mode and block unapproved sites with network security groups
- D. Enable the workspace managed virtual network in Allow Only Approved Outbound mode and add FQDN and private endpoint outbound rules

**Answer:** D

**Explanation:** Allow Only Approved Outbound mode keeps compute inside the managed VNet and blocks egress except for the outbound rules you define, and Microsoft manages the underlying network and firewall. Allow Internet Outbound mode permits all egress, and you cannot attach your own NSGs to the managed network. A customer-managed VNet with your own firewall works but carries the most operational overhead. Disabling public network access controls inbound access to the workspace, not outbound access from compute.

### Question 2 of 10

Your team stores training data in Azure Data Lake Storage Gen2. Security requires that no storage account keys or SAS tokens are saved in the Azure Machine Learning workspace, and each data scientist's own permissions on the data lake must govern access during interactive work. How should you configure the datastore?

- A. Create the datastore with a user delegation SAS token that is regenerated weekly by an automation runbook
- B. Create the datastore without credentials so that identity-based access uses the caller's Microsoft Entra identity
- C. Create the datastore with a service principal secret and grant that principal Storage Blob Data Reader on the account
- D. Create the datastore with an account key and restrict network access to the workspace's managed virtual network

**Answer:** B

**Explanation:** A credential-less datastore uses identity-based data access, so the signed-in user's (or the compute's managed identity's) RBAC on the storage account determines access and no secret is stored. A service principal secret is a stored credential and gives everyone the same principal's permissions. An account key is a stored secret regardless of network restrictions. A SAS token is also a stored credential and does not reflect each user's permissions.

### Question 3 of 10

A retailer runs a managed online endpoint with deployment blue serving 100% of traffic. A new deployment named green must be validated against real production requests without returning green's responses to callers, and then gradually receive live traffic. What should you do FIRST after creating green?

- A. Create a second endpoint for green and duplicate requests in the client app
- B. Mirror a small percentage of traffic to green while blue keeps all live traffic
- C. Set live traffic to 10% on green and 90% on blue, then compare both deployments' metrics
- D. Invoke the endpoint with the azureml-model-deployment header set to green

**Answer:** B

**Explanation:** Mirrored (shadow) traffic copies a percentage of live requests to green while callers still receive blue's responses, which validates green safely before shifting live traffic. Allocating 10% live traffic returns green's responses to real users before validation. Invoking green directly with the deployment header tests only the requests you send, not production traffic. A separate endpoint with client-side duplication adds application changes and overhead that mirroring avoids.

### Question 4 of 10

A data scientist trains a scikit-learn model in a command job on Azure Machine Learning and wants parameters, metrics, and the model artifact logged with minimal code changes. The workspace is already the MLflow tracking server for the job. What should the training script call?

- A. mlflow.autolog() before the model is fitted
- B. mlflow.start_run() inside a loop for every training epoch
- C. mlflow.set_tracking_uri() with the workspace's storage account URL
- D. mlflow.register_model() before the estimator is created

**Answer:** A

**Explanation:** mlflow.autolog enables automatic logging of parameters, metrics, and the model for supported frameworks such as scikit-learn. Jobs running in Azure Machine Learning are already configured with the workspace tracking URI, and the storage account URL is not a tracking URI. Starting a run per epoch fragments the experiment into many runs. Registering a model requires an existing logged model, so calling it before training fails.

### Question 5 of 10

You run an Azure Machine Learning sweep job with Bayesian sampling over learning rate and batch size. You add a bandit early termination policy to stop poorly performing trials, but job submission fails. What is the cause?

- A. Bayesian sampling does not support early termination policies
- B. Bandit policies need the primary metric to be logged with the goal of minimize
- C. Early termination requires max_concurrent_trials to equal max_total_trials
- D. Bandit policies require a grid sampling algorithm with discrete choices

**Answer:** A

**Explanation:** Bayesian sampling chooses new samples based on previous trial results and does not support early termination, so the policy must be removed or the sampling changed to random or grid. Bandit policies work with random and grid sampling, not only grid. Concurrency settings are unrelated to termination policies. A bandit policy works with either a maximize or minimize goal.

### Question 6 of 10

A company deploys GPT-4.1 in Microsoft Foundry for an internal chatbot. Traffic is moderate and unpredictable, and the data can be processed in any Azure region worldwide. Which deployment type is the MOST cost-effective choice that offers the highest default quota?

- A. Data Zone Provisioned
- B. Regional Provisioned
- C. Global Standard
- D. Global Batch

**Answer:** C

**Explanation:** Global Standard is pay-per-token, routes requests across Azure's global capacity, and typically has the highest default quota, which suits variable traffic with no data residency constraint. Provisioned deployments reserve throughput and are billed for capacity whether used or not, which is wasteful for unpredictable moderate load. Global Batch is for asynchronous jobs with a 24-hour target turnaround, not an interactive chatbot.

### Question 7 of 10

An agent in a Foundry project uses Azure AI Search as its knowledge source. The project calls Search by using its managed identity, and key access to the Search service is disabled. Queries fail with 403 errors. Which role assignment fixes the issue while following least privilege?

- A. Search Service Contributor for the project's managed identity on the search service
- B. Search Index Data Reader for the project's managed identity on the search service
- C. Search Index Data Contributor for each developer's user account on the search service
- D. Cognitive Services User for the search service's managed identity on the Foundry resource

**Answer:** B

**Explanation:** Querying an index with Entra authentication needs a data-plane role, and Search Index Data Reader grants read-only query access to the calling identity. Search Service Contributor manages the service and index definitions but does not grant data-plane query access. Developer user accounts are not the identity making the calls. A role for the search service's identity on Foundry is the reverse direction of the failing call.

### Question 8 of 10

A customer-support application processes about 900 million tokens per day with steady traffic and strict latency expectations during business hours. Throttling on the current pay-as-you-go deployment causes intermittent 429 errors. What should you recommend?

- A. Create several Standard deployments in one region and round-robin calls between them
- B. Keep the Standard deployment and add exponential retry with a longer client timeout
- C. Enable a private endpoint and allow only the developers' subnet to reach the resource
- D. Disable local authentication and grant developers an inference role

**Answer:** D

**Explanation:** Provisioned throughput units give reserved, predictable capacity and latency for high, steady volume, and reservations reduce the cost of that capacity. Retries hide but do not remove throttling and add latency. Batch deployments are asynchronous and unsuitable for interactive support. Standard deployments in the same region share the same regional quota, so splitting them does not add capacity.

### Question 9 of 10

Finance asks for a daily chart of prompt and completion tokens consumed by each Azure OpenAI deployment in a Foundry resource. Which data source provides this with the LEAST effort?

- A. The Processed Prompt Tokens and Generated Completion Tokens metrics split by deployment
- B. Application Insights traces exported to a storage account and parsed by a nightly Azure Function
- C. Custom logging in the application that writes the usage field of every response to a SQL table
- D. The Cost Management export filtered by meter each day

**Answer:** A

**Explanation:** Azure Monitor platform metrics for the resource already include prompt and completion token counts that can be split by model deployment name and charted without extra work. Parsing exported traces requires custom code. Cost Management shows charges, not token counts per deployment, and arrives with a delay. Custom logging works but adds development effort.

### Question 10 of 10

A RAG solution uses text-embedding-3-large with 3,072 dimensions in Azure AI Search. Index storage costs are too high, and the team accepts a small loss of recall that it can partly recover at query time. Which combination is MOST appropriate?

- A. Reduce dimensions with the model's dimensions parameter and use scalar quantization with rescoring
- B. Switch to text-embedding-ada-002 and rebuild the index with an exhaustive KNN algorithm configuration
- C. Store vectors as retrievable and stored fields so that they are returned with every search result
- D. Keep full dimensions and move the search service to a higher tier with more partitions for storage

**Answer:** A

**Explanation:** text-embedding-3 models support truncating output dimensions, and scalar quantization compresses vectors, while rescoring with oversampling recovers some of the lost precision. ada-002 is an older model with fixed dimensions, and exhaustive KNN increases query cost rather than reducing storage. A higher tier adds capacity but increases cost. Making vectors retrievable stores an additional copy and increases storage.

Ready for a timed run? Take the free 15-question AI-300 mini exam: https://devopscodelab.com/app/exams/microsoft-ai-300/mini/

DevOpsCode Lab is not affiliated with Microsoft. AI-300 and related names are trademarks of their owners. We write every question ourselves; these are not real exam questions.
