Google

Professional Machine Learning Engineer Free Practice Questions — Page 7

Question 62

You work for a large bank that serves customers through an application hosted in Google Cloud that is running in the US and Singapore. You have developed a PyTorch model to classify transactions as potentially fraudulent or not. The model is a three-layer perceptron that uses both numerical and categorical features as input, and hashing happens within the model. You deployed the model to the us-central1 region on nl-highcpu-16 machines, and predictions are served in real time. The model's current median response latency is 40 ms. You want to reduce latency, especially in Singapore, where some customers are experiencing the longest delays. What should you do?

A. Attach an NVIDIA T4 GPU to the machines being used for online inference.
B. Change the machines being used for online inference to nl-highcpu-32.
C. Deploy the model to Vertex AI private endpoints in the us-central1 and asia-southeast1 regions, and allow the application to choose the appropriate endpoint.
D. Create another Vertex AI endpoint in the asia-southeast1 region, and allow the application to choose the appropriate endpoint.
Show Answer
Correct Answer: C
Explanation:
The dominant source of latency for Singapore users is geographic network distance, not model execution. A small three-layer PyTorch MLP running with a 40 ms median latency is unlikely to benefit meaningfully from GPUs or larger CPU instances. Replicating the model in asia-southeast1 and routing requests to the nearest regional endpoint reduces round-trip latency. Because the application is hosted in Google Cloud for a bank, using Vertex AI private endpoints is the appropriate production architecture, providing low-latency private connectivity while maintaining secure network isolation.

Question 63

You work at an organization that maintains a cloud-based communication platform that integrates conventional chat, voice, and video conferencing into one platform. The audio recordings are stored in Cloud Storage. All recordings have an 8 kHz sample rate and are more than one minute long. You need to implement a new feature in the platform that will automatically transcribe voice call recordings into a text for future applications, such as call summarization and sentiment analysis. How should you implement the voice call transcription feature following Google-recommended best practices?

A. Use the original audio sampling rate, and transcribe the audio by using the Speech-to-Text API with synchronous recognition.
B. Use the original audio sampling rate, and transcribe the audio by using the Speech-to-Text API with asynchronous recognition.
C. Upsample the audio recordings to 16 kHz, and transcribe the audio by using the Speech-to-Text API with synchronous recognition.
D. Upsample the audio recordings to 16 kHz, and transcribe the audio by using the Speech-to-Text API with asynchronous recognition.
Show Answer
Correct Answer: B
Explanation:
The recordings are longer than one minute, so Speech-to-Text asynchronous recognition is the appropriate mode. For 8 kHz telephony audio, Google recommends sending the native sample rate rather than upsampling, because resampling cannot recover lost frequency information and is not a best practice.

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.

$19

Get all 332 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.