Professional Machine Learning Engineer Free Practice Questions — Page 12
Question 64
You work at a gaming startup that has several terabytes of structured data in Cloud Storage. This data includes gameplay time data, user metadata, and game metadata. You want to build a model that recommends new games to users that requires the least amount of coding. What should you do?
A. Load the data in BigQuery. Use BigQuery ML to train an Autoencoder model.
B. Load the data in BigQuery. Use BigQuery ML to train a matrix factorization model.
C. Read data to a Vertex AI Workbench notebook. Use TensorFlow to train a two-tower model.
D. Read data to a Vertex AI Workbench notebook. Use TensorFlow to train a matrix factorization model.
Show Answer
Correct Answer: B
Explanation: BigQuery ML includes a built-in matrix factorization model specifically designed for recommendation systems and can train directly on data stored in BigQuery with minimal code. An autoencoder is not the appropriate built-in choice here, and TensorFlow solutions require substantially more custom development.
Question 65
Your work for a textile manufacturing company. Your company has hundreds of machines, and each machine has many sensors. Your team used the sensory data to build hundreds of ML models that detect machine anomalies. Models are retrained daily, and you need to deploy these models in a cost-effective way. The models must operate 24/7 without downtime and make sub millisecond predictions. What should you do?
A. Deploy a Dataflow batch pipeline and a Vertex AI Prediction endpoint.
B. Deploy a Dataflow batch pipeline with the Runlnference API, and use model refresh.
C. Deploy a Dataflow streaming pipeline and a Vertex AI Prediction endpoint with autoscaling.
D. Deploy a Dataflow streaming pipeline with the Runlnference API, and use automatic model refresh.
Show Answer
Correct Answer: D
Explanation: The workload is continuous sensor processing, so a streaming pipeline is appropriate. The requirement for sub-millisecond inference and cost-effectiveness across hundreds of models favors in-pipeline inference with Dataflow RunInference rather than sending every request to Vertex AI endpoints. Because models are retrained daily and must update without downtime, automatic model refresh allows the running pipeline to pick up new model versions without redeployment.
Question 66
You are training models in Vertex AI by using data that spans across multiple Google Cloud projects. You need to find, track, and compare the performance of the different versions of your models. Which Google Cloud services should you include in your ML workflow?
A. Dataplex, Vertex AI Feature Store, and Vertex AI TensorBoard
B. Vertex AI Pipelines, Vertex AI Feature Store, and Vertex AI Experiments
C. Dataplex, Vertex AI Experiments, and Vertex AI ML Metadata
D. Vertex AI Pipelines, Vertex AI Experiments, and Vertex AI Metadata
Show Answer
Correct Answer: C
Explanation: Dataplex is the appropriate service for discovering and governing data that spans multiple Google Cloud projects. Vertex AI Experiments is designed to track, organize, and compare model training runs and metrics. Vertex AI ML Metadata captures lineage and metadata for ML artifacts and executions, enabling traceability across the workflow. Feature Store and TensorBoard do not primarily address the stated requirements, and Pipelines orchestrates workflows but is not required by the question's focus on cross-project data discovery plus experiment tracking and lineage.
Question 67
You are developing a model to predict whether a failure will occur in a critical machine part. You have a dataset consisting of a multivariate time series and labels indicating whether the machine part failed. You recently started experimenting with a few different preprocessing and modeling approaches in a Vertex AI Workbench notebook. You want to log data and track artifacts from each run. How should you set up your experiments?
A. 1. Use the Vertex AI SDK to create an experiment and set up Vertex ML Metadata. 2. Use the log_time_series_metrics function to track the preprocessed data, and use the log_merrics function to log loss values.
B. 1. Use the Vertex AI SDK to create an experiment and set up Vertex ML Metadata. 2. Use the log_time_series_metrics function to track the preprocessed data, and use the log_metrics function to log loss values.
C. 1. Create a Vertex AI TensorBoard instance and use the Vertex AI SDK to create an experiment and associate the TensorBoard instance. 2. Use the assign_input_artifact method to track the preprocessed data and use the log_time_series_metrics function to log loss values.
D. 1. Create a Vertex AI TensorBoard instance, and use the Vertex AI SDK to create an experiment and associate the TensorBoard instance. 2. Use the log_time_series_metrics function to track the preprocessed data, and use the log_metrics function to log loss values.
Show Answer
Correct Answer: C
Explanation: Tracking artifacts such as preprocessed datasets is done by assigning input artifacts in Vertex AI Experiments/ML Metadata. Logging time-series metrics requires an associated Vertex AI TensorBoard instance. Therefore, create a TensorBoard instance, associate it with the experiment, use assign_input_artifact for the preprocessed data artifact, and log training loss with log_time_series_metrics.
Sources:
https://cloud.google.com/blog/products/ai-machine-learning/effortless-tracking-of-your-vertex-ai-model-training
Question 68
You work for a pet food company that manages an online forum. Customers upload photos of their pets on the forum to share with others. About 20 photos are uploaded daily. You want to automatically and in near real time detect whether each uploaded photo has an animal. You want to prioritize time and minimize cost of your application development and deployment. What should you do?
A. Send user-submitted images to the Cloud Vision API. Use object localization to identify all objects in the image and compare the results against a list of animals.
B. Download an object detection model from TensorFlow Hub. Deploy the model to a Vertex AI endpoint. Send new user-submitted images to the model endpoint to classify whether each photo has an animal.
C. Manually label previously submitted images with bounding boxes around any animals. Build an AutoML object detection model by using Vertex AI. Deploy the model to a Vertex AI endpoint Send new user-submitted images to your model endpoint to detect whether each photo has an animal.
D. Manually label previously submitted images as having animals or not. Create an image dataset on Vertex AI. Train a classification model by using Vertex AutoML to distinguish the two classes. Deploy the model to a Vertex AI endpoint. Send new user-submitted images to your model endpoint to classify whether each photo has an animal.
Show Answer
Correct Answer: A
Explanation: The requirement is to detect whether uploaded images contain an animal, with minimal development time and deployment cost, and only about 20 images per day. A pretrained managed API is the best fit. Cloud Vision API object localization can identify objects in an image without any data collection, labeling, training, or model deployment. Comparing detected object labels against a list of animals satisfies the requirement in near real time. The Vertex AI options require creating, training, and deploying custom models, which increases both development effort and operational overhead.
Question 69
You work for a manufacturing company. You need to train a custom image classification model to detect product defects at the end of an assembly line. Although your model is performing well, some images in your holdout set are consistently mislabeled with high confidence. You want to use Vertex AI to understand your model’s results. What should you do?
A. Configure feature-based explanations by using Integrated Gradients. Set visualization type to PIXELS, and set clip_percent_upperbound to 95.
B. Create an index by using Vertex AI Matching Engine. Query the index with your mislabeled images.
C. Configure feature-based explanations by using XRAI. Set visualization type to OUTLINES, and set polarity to positive.
D. Configure example-based explanations. Specify the embedding output layer to be used for the latent space representation.
Show Answer
Correct Answer: D
Explanation: Example-based explanations are designed to investigate incorrect high-confidence predictions by retrieving similar training examples in the learned embedding space, helping diagnose data or model issues. Feature-based explanations (Integrated Gradients/XRAI) highlight influential pixels but are less suited to understanding why specific misclassifications occur. Option C is also invalid because XRAI does not use OUTLINES as the recommended visualization. Matching Engine is not the Vertex AI Explainable AI feature for this use case.
Question 70
You are developing a process for training and running your custom model in production. You need to be able to show lineage for your model and predictions. What should you do?
A. 1. Create a Vertex AI managed dataset. 2. Use a Vertex AI training pipeline to train your model. 3. Generate batch predictions in Vertex AI.
B. 1. Use a Vertex AI Pipelines custom training job component to tram your model. 2. Generate predictions by using a Vertex AI Pipelines model batch predict component.
C. 1. Upload your dataset to BigQuery. 2. Use a Vertex AI custom training job to train your model. 3. Generate predictions by using Vertex Al SDK custom prediction routines.
D. 1. Use Vertex AI Experiments to train your model. 2. Register your model in Vertex AI Model Registry. 3. Generate batch predictions in Vertex AI.
Show Answer
Correct Answer: B
Explanation: Vertex AI Pipelines automatically records artifact lineage in Vertex ML Metadata across pipeline components. Using a custom training job component followed by a model batch prediction component creates end-to-end lineage from training data and model artifacts through batch prediction outputs, satisfying the requirement to show lineage for both the model and predictions.
Question 71
You have trained an XGBoost model that you plan to deploy on Vertex AI for online prediction. You are now uploading your model to Vertex AI Model Registry, and you need to configure the explanation method that will serve online prediction requests to be returned with minimal latency. You also want to be alerted when feature attributions of the model meaningfully change over time. What should you do?
A. 1. Specify sampled Shapley as the explanation method with a path count of 5. 2. Deploy the model to Vertex AI Endpoints. 3. Create a Model Monitoring job that uses prediction drift as the monitoring objective.
B. 1. Specify Integrated Gradients as the explanation method with a path count of 5. 2. Deploy the model to Vertex AI Endpoints. 3. Create a Model Monitoring job that uses prediction drift as the monitoring objective.
C. 1. Specify sampled Shapley as the explanation method with a path count of 50. 2. Deploy the model to Vertex AI Endpoints. 3. Create a Model Monitoring job that uses training-serving skew as the monitoring objective.
D. 1. Specify Integrated Gradients as the explanation method with a path count of 50. 2. Deploy the model to Vertex AI Endpoints. 3. Create a Model Monitoring job that uses training-serving skew as the monitoring objective.
Show Answer
Correct Answer: A
Explanation: For an XGBoost model on Vertex AI, Sampled Shapley is the appropriate explanation method; Integrated Gradients is intended for supported differentiable models such as TensorFlow, not XGBoost. To minimize online explanation latency, use a low path count (5 rather than 50). To be alerted when feature attributions change over time, configure Model Monitoring with prediction drift, which can monitor explanation attribution drift alongside prediction behavior rather than training-serving skew, which focuses on discrepancies between training and serving data distributions.
Question 72
You are training and deploying updated versions of a regression model with tabular data by using Vertex AI Pipelines, Vertex AI Training, Vertex AI Experiments, and Vertex AI Endpoints. The model is deployed in a Vertex AI endpoint, and your users call the model by using the Vertex AI endpoint. You want to receive an email when the feature data distribution changes significantly, so you can retrigger the training pipeline and deploy an updated version of your model. What should you do?
A. Use Vertex Al Model Monitoring. Enable prediction drift monitoring on the endpoint, and specify a notification email.
B. In Cloud Logging, create a logs-based alert using the logs in the Vertex Al endpoint. Configure Cloud Logging to send an email when the alert is triggered.
C. In Cloud Monitoring create a logs-based metric and a threshold alert for the metric. Configure Cloud Monitoring to send an email when the alert is triggered.
D. Export the container logs of the endpoint to BigQuery. Create a Cloud Function to run a SQL query over the exported logs and send an email. Use Cloud Scheduler to trigger the Cloud Function.
Show Answer
Correct Answer: A
Explanation: Vertex AI Model Monitoring is designed to detect feature distribution drift (prediction drift/data drift) on deployed Vertex AI Endpoints. It can monitor changes in feature distributions, generate alerts, and send email notifications when configured. This directly satisfies the requirement to detect significant distribution changes and trigger retraining, whereas the other options rely on generic logging or custom infrastructure rather than the managed model monitoring capability.
Question 73
You recently created a new Google Cloud project. After testing that you can submit a Vertex AI Pipeline job from the Cloud Shell, you want to use a Vertex AI Workbench user-managed notebook instance to run your code from that instance. You created the instance and ran the code but this time the job fails with an insufficient permissions error. What should you do?
A. Ensure that the Workbench instance that you created is in the same region of the Vertex AI Pipelines resources you will use.
B. Ensure that the Vertex AI Workbench instance is on the same subnetwork of the Vertex AI Pipeline resources that you will use.
C. Ensure that the Vertex AI Workbench instance is assigned the Identity and Access Management (IAM) Vertex AI User role.
D. Ensure that the Vertex AI Workbench instance is assigned the Identity and Access Management (IAM) Notebooks Runner role.
Show Answer
Correct Answer: C
Explanation: A Vertex AI Workbench user-managed notebook submits Vertex AI Pipeline jobs using the identity attached to the notebook VM (or the credentials in use). To create PipelineJobs, that identity needs Vertex AI permissions such as those included in the predefined Vertex AI User role (roles/aiplatform.user). The Notebooks Runner role is intended for running scheduled notebook executions rather than granting permission to submit Vertex AI Pipeline jobs. Region or subnet mismatches would not produce an IAM insufficient permissions error.
$19
Get all 367 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.