Google

Professional Machine Learning Engineer Free Practice Questions — Page 12

Question 112

You work for a pharmaceutical company based in Canada. Your team developed a BigQuery ML model to predict the number of flu infections for the next month in Canada. Weather data is published weekly, and flu infection statistics are published monthly. You need to configure a model retraining policy that minimizes cost. What should you do?

A. Download the weather and flu data each week. Configure Cloud Scheduler to execute a Vertex AI pipeline to retrain the model weekly.
B. Download the weather and flu data each month. Configure Cloud Scheduler to execute a Vertex AI pipeline to retrain the model monthly.
C. Download the weather and flu data each week. Configure Cloud Scheduler to execute a Vertex AI pipeline to retrain the model every month.
D. Download the weather data each week, and download the flu data each month. Deploy the model to a Vertex AI endpoint with feature drift monitoring, and retrain the model if a monitoring alert is detected.
Show Answer
Correct Answer: D
Explanation:
To minimize cost, retraining should occur only when it is likely to improve the model. Flu labels are published monthly, so downloading them more frequently adds no value. Weather features change weekly, but changes do not always require retraining. Using feature drift monitoring allows you to retrain only when the input data distribution meaningfully changes, avoiding fixed weekly or monthly retraining costs. This approach aligns data ingestion with publication cadence and triggers retraining only when necessary, resulting in the lowest overall cost.

Question 113

You developed a custom model by using Vertex AI to predict your application's user churn rate. You are using Vertex AI Model Monitoring for skew detection. The training data stored in BigQuery contains two sets of features - demographic and behavioral. You later discover that two separate models trained on each set perform better than the original model. You need to configure a new model monitoring pipeline that splits traffic among the two models. You want to use the same prediction-sampling-rate and monitoring-frequency for each model. You also want to minimize management effort. What should you do?

A. Keep the training dataset as is. Deploy the models to two separate endpoints, and submit two Vertex AI Model Monitoring jobs with appropriately selected feature-thresholds parameters.
B. Keep the training dataset as is. Deploy both models to the same endpoint and submit a Vertex AI Model Monitoring job with a monitoring-config-from-file parameter that accounts for the model IDs and feature selections.
C. Separate the training dataset into two tables based on demographic and behavioral features. Deploy the models to two separate endpoints, and submit two Vertex AI Model Monitoring jobs.
D. Separate the training dataset into two tables based on demographic and behavioral features. Deploy both models to the same endpoint, and submit a Vertex AI Model Monitoring job with a monitoring-config-from-file parameter that accounts for the model IDs and training datasets.
Show Answer
Correct Answer: B
Explanation:
You want to split traffic between two models while keeping the same sampling rate and monitoring frequency and minimizing operational overhead. Deploying both models to the same endpoint allows traffic splitting natively. A single Vertex AI Model Monitoring job can monitor multiple models on the same endpoint by using `monitoring-config-from-file`, where you specify each model ID and the subset of features relevant to that model. There is no requirement to split the BigQuery training data into separate tables for skew detection, since monitoring can reference the same dataset and different feature selections per model. This avoids managing multiple endpoints, datasets, and monitoring jobs.

Question 114

You work at a leading healthcare firm developing state-of-the-art algorithms for various use cases. You have unstructured textual data with custom labels. You need to extract and classify various medical phrases with these labels. What should you do?

A. Use the Healthcare Natural Language API to extract medical entities
B. Use a BERT-based model to fine-tune a medical entity extraction model
C. Use AutoML Entity Extraction to train a medical entity extraction model
D. Use TensorFlow to build a custom medical entity extraction model
Show Answer
Correct Answer: C
Explanation:
You have unstructured medical text and need to extract and classify phrases using custom labels. AutoML Entity Extraction is designed exactly for this use case: training a custom entity extraction model from annotated text without building models from scratch. The Healthcare Natural Language API mainly provides pre-built entities, while BERT or TensorFlow approaches require significantly more ML expertise and development effort for the same outcome.

Question 115

You are collaborating on a model prototype with your team. You need to create a Vertex AI Workbench environment for the members of your team and also limit access to other employees in your project. What should you do?

A. 1. Create a new service account and grant it the Notebook Viewer role 2. Grant the Service Account User role to each team member on the service account 3. Grant the Vertex AI User role to each team member 4. Provision a Vertex AI Workbench user-managed notebook instance that uses the new service account
B. 1. Grant the Vertex AI User role to the default Compute Engine service account 2. Grant the Service Account User role to each team member on the default Compute Engine service account 3. Provision a Vertex AI Workbench user-managed notebook instance that uses the default Compute Engine service account.
C. 1. Create a new service account and grant it the Vertex AI User role 2. Grant the Service Account User role to each team member on the service account 3. Grant the Notebook Viewer role to each team member. 4. Provision a Vertex AI Workbench user-managed notebook instance that uses the new service account
D. 1. Grant the Vertex AI User role to the primary team member 2. Grant the Notebook Viewer role to the other team members 3. Provision a Vertex AI Workbench user-managed notebook instance that uses the primary user’s account
Show Answer
Correct Answer: C
Explanation:
To collaborate while restricting access, you should use a dedicated service account for the Workbench instance. Granting the Vertex AI User role to the service account allows the notebook to access Vertex AI resources. Granting Service Account User to team members lets them impersonate and use that service account when accessing the notebook. Granting Notebook Viewer to team members provides controlled access to the Workbench without broadly exposing Vertex AI permissions to all project users. Using a dedicated service account (instead of the default or an individual user) follows least-privilege and isolates access from other employees.

Question 116

Your company manages an ecommerce website. You developed an ML model that recommends additional products to users in near real time based on items currently in the user’s cart. The workflow will include the following processes: 1. The website will send a Pub/Sub message with the relevant data and then receive a message with the prediction from Pub/Sub 2. Predictions will be stored in BigQuery 3. The model will be stored in a Cloud Storage bucket and will be updated frequently You want to minimize prediction latency and the effort required to update the model. How should you reconfigure the architecture?

A. Write a Cloud Function that loads the model into memory for prediction. Configure the function to be triggered when messages are sent to Pub/Sub.
B. Create a pipeline in Vertex AI Pipelines that performs preprocessing, prediction, and postprocessing. Configure the pipeline to be triggered by a Cloud Function when messages are sent to Pub/Sub.
C. Expose the model as a Vertex AI endpoint. Write a custom DoFn in a Dataflow job that calls the endpoint for prediction.
D. Use the RunInference API with WatchFilePattern in a Dataflow job that wraps around the model and serves predictions.
Show Answer
Correct Answer: D
Explanation:
Option D best satisfies both requirements. Using Dataflow with the RunInference API provides low-latency, scalable streaming predictions directly integrated with Pub/Sub input and BigQuery output. The WatchFilePattern feature allows the model stored in Cloud Storage to be automatically reloaded when updated, without redeploying services or restarting jobs, minimizing operational effort. Alternatives either add deployment/management overhead (Vertex AI endpoints or pipelines) or suffer from scaling, cold-start, and manual update limitations (Cloud Functions).

Question 117

You have built a custom model that performs several memory-intensive preprocessing tasks before it makes a prediction. You deployed the model to a Vertex AI endpoint, and validated that results were received in a reasonable amount of time. After routing user traffic to the endpoint, you discover that the endpoint does not autoscale as expected when receiving multiple requests. What should you do?

A. Use a machine type with more memory
B. Decrease the number of workers per machine
C. Increase the CPU utilization target in the autoscaling configurations.
D. Decrease the CPU utilization target in the autoscaling configurations
Show Answer
Correct Answer: D
Explanation:
Vertex AI endpoint autoscaling is driven primarily by CPU utilization, not memory usage. Because the preprocessing is memory-intensive, CPU may not reach the scaling threshold even under high request load, so the endpoint fails to scale. Lowering (decreasing) the CPU utilization target causes autoscaling to trigger earlier, adding replicas sooner to handle concurrent requests. Changing machine memory does not fix the autoscaling trigger, and increasing the CPU target would delay scaling further.

Question 118

Your team frequently creates new ML models and runs experiments. Your team pushes code to a single repository hosted on Cloud Source Repositories. You want to create a continuous integration pipeline that automatically retrains the models whenever there is any modification of the code. What should be your first step to set up the CI pipeline?

A. Configure a Cloud Build trigger with the event set as "Pull Request"
B. Configure a Cloud Build trigger with the event set as "Push to a branch"
C. Configure a Cloud Function that builds the repository each time there is a code change
D. Configure a Cloud Function that builds the repository each time a new branch is created
Show Answer
Correct Answer: B
Explanation:
To retrain models automatically on any code modification, you need a CI trigger that runs whenever code is updated in the repository. Cloud Build is the native CI service for Cloud Source Repositories, and configuring a trigger on "Push to a branch" ensures the pipeline runs for every code change pushed to any branch. Pull request triggers only run on PR events, and Cloud Functions are not intended to replace a full CI system for this use case.

Question 119

You are creating a model training pipeline to predict sentiment scores from text-based product reviews. You want to have control over how the model parameters are tuned, and you will deploy the model to an endpoint after it has been trained. You will use Vertex AI Pipelines to run the pipeline. You need to decide which Google Cloud pipeline components to use. What components should you choose?

A. TabularDatasetCreateOp, CustomTrainingJobOp, and EndpointCreateOp
B. TextDatasetCreateOp, AutoMLTextTrainingOp, and EndpointCreateOp
C. TabularDatasetCreateOp. AutoMLTextTrainingOp, and ModelDeployOp
D. TextDatasetCreateOp, CustomTrainingJobOp, and ModelDeployOp
Show Answer
Correct Answer: D
Explanation:
You are working with text-based data (product reviews), so a text dataset component is required (TextDatasetCreateOp). You need full control over model architecture and hyperparameter tuning, which rules out AutoML and requires a custom training job (CustomTrainingJobOp). After training, the model must be deployed to an endpoint, which is handled by ModelDeployOp. Other options either use tabular components, rely on AutoML (less tuning control), or do not properly handle model deployment.

Question 120

You work for an online retailer. Your company has a few thousand short lifecycle products. Your company has five years of sales data stored in BigQuery. You have been asked to build a model that will make monthly sales predictions for each product. You want to use a solution that can be implemented quickly with minimal effort. What should you do?

A. Use Prophet on Vertex AI Training to build a custom model.
B. Use Vertex AI Forecast to build a NN-based model.
C. Use BigQuery ML to build a statistical ARIMA_PLUS model.
D. Use TensorFlow on Vertex AI Training to build a custom model.
Show Answer
Correct Answer: C
Explanation:
The goal is monthly forecasting for thousands of short-lifecycle products with minimal effort and fast implementation, using data already in BigQuery. BigQuery ML’s ARIMA_PLUS model is purpose-built for time series forecasting, supports multiple time series at scale, and automatically handles trend, seasonality, and holidays using simple SQL. It avoids custom code, infrastructure setup, and model tuning required by Prophet, neural network–based Vertex AI Forecast, or TensorFlow on Vertex AI, making it the quickest and lowest-effort solution.

Question 121

You are developing an ML pipeline using Vertex AI Pipelines. You want your pipeline to upload a new version of the XGBoost model to Vertex AI Model Registry and deploy it to Vertex AI Endpoints for online inference. You want to use the simplest approach. What should you do?

A. Use the Vertex AI REST API within a custom component based on a vertex-ai/prediction/xgboost-cpu image
B. Use the Vertex AI ModelEvaluationOp component to evaluate the model
C. Use the Vertex AI SDK for Python within a custom component based on a python:3.10 image
D. Chain the Vertex AI ModelUploadOp and ModelDeployOp components together
Show Answer
Correct Answer: D
Explanation:
The simplest approach in Vertex AI Pipelines is to use the pre-built components designed for this exact purpose. ModelUploadOp uploads a trained model to the Vertex AI Model Registry, and ModelDeployOp deploys that model to a Vertex AI Endpoint for online inference. These components require minimal configuration, avoid writing custom code, and leverage managed functionality. The other options involve unnecessary custom components or APIs (A and C), increasing complexity, or serve a different purpose altogether (B, which is only for evaluation).

$19

Get all 333 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.