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 network round-trip time to a model deployed only in us-central1. Increasing CPU size or adding a GPU will not significantly reduce cross-region latency. The correct approach is to deploy the model in a region closer to users (asia-southeast1) and route requests to the nearest deployment. Using Vertex AI private endpoints is appropriate for a bank, ensuring traffic stays on Google’s private network while still reducing latency through regional proximity.

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 Google Speech-to-Text best practices require asynchronous recognition rather than synchronous. The audio is already at a native telephony rate of 8 kHz, and Google explicitly recommends avoiding re-sampling; instead, you should send audio at its original sample rate. Upsampling to 16 kHz provides no benefit and can harm accuracy. Therefore, use the original 8 kHz audio with asynchronous recognition.

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:
The goal is to build a recommender system with the least amount of coding. BigQuery ML allows training models directly in SQL without managing infrastructure or writing TensorFlow code. For recommendations, matrix factorization is the standard collaborative filtering approach and is natively supported in BigQuery ML. The notebook- and TensorFlow-based options require significantly more custom code, and an autoencoder is less direct for classic user–item recommendations.

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 requirements imply continuous, ultra‑low‑latency online inference with no downtime and frequent (daily) model updates at low cost. A Dataflow *streaming* pipeline is required for 24/7 processing of sensor data. Using the RunInference API allows models to be loaded and executed directly inside the pipeline, avoiding network hops to external endpoints and achieving sub‑millisecond latency at lower cost. Automatic model refresh lets the pipeline pick up newly retrained models without redeployment or downtime. Vertex AI Prediction endpoints (option C) add extra latency, cost, and operational overhead and are not optimal for sub‑millisecond, always‑on, high‑volume inference. Therefore, D is the best choice.

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:
The requirements are to work with data spanning multiple Google Cloud projects and to find, track, and compare different model versions. Dataplex is the service designed to discover, manage, and govern data across multiple projects and locations, addressing the cross-project data aspect. Vertex AI Experiments is used to track, compare, and analyze model runs and performance metrics across versions. Vertex AI ML Metadata underpins experiment tracking by recording lineage, parameters, artifacts, and relationships between data, training runs, and models. Pipelines and Feature Store are useful but not strictly required for cross-project data discovery or model performance comparison. Therefore, option C best matches all stated needs.

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:
To track experiments, data lineage, and metrics in Vertex AI Workbench, you should use Vertex AI Experiments with ML Metadata. Preprocessed datasets are best tracked as artifacts using assign_input_artifact, which records lineage rather than treating data as a metric. Logging time-series metrics such as training loss requires a Vertex AI TensorBoard instance, since log_time_series_metrics is a TensorBoard-backed capability. Option C correctly combines Experiments + ML Metadata for artifacts and TensorBoard for time-series metric logging, matching Vertex AI’s recommended experiment setup.

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 key requirements are near–real-time detection, minimal development time, and low operational overhead for a small volume of images (~20/day). Cloud Vision API is a fully managed, pre-trained service that requires no model training, labeling, or deployment. Using object localization to detect animals can be implemented immediately and scales automatically. Options B, C, and D all require additional effort for model selection, training, deployment, and maintenance on Vertex AI, increasing time and cost. Therefore, A best meets the stated priorities.

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:
The goal is to understand why the model is making confident mistakes on specific images. Vertex AI’s example-based explanations are designed for this use case: they retrieve similar examples from the training data based on embeddings, helping you identify issues such as mislabeled data, bias, or confusing edge cases. Feature-based methods like Integrated Gradients or XRAI explain which pixels influenced a prediction, but they are less effective for diagnosing systematic mislabeling problems compared to seeing which training examples the model considers similar.

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 capture artifact and parameter lineage through Vertex ML Metadata. By using pipeline components for custom training and batch prediction, you get end-to-end, production-grade lineage from data to model to predictions. Vertex AI Experiments focus on comparing training runs, not on full production prediction lineage, and managed datasets or standalone jobs alone do not provide complete lineage across training and prediction.

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 and low-latency explanation method; using a small path count (5) minimizes online prediction latency. Integrated Gradients is not suitable for XGBoost and is more computationally intensive. To be alerted when feature attributions meaningfully change over time, prediction drift monitoring is the correct objective, as it captures changes in model behavior over time, unlike training-serving skew which focuses on data distribution differences.

$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.