live chatMcAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Pass4Test 10%OFF Discount Code

Microsoft Operationalizing Machine Learning and Generative AI Solutions - AI-300 Exam Questions

QUESTION NO: 1
Hotspot Question
You create an Azure Machine Learning workspace.
You are developing a Python SDK v2 notebook to perform custom model training in the workspace. The notebook code imports all required packages.
You need to complete the Python SDK v2 code to include a training script, environment, and compute information.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: MLClient
Box 2: command
Example, Submit a script run, SDK v2
#connect to the workspace
ml_client = MLClient.from_config(DefaultAzureCredential())
# set up pytorch environment
env = Environment(
image="mcr.microsoft.com/azureml/openmpi3.1.2-ubuntu18.04",
conda_file="pytorch-env.yml",
name="pytorch-env"
)
# define the command
command_job = command(
code="./src",
command="train.py",
environment=env,
compute="cpu-cluster",
)
returned_job = ml_client.jobs.create_or_update(command_job)
returned_job
Note: create_or_update
Creates or updates an Azure ML resource.
create_or_update(entity: T, **kwargs) -> T
Parameters
entity
Union[Job , Model, Environment, Component , Datastore]
Required
The resource to create or update.
Returns
The created or updated resource.
Reference:
https://learn.microsoft.com/en-us/azure/machine-learning/migrate-to-v2-command-job
https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.mlclien
QUESTION NO: 2
Drag and Drop Question
A data science team trains a model that depends on features that are stored in a managed feature store.
The model is registered in Azure Machine Learning and will be deployed to a real-time endpoint.
After deployment, the model must:
- Retrieve feature values dynamically at inference time.
- Use the same feature definitions that were used during training.
- Run without manual configuration changes across environments.
You need to define feature store entities so that feature retrieval behaves as expected when the model is deployed.
Which feature store entity should you select for each requirement? To answer, move the appropriate feature store entities to the correct requirements. You may use each feature store entity once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Correct Answer:
QUESTION NO: 3
A financial services company is deploying Microsoft Foundry to host generative AI workloads that process regulated customer data. 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.
Choose two.
NOTE: Each correct selection is worth one point.
Correct Answer: A,E
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 4
Hotspot Question
A machine learning model is deployed to production in Azure Machine Learning and is actively serving predictions for a business application. The model was trained by using a historical dataset that represented expected input patterns at the time of deployment.
The team working on the model must ensure the following:
- Changes in input data distribution are detected.
- Appropriate actions are triggered when predefined thresholds are
exceeded.
You need to configure monitoring to meet the requirements.
Which configuration should you use for each requirement? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:
QUESTION NO: 5
Drag and Drop Question
You develop a flow for a Microsoft Foundry project.
You plan to use outputs generated by running the flow to determine the following information:
- the number of tokens used by each large language model (LLM) node of
the flow
- the accuracy of the model used by the flow
You need to examine the output that provides the required information.
Which output type should you examine? To answer, move the appropriate output types to the correct evaluations. You may use each output type once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: Traces
The appropriate output flow type to determine the number of tokens used by each Large Language Model (LLM) node is Traces.
While Metrics provide a macro-level, aggregated overview of total token usage across an entire application or resource, Traces capture detailed, node-by-node execution details.
When a prompt flow runs in Microsoft Foundry, Traces track:
The precise execution path of individual items
Inputs and outputs for each specific LLM node
Detailed telemetry records-such as input_tokens, output_tokens, and total_tokens-bound to that exact step Box 2: Metrics The most appropriate output flow type to determine the accuracy of the model is Metrics.
Metrics are quantitative measurements (such as accuracy, F1-score, precision, recall, or mean squared error) specifically calculated by evaluating model predictions against ground truth data.
Reference:
https://huggingface.co/docs/evaluate/a_quick_tour
QUESTION NO: 6
Hotspot Question
You have an Azure Machine Learning workspace.
You plan to use Azure Machine Learning Python SDK v2 to register a component in the workspace. The component definition is stored in the local file ./components/train/train.yml.
You write code to connect to the workspace by using the ml_client object and import all required libraries.
You need to complete the remaining code.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: load_component
train_component
Example:
Create component: training (using yaml definition)
Create and register the component. Registering it allows you to re-use it in other pipelines. Also, anyone else with access to your workspace can use the registered component.
# importing the Component Package
from azure.ai.ml import load_component
# Loading the component from the yml file
train_component = load_component(source=os.path.join(train_src_dir, "train.yml"))
# Now we register the component to the workspace
train_component = ml_client.create_or_update(train_component)
# Create (register) the component in your workspace
print(
f"Component {train_component.name} with Version {train_component.version} is registered" ) Box 2: create_or_update ml_client Reference:
https://learn.microsoft.com/en-us/azure/machine-learning/tutorial-pipeline-python-sdk
QUESTION NO: 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. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear on the review screen.
An organization provisions Azure Machine Learning workspaces for development, test, and production environments.
Each environment must be deployed consistently and updated through source control. The deployment process must be automated, repeatable, and auditable.
You need to deploy Azure Machine Learning resources in a consistent and controlled manner.
Solution: Create Azure Machine Learning workspaces manually in the Azure portal for each environment.
Does the solution meet the goal?
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 8
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. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear on the review screen.
You manage a Retrieval-Augmented Generation (RAG) application built on Microsoft Foundry.
The application retrieves documents from an indexed knowledge base and generates answers for internal users.
Recent feedback indicates that answers are fluent but sometimes include information that is not supported by the documents that were retrieved.
You need to evaluate whether a proposed change improves RAG answer quality by using supported and measurable techniques.
Solution: Measure token throughput and average response latency before and after applying the proposed change.
Does the solution meet the goal?
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 9
Drag and Drop Question
A team is developing a Retrieval-Augmented Generation (RAG) system.
The team requires improvements to the system's retrieval quality to ensure accurate, grounded responses.
You need to assess RAG performance before you can suggest an improvement strategy.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Correct Answer:

Explanation:
To properly assess your Azure Retrieval-Augmented Generation (RAG) system's performance before implementing an improvement strategy, you should include the following four steps: Run RAG evaluators, Collect retrieval logs, Modify model temperature, and Regenerate the prompt template.
Step 1: Run RAG evaluators
Run RAG evaluators is the primary method to objectively measure system performance.
Evaluators calculate data-driven metrics like groundedness, relevance, and retrieval precision using tools like Azure AI Studio Evaluators.
Step 2: Collect retrieval logs
Collect retrieval logs provides the raw operational data needed for assessment. Analyzing these logs helps you identify exactly which documents were retrieved, their relevance scores, and where the retrieval pipeline failed to fetch the correct context.
Step 3: Modify model temperature
Modify model temperature: Adjusting the temperature during assessment helps isolate whether poor responses are caused by bad retrieval or by the LLM being too creative (high temperature) or too rigid (low temperature). Testing variations helps establish a performance baseline.
Step 4: Regenerate the prompt template
Regenerate the prompt template: Evaluating how different prompt variations alter the output allows you to assess if the current template is effectively forcing the model to rely only on the retrieved context, which is critical for identifying grounding issues.
Incorrect:
Adjust the chunking strategy
This is an improvement action, not an assessment step. You would perform this optimization strategy after your assessment reveals that information is being cut off or poorly contextualized.
Re-index documents: This is a heavy remediation step. Re-indexing is a time- and resource- consuming strategy used to fix issues once the assessment phase has already proven that the current index or embedding model is faulty.
Reference:
https://flytoleisure.medium.com/guideline-for-building-a-practical-and-effective-rag-retrieval-augmented-generation-application-f6cf50676e37
QUESTION NO: 10
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.
What should you do?
Correct Answer: D
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 11
Drag and Drop Question
An organization is adopting Microsoft Foundry to support multiple generative AI projects across different teams. Microsoft Foundry platform administrators require centralized governance.
Development teams need isolated environments for experimentation and deployment.
Shared policies must be enforced consistently while allowing teams to work independently.
You need to configure the Microsoft Foundry environment to meet the requirements.
Which Microsoft Foundry components should you configure? To answer, move the appropriate configurations to the correct responsibilities. You may use each configuration once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Correct Answer:
QUESTION NO: 12
Hotspot Question
A team is standardizing MLOps practices by using automated deployments.
The team requires infrastructure to be defined declaratively and deployed through automation pipelines.
You need to configure infrastructure deployment.
What should you configure for each requirement? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Correct Answer:

Explanation:
Box 1: Model Registry
Deploy resources from a pipeline.
To standardize MLOps practices with declarative infrastructure and automated pipelines, the best choice is to use a Model Registry via Infrastructure as Code (IaC) for your core setup, supplemented by Azure CLI inside your pipelines for operational tasks. Prompt Flow is an application development tool and should not be used to deploy infrastructure.
A Model Registry (like Azure Machine Learning registry or MLflow) is the standard architectural pattern for managing ML artifacts declaratively.
Declarative Tracking: It stores model versions, lineages, and environments as code-like configurations.
Pipeline Integration: CI/CD pipelines can natively fetch from or push to a registry using configuration files.
Environment Isolation: It allows you to promote the exact same model artifact across Dev, Staging, and Production environments without rebuilding.
Box 2: Bicep templates
Define Azure resources declaratively.
Bicep templates are an excellent choice for defining Azure resources declaratively in an automated MLOps pipeline.
Native Azure Integration: Bicep supports all Azure Machine Learning (Azure ML) resources immediately upon release.
Declarative Syntax: You define the desired end-state of your infrastructure without writing complex deployment scripts.
No State Management: Azure manages the state automatically, unlike Terraform which requires a remote state file.
Tooling Support: Deep integration with Azure Pipelines and GitHub Actions allows easy deployment validation.
Reference:
https://azure.microsoft.com/en-us/blog/new-azure-capabilities-to-simplify-deployment-and-management/
QUESTION NO: 13
Drag and Drop Question
You have a Microsoft Foundry project with a connected Azure OpenAI Service model.
You have a set of text files stored locally on your computer.
You must set up a flow that will generate responses based on the content of your local files.
You need to implement a solution.
Which four actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Correct Answer:
QUESTION NO: 14
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. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear on the review screen.
An organization provisions Azure Machine Learning workspaces for development, test, and production environments.
Each environment must be deployed consistently and updated through source control. The deployment process must be automated, repeatable, and auditable.
You need to deploy Azure Machine Learning resources in a consistent and controlled manner.
Solution: Clone an existing Azure Machine Learning workspace to create additional environments.
Does the solution meet the goal?
Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).