Professional Machine Learning Engineer Free Practice Questions — Page 3
Question 22
You are an ML engineer at a bank. The bank's leadership team wants to reduce the number of loan defaults. The bank has labeled historic data about loan defaults stored in BigQuery. You have been asked to use AI to support the loan application process. For compliance reasons, you need to provide explanations for loan rejections. What should you do?
A. Import the historic loan default data into AutoML. Train and deploy a linear regression model to predict default probability. Report the probability of default for each loan application.
B. Create a custom application that uses the Gemini large language model (LLM). Provide the historic data as context to the model, and prompt the model to predict customer defaults. Report the prediction and explanation provided by the LLM for each loan application.
C. Train and deploy a BigQuery ML classification model trained on historic loan default data. Enable feature-based explanations for each prediction. Report the prediction, probability of default, and feature attributions for each loan application.
D. Load the historic loan default data into a Vertex AI Workbench instance. Train a deep learning classification model using TensorFlow to predict loan default. Run inference for each loan application, and report the predictions.
Show Answer
Correct Answer: C
Explanation: The requirement is to predict loan default using labeled historical data and to provide compliant, per‑prediction explanations for loan rejections. BigQuery ML is designed for structured data already stored in BigQuery and supports classification models with built‑in, feature‑based explanations (e.g., SHAP-style attributions). This allows reporting the prediction, probability of default, and clear feature contributions for each decision, satisfying regulatory and compliance needs. The other options either lack robust explainability, use inappropriate models, or are not suitable for compliant credit decisioning.
Question 23
You are developing a natural language processing model that analyzes customer feedback to identify positive, negative, and neutral experiences. During the testing phase, you notice that the model demonstrates a significant bias against certain demographic groups, leading to skewed analysis results. You want to address this issue following Google's responsible AI practices. What should you do?
A. Use Vertex AI's model evaluation lo assess bias in the model's predictions, and use post-processing to adjust outputs for identified demographic discrepancies.
B. Implement a more complex model architecture that can capture nuanced patterns in language to reduce bias.
C. Audit the training dataset to identify underrepresented groups and augment the dataset with additional samples before retraining the model.
D. Use Vertex Explainable AI to generate explanations and systematically adjust the predictions to address identified biases.
Show Answer
Correct Answer: C
Explanation: Google’s Responsible AI practices emphasize addressing bias at its root cause, which is most often the training data. Auditing the dataset to identify underrepresented or skewed demographic groups and augmenting it with more balanced samples directly mitigates bias before retraining, making the model fairer by design. Other options either focus on model complexity or post‑hoc adjustments, which do not address the underlying source of the bias as effectively.
Question 24
You recently deployed an image classification model on Google Cloud. You used Cloud Build to build a CI/CD pipeline for the model. You need to ensure that the model stays up-to-date with data and code changes by using an efficient retraining process. What should you do?
A. Use Cloud Run functions to monitor data drift in real time and trigger a Vertex AI Training job to retrain the model when data drift exceeds a predetermined threshold.
B. Configure a Git repository trigger in Cloud Build to initiate retraining when there are new code commits to the model's repository and a Pub/Sub trigger when there is new data in Cloud Storage.
C. Use Cloud Scheduler to initiate a daily retraining job in Vertex AI Pipelines.
D. Configure Cloud Composer to orchestrate a weekly retraining job that includes data extraction from BigQuery, model retraining with Vertex AI Training, and model deployment to a Vertex AI endpoint.
Show Answer
Correct Answer: B
Explanation: An efficient retraining process should be event-driven, not time-based. Triggering Cloud Build on Git commits retrains the model when code changes, and using Pub/Sub triggers on new data in Cloud Storage retrains when data changes. This keeps the model up to date with minimal unnecessary retraining and aligns with CI/CD best practices.
Question 25
You need to train a ControlNet model with Stable Diffusion XL for an image editing use case. You want to train this model as quickly as possible. Which hardware configuration should you choose to train your model?
A. Configure one a2-highgpu-1g instance with an NVIDIA A100 GPU with 80 GB of RAM. Use float32 precision during model training.
B. Configure one a2-highgpu-1g instance with an NVIDIA A100 GPU with 80 GB of RAM. Use bfloat16 quantization during model training.
C. Configure four n1-standard-16 instances, each with one NVIDIA Tesla T4 GPU with 16 GB of RAM. Use float32 precision during model training.
D. Configure four n1-standard-16 instances, each with one NVIDIA Tesla T4 GPU with 16 GB of RAM. Use floar16 quantization during model training.
Show Answer
Correct Answer: B
Explanation: Training ControlNet with Stable Diffusion XL benefits most from high GPU memory bandwidth, large VRAM, and reduced-precision training. An NVIDIA A100 80 GB provides significantly higher throughput than T4 GPUs and avoids memory constraints. Using bfloat16 on A100 is natively supported, reduces memory usage, increases training speed, and maintains model accuracy compared to float32. Multi-T4 setups have less VRAM per GPU and lower interconnect performance, making them slower for this workload.
Question 26
You are the lead ML engineer on a mission-critical project that involves analyzing massive datasets using Apache Spark. You need to establish a robust environment that allows your team to rapidly prototype Spark models using Jupyter notebooks. What is the fastest way to achieve this?
A. Set up a Vertex AI Workbench instance with a Spark kernel.
B. Use Colab Enterprise with a Spark kernel.
C. Set up a Dataproc cluster with Spark and use Jupyter notebooks.
D. Configure a Compute Engine instance with Spark and use Jupyter notebooks.
Show Answer
Correct Answer: A
Explanation: The question emphasizes both speed (“fastest way”) and a robust, team-ready environment for Spark prototyping with Jupyter. Vertex AI Workbench provides a preconfigured, managed notebook environment that can connect to Spark (including Dataproc Serverless) without the overhead of manually creating and managing a Spark cluster. This makes it faster to get started than provisioning Dataproc or Compute Engine, while being more robust and enterprise-ready than Colab. Therefore, A is the best choice.
Question 27
You are training a large-scale deep learning model on a Cloud TPU. While monitoring the training progress through Tensorboard, you observe that the TPU utilization is consistently low and there are delays between the completion of one training step and the start of the next step. You want to improve TPU utilization and overall training performance. How should you address this issue?
A. Apply tf.data.Detaset.map with vectorized operations and parallelization.
B. Use tf.data.Detaset.interleave with multiple data sources.
C. Use tf.data.Detaset.cache on the dataset after the first epoch.
D. Implement tf.data.Detaset.prefetch in the data pipeline.
Show Answer
Correct Answer: D
Explanation: Low TPU utilization with gaps between steps indicates the input pipeline is a bottleneck. tf.data.Dataset.prefetch overlaps data input/preprocessing with TPU execution so the next batch is ready when the current step finishes, reducing idle time and improving utilization. The other options can help in some cases, but prefetch directly addresses step-to-step delays.
Question 28
You are building an ML pipeline to process and analyze both steaming and batch datasets. You need the pipeline to handle data validation, preprocessing, model training, and model deployment in a consistent and automated way. You want to design an efficient and scalable solution that captures model training metadata and is easily reproducible. You want to be able to reuse custom components for different parts of your pipeline. What should you do?
A. Use Cloud Composer for distributed processing of batch and streaming data in the pipeline.
B. Use Dataflow for distributed processing of batch and streaming data in the pipeline.
C. Use Cloud Build to build and push Docker images for each pipeline component.
D. Implement an orchestration framework such as Kubeflow Pipelines or Vertex AI Pipelines.
Show Answer
Correct Answer: D
Explanation: An ML orchestration framework like Kubeflow Pipelines or Vertex AI Pipelines is designed for end-to-end ML workflows. It supports reusable custom components, automated and consistent execution across validation, preprocessing, training, and deployment, built-in metadata tracking for experiments and models, and reproducibility. It scales well and integrates with managed ML services, making it more appropriate than general data processing or CI/CD tools for this use case.
Question 29
You are developing an ML model on Vertex AI that needs to meet specific interpretability requirements for regulatory compliance. You want to use a combination of model architectures and modeling techniques to maximize accuracy and interpretability. How should you create the model?
A. Use a convolutional neural network (CNN)-based deep learning model architecture, and use local interpretable model-agnostic explanations (LIME) for interpretability.
B. Use a recurrent neural network (RNN)-based deep learning model architecture, and use integrated gradients for interpretability.
C. Use a boosted decision tree-based model architecture, and use SHAP values for interpretability.
D. Use a long short-term memory (LSTM)-based model architecture, and use local interpretable model-agnostic explanations (LIME) for interpretability.
Show Answer
Correct Answer: C
Explanation: For regulatory compliance, models with inherent interpretability and well-established explanation methods are preferred. Boosted decision tree models provide strong performance on structured data while remaining more transparent than deep neural networks. SHAP values offer consistent, theoretically grounded feature attributions that are widely accepted in regulated environments. The other options rely on deep learning architectures that are generally considered black boxes and are harder to justify for strict interpretability requirements.
Question 30
You have developed a fraud detection model for a large financial institution using Vertex AI. The model achieves high accuracy, but the stakeholders are concerned about the model's potential for bias based on customer demographics. You have been asked to provide insights into the model's decision-making process and identify any fairness issues. What should you do?
A. Create feature groups using Vertex AI Feature Store to segregate customer demographic features and non-demographic features. Retrain the model using only non-demographic features.
B. Use feature attribution in Vertex AI to analyze model predictions and the impact of each feature on the model's predictions.
C. Enable Vertex AI Model Monitoring to detect training-serving skew. Configure an alert to send an email when the skew or drift for a modes feature exceeds a predefined threshold. Re-train the model by appending new data to existing raining data.
D. Compile a dataset of unfair predictions. Use Vertex AI Vector Search to identify similar data points in the model's predictions. Report these data points to the stakeholders.
Show Answer
Correct Answer: B
Explanation: To assess potential bias and provide transparency into the model’s decision-making, you should analyze how individual features influence predictions. Vertex AI feature attribution (e.g., SHAP values) explains each feature’s contribution, allowing you to see whether demographic attributes disproportionately affect outcomes. This directly addresses fairness and interpretability concerns without prematurely removing features or focusing on unrelated issues like data skew or similarity search.
Question 31
You developed an ML model using Vertex AI and deployed it to a Vertex AI endpoint. You anticipate that the model will need to be retrained as new data becomes available. You have configured a Vertex AI Model Monitoring Job. You need to monitor the model for feature attribution drift and establish continuous evaluation metrics. What should you do?
A. Set up alerts using Cloud Logging, and use the Vertex AI console to review feature attributions.
B. Set up alerts using Cloud Logging, and use Looker Studio to create a dashboard that visualizes feature attribution drift. Review the dashboard periodically.
C. Enable request-response logging for the Vertex AI endpoint, and set up alerts using Pub/Sub. Create a Cloud Run function to run TensorFlow Data Validation on your dataset.
D. Enable request-response logging for the Vertex AI endpoint, and set up alerts using Cloud Logging. Review the feature attributions in the Google Cloud console when an alert is received.
Show Answer
Correct Answer: A
Explanation: Vertex AI Model Monitoring natively supports feature attribution drift detection and continuous evaluation, with alerts delivered via Cloud Logging and results viewable directly in the Vertex AI console. Enabling separate request-response logging is incompatible with Model Monitoring on the same endpoint, and building external dashboards or custom pipelines is unnecessary.
$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.