CertSafari

    Free Google Professional Machine Learning Engineer Sample Questions

    35 free sample questions from our bank of 328+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Architecting low-code AI solutions

    Subdomain 1.2: Building AI solutions using Google Cloud AI APIs or foundational models.

    1.You have fine-tuned Gemini 1.5 Pro on a domain-specific dataset. The inference latency of the fine-tuned model is too high for your real-time application. You need to reduce the inference time while keeping the model's specialized knowledge. Which two techniques can you apply? (Select two)(Select 2)

    1. A.Distill the fine-tuned model into a smaller student model
    2. B.Increase the number of fine-tuning epochs to improve generalization
    3. C.Switch the base model to Gemini 1.5 Flash for fine-tuning
    4. D.Use a larger training dataset to improve model robustness
    5. E.Enable quantization on the deployed model to reduce compute requirements
    Show answer & explanation

    Correct answers: A, CDistill the fine-tuned model into a smaller student model; Switch the base model to Gemini 1.5 Flash for fine-tuning

    • A. Correct. Model distillation trains a smaller student model to mimic the larger fine-tuned teacher model, reducing inference latency while retaining specialized knowledge.
    • B. Incorrect. Increasing fine-tuning epochs may improve model fit but does not reduce inference latency; it can even increase overfitting risk.
    • C. Correct. Gemini 1.5 Flash is optimized for lower latency and higher throughput. Fine-tuning it instead of Pro preserves domain-specific capabilities while reducing inference time.
    • D. Incorrect. A larger training dataset can improve robustness but does not directly affect inference latency or model size at deployment.
    • E. Incorrect. Quantization reduces compute requirements but is not typically the primary technique for Gemini managed fine-tuning; distillation and using a faster base model are the recommended approaches.

    Subdomain 1.2: Building AI solutions using Google Cloud AI APIs or foundational models.

    2.A user uploads a photo of a broken appliance and asks for repair instructions. You need a model that can analyze the image and generate relevant guidance. Which Vertex AI model should you use?

    1. A.Gemini 1.5 Pro
    2. B.Imagen
    3. C.PaLM 2 for Text
    4. D.textembedding-gecko
    Show answer & explanation

    Correct answer: AGemini 1.5 Pro

    • A. Correct. Gemini 1.5 Pro is a multimodal model capable of processing both images and text, making it suitable for analyzing an image of a broken appliance and generating repair instructions. It combines visual understanding with natural language generation.
    • B. Incorrect. Imagen is a text-to-image generation model designed to create images from text prompts, not to analyze uploaded images or generate text-based guidance.
    • C. Incorrect. PaLM 2 for Text is a text-only model that cannot process images, so it cannot analyze the photo to provide repair instructions.
    • D. Incorrect. textembedding-gecko generates vector embeddings for text, used for similarity or search tasks, but it does not perform image analysis or generate repair guidance.

    Domain 2: Collaborating within and across teams to manage data and models

    Subdomain 2.1: Exploring and preprocessing organization-wide data (e.g., Cloud Storage, BigQuery, Spanner, Cloud SQL, Apache Spark, Apache Hadoop)

    3.You are building a real-time fraud detection system using Vertex AI. The model requires historical transaction features (e.g., average spend over the last 30 days) combined with real-time transaction details. You have calculated these historical features and stored them in BigQuery. You need to serve these features to the model with millisecond latency during inference. What should you do?

    1. A.Export the BigQuery table to Cloud Storage as CSV files and load them into memory within the prediction container.
    2. B.Ingest the BigQuery data into Vertex AI Feature Store and use the Online Serving endpoint to retrieve feature values.
    3. C.Query BigQuery directly from the model prediction service using the BigQuery Storage API.
    4. D.Use Dataflow to stream the BigQuery data into a Cloud Bigtable instance and query Bigtable during inference.
    Show answer & explanation

    Correct answer: BIngest the BigQuery data into Vertex AI Feature Store and use the Online Serving endpoint to retrieve feature values.

    • A. Exporting data to CSV and loading it into memory is not scalable for production environments. It introduces significant startup overhead, creates memory constraints within prediction containers, and fails to handle feature updates or consistency, making it unsuitable for low-latency systems.
    • B. Vertex AI Feature Store is specifically designed for this use case. It provides a managed repository for ML features and offers an Online Serving endpoint that delivers single-digit millisecond latency. It ensures consistency between offline training and online serving and integrates natively with the Vertex AI ecosystem.
    • C. BigQuery is an OLAP (Online Analytical Processing) engine optimized for high-throughput analytical queries over large datasets, not for individual row lookups with millisecond latency. Using BigQuery directly during inference would result in high and variable latency that violates real-time requirements.
    • D. While Cloud Bigtable can provide low-latency reads, this approach requires building and maintaining custom pipelines (Dataflow) and managing Bigtable schemas manually. Vertex AI Feature Store is a better choice as it is a managed service specifically built for feature serving, reducing operational complexity.

    Subdomain 2.1: Exploring and preprocessing organization-wide data (e.g., Cloud Storage, BigQuery, Spanner, Cloud SQL, Apache Spark, Apache Hadoop)

    4.You are using Vertex AI Feature Store to manage features for a credit risk model. You need to generate a training dataset for a model that predicts loan default. The training examples are historical loans. It is critical that the feature values (e.g., 'current_account_balance') associated with each loan correspond exactly to the time the loan was approved, not the current value. How should you retrieve the data?

    1. A.Use the batch_serve_to_bq method, providing a read instance list that includes the entity IDs and the timestamp of the loan approval for each example.
    2. B.Use the Online Serving API to fetch the current feature values for all users and join them with the historical loan labels.
    3. C.Export the entire Feature Store to BigQuery and use a SQL JOIN to match users with their current account balances.
    4. D.Use the batch_serve_to_bq method and filter the results by the update_time column in the output table.
    Show answer & explanation

    Correct answer: AUse the batch_serve_to_bq method, providing a read instance list that includes the entity IDs and the timestamp of the loan approval for each example.

    • A. Correct. The batch_serve_to_bq method (or the underlying batchReadFeatureValues API) allows you to provide a 'read instance list' that contains entity IDs and specific timestamps for each historical event. Vertex AI Feature Store uses these timestamps to perform a point-in-time lookup, ensuring that feature values reflect the state at the time of the event (e.g., loan approval). This ensures point-in-time correctness and prevents data leakage.
    • B. Incorrect. The Online Serving API is designed for low-latency retrieval of the most recent feature values (the current state). Using current values and joining them to historical labels would introduce temporal leakage, as the model would be trained on 'future' data that would not have been available at the moment of prediction.
    • C. Incorrect. Exporting the entire Feature Store to BigQuery and performing a standard SQL JOIN typically retrieves the latest/current feature values unless you explicitly manage per-timestamp histories and write complex windowing functions. The native, supported method for point-in-time retrieval is batch serving with a read instance list.
    • D. Incorrect. While batch_serve_to_bq is the correct method, filtering by the update_time column after export does not reliably reconstruct historical feature values. The update_time indicates when a feature was last updated, not the state of the entity at the time of the loan approval. You must specify the desired timestamp in the read instance list during the retrieval process.

    Subdomain 2.1: Exploring and preprocessing organization-wide data (e.g., Cloud Storage, BigQuery, Spanner, Cloud SQL, Apache Spark, Apache Hadoop)

    5.Your organization has a large amount of legacy data preprocessing code written in Apache Spark running on an on-premises Hadoop cluster. You are migrating to Google Cloud and want to use a managed service to run these Spark jobs to prepare data for Vertex AI, requiring minimal code changes. Which service should you use?

    1. A.BigQuery ML
    2. B.Cloud Dataflow
    3. C.Dataproc
    4. D.Cloud Functions
    Show answer & explanation

    Correct answer: CDataproc

    • A. BigQuery ML is designed for creating and executing machine learning models directly within BigQuery using SQL. It does not provide an execution environment for Apache Spark code and would require a complete rewrite of the preprocessing logic into SQL.
    • B. Cloud Dataflow is a fully managed service for unified stream and batch processing based on the Apache Beam SDK. While powerful, migrating Spark jobs to Dataflow typically requires rewriting the code into Apache Beam, which violates the requirement for minimal code changes.
    • C. Dataproc is the correct choice as it is Google Cloud's managed service for Apache Spark and Apache Hadoop. It is specifically designed to run open-source tools with high compatibility, allowing for a 'lift-and-shift' migration of existing Spark workloads from on-premises clusters with minimal code changes.
    • D. Cloud Functions is a serverless, event-driven execution environment for small, short-lived tasks. It lacks the distributed processing framework, resource scaling, and execution time limits required to run large-scale legacy Spark preprocessing jobs.

    Subdomain 2.3: Tracking and running ML experiments

    6.You are using Vertex AI Experiments to track the development of a churn prediction model. You have created an Experiment named `churn-prediction-v1`. You want to organize your trials such that each unique model architecture (e.g., Random Forest, XGBoost, DNN) is grouped separately within this experiment. How should you structure your logging?

    1. A.Create a new Experiment for each architecture.
    2. B.Use the `vertex_ai.start_run(run_name=...)` method, using the architecture name as a prefix for the run name.
    3. C.Log the architecture name as a metric using `vertex_ai.log_metrics`.
    4. D.Create a separate Vertex AI TensorBoard instance for each architecture.
    Show answer & explanation

    Correct answer: BUse the `vertex_ai.start_run(run_name=...)` method, using the architecture name as a prefix for the run name.

    • A. Creating a new Experiment for each architecture fragments your tracking and makes cross-architecture comparisons difficult. Experiments are intended to group related work for a specific project (e.g., churn prediction); architectures should be tracked as runs within that project.
    • B. In Vertex AI, an Experiment consists of multiple Runs. By using `vertex_ai.start_run(run_name=...)` and naming the runs with an architecture-based prefix (e.g., 'xgboost-trial-1'), you can effectively organize, search, and filter trials within the same experiment context in the Google Cloud Console.
    • C. Metrics are intended for numeric measurements like accuracy or loss that change over time or across trials. Architecture is a categorical parameter or metadata identifier, not a metric. Logging it as a metric is semantically incorrect and does not provide organization benefits.
    • D. Vertex AI TensorBoard is used for visualizing training curves and internal model state. While it supports multiple runs, creating separate TensorBoard instances for each architecture is resource-inefficient and separates the trials into different dashboards, hindering comparison.

    Subdomain 2.3: Tracking and running ML experiments

    7.You are optimizing a PyTorch training pipeline on Vertex AI. The training time is higher than expected. You want to identify if the bottleneck is due to CPU data preprocessing or GPU computation. You have already enabled Vertex AI TensorBoard. What additional step allows you to view resource utilization profiles?

    1. A.Enable the Vertex AI Profiler in the training job configuration and use the TensorBoard Profiler plugin.
    2. B.Check the VM instance CPU utilization in Cloud Monitoring.
    3. C.Add print statements with timestamps in the __getitem__ method of the Dataset class.
    4. D.Increase the worker pool count in the training job.
    Show answer & explanation

    Correct answer: AEnable the Vertex AI Profiler in the training job configuration and use the TensorBoard Profiler plugin.

    • A. Correct. Enabling the Vertex AI Profiler in the training job configuration allows you to collect detailed performance data, including CPU/GPU utilization, execution timelines, and flame graphs. The TensorBoard Profiler plugin then visualizes this data, helping you distinguish between data-loading (CPU) and compute (GPU) bottlenecks.
    • B. Incorrect. Cloud Monitoring provides coarse, VM-level metrics that lack the granularity needed for deep ML model profiling. It does not offer the per-step timelines or specific GPU kernel execution data available in the TensorBoard Profiler plugin.
    • C. Incorrect. While manual timestamps can provide crude timing for data loading, this method is invasive, error-prone, and fails to capture GPU utilization or the overall system interaction needed for effective profiling.
    • D. Incorrect. Increasing the worker pool count is a scaling action that might mitigate a CPU bottleneck, but it does not provide the resource utilization profiles required to identify where the bottleneck actually exists.

    Subdomain 2.3: Tracking and running ML experiments

    8.You are evaluating a Generative AI model for a creative writing task. Standard metrics like BLEU and ROUGE are not capturing the stylistic nuances you care about. You decide to use a 'Human-in-the-loop' approach. How can you integrate human feedback into your Vertex AI experimentation workflow?

    1. A.Use Vertex AI Data Labeling service to create a labeling task for the generated outputs, then manually import the results into a Pandas dataframe for analysis.
    2. B.Use the Vertex AI Gen AI Evaluation service to configure a human-based evaluation task (CrowdCompute) and view the aggregated results alongside automated metrics.
    3. C.Email the generated outputs to a team of writers and ask them to reply with a score.
    4. D.Use Vertex AI TensorBoard to display the text and ask users to comment on the TensorBoard UI.
    Show answer & explanation

    Correct answer: BUse the Vertex AI Gen AI Evaluation service to configure a human-based evaluation task (CrowdCompute) and view the aggregated results alongside automated metrics.

    • A. While the Vertex AI Data Labeling service can be used to collect labels, it is primarily designed for creating ground-truth training datasets (e.g., classification, entity extraction). Using it for experiment evaluation followed by manual Pandas processing is a brittle, non-integrated workflow that lacks the native experiment tracking benefits of Vertex AI.
    • B. Vertex AI Gen AI Evaluation supports structured human-based evaluation tasks (leveraging tools like CrowdCompute). This service allows you to collect and aggregate human judgments and view them alongside automated metrics within the Vertex AI console, providing a reproducible and trackable workflow specifically designed for Gen AI evaluation.
    • C. Emailing outputs is a manual, ad-hoc method that is not scalable or trackable. It lacks integration with Vertex AI's experiment management system, making it difficult to maintain version control, ensure reproducibility, or compare different model versions systematically.
    • D. Vertex AI TensorBoard is optimized for visualizing training dynamics, such as loss curves, metrics, and model architectures. It does not support task management for human evaluators or the collection of structured human feedback for model evaluation.

    Subdomain 2.2: Model prototyping using notebooks (e.g., Gemini Enterprise Agent Platform Workbench and Colab Enterprise).

    9.You are developing a PyTorch model in a Vertex AI Workbench user-managed notebook. Your training data resides in a BigQuery dataset that requires row-level security. How should you securely access this data from your notebook code?

    1. A.Generate a service account key file locally, load it in the notebook, and use it to instantiate a BigQuery client.
    2. B.Use `gcloud auth application-default login` inside the notebook and execute queries using the default credentials of your user account.
    3. C.Configure the notebook’s runtime service account with appropriate BigQuery roles, and use the default credentials provided by the environment without storing keys.
    4. D.Create a temporary OAuth 2.0 client ID, embed the refresh token in the notebook, and exchange it for an access token on each run.
    Show answer & explanation

    Correct answer: CConfigure the notebook’s runtime service account with appropriate BigQuery roles, and use the default credentials provided by the environment without storing keys.

    • A. Incorrect. Storing and loading a service account key file in the notebook environment introduces security risks, as keys can be exposed, copied, or committed accidentally. Google Cloud recommends avoiding long-lived credentials when workload identity or attached service accounts are available. This violates the principle of least privilege.
    • B. Incorrect. Using `gcloud auth application-default login` relies on user credentials rather than the notebook's managed identity. This approach is not scalable or auditable for production environments, and the user account may not have the necessary permissions for row-level security. It creates a dependency on an individual user’s credentials.
    • C. Correct. The secure approach is to assign the notebook's runtime service account the appropriate BigQuery roles (e.g., BigQuery Data Viewer, BigQuery Job User) and rely on the environment's default credentials. This avoids embedding secrets in code, supports least privilege, and enables centralized access control via IAM, including row-level security.
    • D. Incorrect. Embedding a refresh token in the notebook is a security anti-pattern because tokens are sensitive credentials that can be leaked through notebooks, logs, or sharing. OAuth 2.0 client IDs and refresh tokens should never be hardcoded or stored in notebooks; using the notebook's managed service account identity is more secure.

    Subdomain 2.2: Model prototyping using notebooks (e.g., Gemini Enterprise Agent Platform Workbench and Colab Enterprise).

    10.You are prototyping a large foundation model from Model Garden in a Vertex AI Workbench notebook with one NVIDIA V100 GPU. The model barely fits in GPU memory. Which techniques can reliably reduce memory usage without drastically changing model quality? (Select two.)(Select 2)

    1. A.Use mixed precision with float16 for memory reduction.
    2. B.Use gradient accumulation with smaller per-step batch size.
    3. C.Double the GPU VRAM chips via the Cloud Console.
    4. D.Use 4-bit quantization of the model weights.
    5. E.Increase the number of attention heads in the model.
    Show answer & explanation

    Correct answers: A, DUse mixed precision with float16 for memory reduction.; Use 4-bit quantization of the model weights.

    • A. Correct. Mixed precision training using float16 reduces memory consumption for activations, gradients, and often optimizer states by up to half, with minimal impact on model quality when using loss scaling. It is well-supported on V100 GPUs and commonly used to fit larger models.
    • B. Incorrect. Gradient accumulation helps reduce memory required for activations by using smaller per-step batches, but it does not reduce the memory needed for the model parameters themselves. Since the model barely fits, the bottleneck is model size, not batch-related memory. Thus, this technique is not reliable for the stated problem.
    • C. Incorrect. You cannot increase VRAM capacity through software in the Cloud Console; VRAM is a hardware limitation of the selected GPU. This is not a feasible technique.
    • D. Correct. 4-bit quantization reduces model weight memory by approximately 75% (from 32-bit to 4-bit), making it possible to fit large models on a single GPU. While there is some quality loss, careful quantization can preserve much of the model's performance, especially for inference or lightweight prototyping.
    • E. Incorrect. Increasing attention heads adds parameters and computational overhead, increasing memory usage and making the model harder to fit.

    Subdomain 2.1: Exploring and preprocessing data for ML.

    11.Which Google Cloud service is a fully managed data processing service that supports both batch and streaming execution using the Apache Beam SDK?

    1. A.Cloud Dataflow
    2. B.BigQuery
    3. C.Cloud Dataproc
    4. D.Cloud Composer
    Show answer & explanation

    Correct answer: ACloud Dataflow

    • A. Correct. Cloud Dataflow is a fully managed, serverless data processing service that executes Apache Beam pipelines, supporting both batch and streaming workloads. It is designed for scalable, large-scale data processing without server management.
    • B. Incorrect. BigQuery is a fully managed data warehouse for analytics and SQL-based querying, not a service for running Apache Beam pipelines. It does not natively support Beam SDK for batch/streaming processing.
    • C. Incorrect. Cloud Dataproc is a managed service for running Hadoop and Spark clusters, but it is not serverless and does not natively support Apache Beam as a runner for both batch and streaming jobs.
    • D. Incorrect. Cloud Composer is a managed workflow orchestration service based on Apache Airflow, used to schedule and monitor workflows, not for direct data processing execution with Apache Beam.

    Subdomain 2.1: Exploring and preprocessing data for ML.

    12.An MLOps engineer wants to ensure that preprocessing steps are reproducible and can be audited. They need to version both the preprocessing code and the data transformations. Which approach best meets this requirement?

    1. A.Implement preprocessing as a Vertex AI Pipeline component and store artifacts in Vertex ML Metadata.
    2. B.Write a detailed README explaining the preprocessing steps and manually apply them each time.
    3. C.Use a Makefile to run a series of Python scripts that output processed files with versioned filenames.
    4. D.Store the preprocessing script in a Git repository and run it with different parameters in the Colab notebook.
    Show answer & explanation

    Correct answer: AImplement preprocessing as a Vertex AI Pipeline component and store artifacts in Vertex ML Metadata.

    • A. Correct. Vertex AI Pipelines provide a structured, repeatable workflow, and Vertex ML Metadata tracks artifacts, parameters, and execution details, ensuring full reproducibility and auditability of both code and data transformations.
    • B. Incorrect. A README and manual execution do not provide reliable versioning, reproducibility, or auditable lineage. This approach is error-prone and lacks automation or tracking of data transformations.
    • C. Incorrect. While a Makefile can automate script execution, versioned filenames alone do not provide robust lineage, metadata tracking, or auditable traceability. It does not connect code version to data artifacts.
    • D. Incorrect. Storing the script in Git versions the code, but running it in a Colab notebook does not guarantee reproducibility or auditability. There is no built-in lineage or artifact metadata system linking code version, parameters, and transformed data.

    Domain 3: Scaling prototypes into ML models

    Subdomain 3.1: Building models

    13.You are designing a credit risk assessment model for a financial institution. Regulatory compliance requires strict interpretability; you must be able to explain exactly how each feature (e.g., age, income, debt) contributes to the final decision. The relationship between features and risk is known to be non-linear. Which modeling approach and interpretability technique should you select to balance accuracy and regulatory compliance?

    1. A.Train a Deep Neural Network (DNN) and use Integrated Gradients for feature attribution.
    2. B.Train a Boosted Tree model (e.g., XGBoost) and use Shapley values (SHAP) for feature attribution.
    3. C.Train a Linear Regression model and use the model coefficients for interpretation.
    4. D.Train an AutoML Image model and use XRAI.
    Show answer & explanation

    Correct answer: BTrain a Boosted Tree model (e.g., XGBoost) and use Shapley values (SHAP) for feature attribution.

    • A. Deep Neural Networks (DNNs) can capture non-linear relationships but are often considered 'black boxes.' While Integrated Gradients provide feature attributions, they can be sensitive to model architecture and are generally less straightforward to present as exact, consistent contributions compared to SHAP for tabular data. In highly regulated sectors like credit risk, DNNs are often harder to validate for transparency.
    • B. Boosted Tree models (like XGBoost) are highly effective at capturing non-linear relationships in tabular data. Shapley values (SHAP), particularly TreeSHAP, provide additive feature attributions based on game theory. These values yield consistent and locally accurate per-feature contribution scores, making it a robust choice for meeting strict regulatory requirements for interpretability without sacrificing predictive accuracy.
    • C. Linear Regression models are highly interpretable because coefficients directly represent feature contributions. However, they are incapable of capturing the non-linear relationships specified in the scenario. This would lead to underfitting and poor predictive performance, which is unacceptable for a credit risk assessment model where accuracy is critical.
    • D. AutoML Image models and XRAI are specifically designed for image data and pixel-level attribution. They are entirely inappropriate for tabular data like credit risk assessment, which involves numerical and categorical features.

    Subdomain 3.1: Building models

    14.Which evaluation metric is most appropriate for a binary classification model detecting spam emails, where it is acceptable to miss some spam (False Negatives) but critical to avoid flagging legitimate email as spam (False Positives)?

    1. A.Recall
    2. B.Precision
    3. C.F1 Score
    4. D.ROC-AUC
    Show answer & explanation

    Correct answer: BPrecision

    • A. Recall (Sensitivity) measures the fraction of actual positives (spam) that are correctly identified. While recall minimizes False Negatives (missing spam), the scenario specifically states that missing some spam is acceptable. Recall does not directly penalize False Positives, making it inappropriate for this specific priority.
    • B. Precision measures the proportion of predicted positives that are actually positive. In this scenario, a False Positive occurs when a legitimate email is incorrectly flagged as spam. Optimizing for precision directly reduces False Positives, ensuring that legitimate emails are not wrongly filtered, which aligns with the critical requirement.
    • C. The F1 Score is the harmonic mean of precision and recall. It provides a balance between the two metrics and is useful for imbalanced datasets, but it treats both False Positives and False Negatives with equal relative weight. It does not allow for the specific prioritization of minimizing False Positives over False Negatives required here.
    • D. ROC-AUC measures the model's ability to distinguish between classes across all possible thresholds. While it provides a good overview of general model performance and discrimination capability, it does not address the specific business constraint of minimizing False Positives at the final operational threshold.

    Subdomain 3.3: Choosing appropriate hardware for training

    15.You are training a ResNet-50 model on ImageNet data using Vertex AI. You observe that your GPU utilization fluctuates significantly and often drops to 0% while the CPU utilization remains at 100%. You are using `tf.data` for your input pipeline. What is the most likely bottleneck and the appropriate hardware/software adjustment?

    1. A.The model is compute-bound. Switch to a more powerful GPU like the A100.
    2. B.The input pipeline is CPU-bound. Upgrade the machine type to one with more vCPUs or optimize the `tf.data` pipeline with caching and prefetching.
    3. C.The network bandwidth is insufficient. Enable Vertex AI Reduction Server.
    4. D.The batch size is too small. Increase the batch size to saturate the GPU memory.
    Show answer & explanation

    Correct answer: BThe input pipeline is CPU-bound. Upgrade the machine type to one with more vCPUs or optimize the `tf.data` pipeline with caching and prefetching.

    • A. If the model were compute-bound, GPU utilization would be consistently high. Fluctuating or zero utilization indicates the GPU is being starved of data by the CPU. Switching to a more powerful GPU would not address the high CPU utilization or the underlying data-loading bottleneck.
    • B. High CPU utilization (100%) combined with low or fluctuating GPU utilization is a classic sign that the input pipeline is CPU-bound. The CPU cannot preprocess data fast enough to keep the GPU busy. This is resolved by increasing vCPU counts (upgrading machine type) and/or optimizing the `tf.data` pipeline using transformations like `.prefetch()`, `.cache()`, and `.map(num_parallel_calls=tf.data.AUTOTUNE)`.
    • C. Insufficient network bandwidth or the Vertex AI Reduction Server typically relate to distributed gradient communication (all-reduce) in multi-node training. They do not explain a scenario where local CPU utilization is at 100% and stalling the GPU during the input phase.
    • D. Increasing the batch size helps saturate GPU memory once the data pipeline is efficient, but it does not fix a CPU-bound bottleneck. If the CPU is already saturated, increasing the batch size may increase memory pressure and could worsen the GPU starvation by requiring more CPU time to prepare larger batches.

    Subdomain 3.3: Choosing appropriate hardware for training

    16.You are running a hyperparameter tuning job on Vertex AI that launches hundreds of training trials. The budget is strictly limited. You can tolerate some trials failing and restarting. Which hardware configuration strategy should you use to minimize costs?

    1. A.Use NVIDIA A100 GPUs for all trials to finish them as fast as possible.
    2. B.Use Preemptible (Spot) worker pools with frequent model checkpointing.
    3. C.Use TPU Pods to maximize throughput per dollar.
    4. D.Use Committed Use Discounts with standard instances.
    Show answer & explanation

    Correct answer: BUse Preemptible (Spot) worker pools with frequent model checkpointing.

    • A. NVIDIA A100 GPUs provide high performance and speed but are the most expensive GPU option available. While they finish trials faster, they do not minimize total costs, especially for a large number of trials where per-unit cost is the primary constraint and budget is strictly limited.
    • B. Preemptible (Spot) worker pools offer significant cost savings (up to 80-90% discount) by utilizing spare compute capacity. Vertex AI supports preemptible workers for hyperparameter tuning. Since the scenario explicitly allows for trial failures and restarts, this is the most cost-effective approach. Frequent model checkpointing is a best practice to mitigate progress loss due to preemption.
    • C. While TPU Pods offer high throughput for large-scale training, they are generally not the most cost-effective solution for running hundreds of independent hyperparameter trials. They are less flexible for high-volume, short-duration trials and can incur higher costs compared to preemptible VMs.
    • D. Committed Use Discounts (CUDs) are designed for long-term, stable, and predictable workloads over a 1- or 3-year term. They are not ideal for short-term, bursty workloads like hyperparameter tuning jobs where you need immediate cost reductions without a long-term contractual commitment.

    Subdomain 3.2: Training models

    17.You are fine-tuning a large language model (LLM) using Vertex AI. You have a small dataset of 500 high-quality examples specific to your domain. You want to adapt the model to your domain while minimizing training costs and preventing catastrophic forgetting of the base model's knowledge. Which fine-tuning approach is most appropriate?

    1. A.Full fine-tuning of all model parameters using a TPU v4 pod.
    2. B.Reinforcement Learning from Human Feedback (RLHF) with a reward model.
    3. C.Parameter-Efficient Fine-Tuning (PEFT) using Low-Rank Adaptation (LoRA).
    4. D.Training a new model from scratch using the 500 examples.
    Show answer & explanation

    Correct answer: CParameter-Efficient Fine-Tuning (PEFT) using Low-Rank Adaptation (LoRA).

    • A. Full fine-tuning updates all model parameters, which is computationally expensive and requires significant TPU/GPU resources. Furthermore, modifying all weights on a small dataset often leads to catastrophic forgetting, where the model loses its general-purpose capabilities from the pre-training phase.
    • B. RLHF is a complex, multi-step process primarily used for aligning model behavior with human preferences (e.g., safety and helpfulness). It requires a reward model and ranking data, making it far more data-intensive and computationally expensive than needed for basic domain adaptation.
    • C. PEFT methods like LoRA are the ideal choice for this scenario. By freezing the original model weights and only training a small set of low-rank adapter parameters, you significantly reduce training costs and memory requirements. Because the base model remains unchanged, the risk of catastrophic forgetting is mitigated, making it highly effective for small datasets.
    • D. Training a large language model from scratch requires massive amounts of data (billions of tokens) and enormous compute resources. Using only 500 examples would result in an underfit model that lacks the foundational language understanding provided by pre-trained models.

    Subdomain 3.2: Training models

    18.You are designing a data ingestion pipeline for a high-performance training job on Vertex AI. The training data consists of millions of small text files. You want to optimize the `tf.data` pipeline to prevent the GPU from starving. Which three best practices should you apply?(Select 3)

    1. A.Use `dataset.cache()` to cache data in memory after the first epoch.
    2. B.Use `dataset.prefetch(tf.data.AUTOTUNE)` to prepare the next batch while the current one is being trained.
    3. C.Disable parallel calls in `dataset.map()` to preserve order.
    4. D.Use `dataset.interleave()` to read from multiple files in parallel.
    5. E.Process data one file at a time to minimize memory footprint.
    6. F.Store data as individual text files on Cloud Storage.
    Show answer & explanation

    Correct answers: A, B, DUse `dataset.cache()` to cache data in memory after the first epoch.; Use `dataset.prefetch(tf.data.AUTOTUNE)` to prepare the next batch while the current one is being trained.; Use `dataset.interleave()` to read from multiple files in parallel.

    • A. Correct. Using `dataset.cache()` avoids repeated remote reads across epochs by keeping data locally after the first pass. This significantly reduces I/O latency and helps keep the GPU fed during subsequent epochs. If the dataset fits in memory, it eliminates the need to fetch data from Cloud Storage repeatedly.
    • B. Correct. `dataset.prefetch(tf.data.AUTOTUNE)` overlaps data preprocessing and transfer with model execution. By preparing the next batch while the current one is being processed by the GPU, you minimize idle time. AUTOTUNE allows the system to dynamically adjust the buffer size for optimal throughput.
    • C. Incorrect. Disabling parallel calls in `dataset.map()` forces sequential processing, which increases latency and reduces concurrency. This is a common cause of input pipeline bottlenecks that lead to GPU starvation. Instead, you should use `num_parallel_calls=tf.data.AUTOTUNE`.
    • D. Correct. `dataset.interleave()` is critical when dealing with millions of small files. It allows the pipeline to read from multiple files in parallel and merge their streams. This mitigates the I/O overhead and high metadata costs associated with opening many small files sequentially.
    • E. Incorrect. Processing data one file at a time serializes the I/O and processing stages, creating a massive bottleneck. High-performance pipelines require parallel reads and processing to maintain enough throughput for the GPU.
    • F. Incorrect. Storing data as millions of individual small files is actually the root of the performance issue due to high request overhead on Cloud Storage. An optimization would be to pack these files into larger container formats like TFRecord or RecordIO, not to leave them as individual files.

    Subdomain 3.2: Training models

    19.You are setting up a secure training environment in Vertex AI for a banking client. The training data contains PII and resides in Cloud Storage. The security policy dictates that no data should traverse the public internet. Which networking configurations are required?(Select 2)

    1. A.Configure the Vertex AI CustomJob to use a specific Service Account.
    2. B.Set up VPC Network Peering between the Google-managed service producer network and the client's VPC.
    3. C.Enable Public IP addresses on the training nodes for faster download speeds.
    4. D.Use Private Google Access (or Private Service Connect) to access Cloud Storage APIs from the private subnets.
    5. E.Grant the Storage Object Admin role to the Compute Engine default service account.
    Show answer & explanation

    Correct answers: B, DSet up VPC Network Peering between the Google-managed service producer network and the client's VPC.; Use Private Google Access (or Private Service Connect) to access Cloud Storage APIs from the private subnets.

    • A. Assigning a specific service account is an Identity and Access Management (IAM) best practice for least privilege, but it is not a networking configuration and does not inherently prevent data from traversing the public internet.
    • B. Vertex AI Custom Training jobs run in a Google-managed service producer network. To allow private communication and ensure traffic stays off the public internet, you must establish VPC Network Peering between your VPC and the service producer network.
    • C. Enabling public IP addresses would allow traffic to egress to the public internet, which violates the primary security requirement of the banking client.
    • D. Private Google Access (or Private Service Connect) allows resources in a private subnet with only internal IP addresses to access the APIs and services of Google (such as Cloud Storage) over internal Google network routing, ensuring data does not traverse the public internet.
    • E. Granting IAM roles is a permission configuration, not a networking configuration. Additionally, using the default Compute Engine service account is against security best practices for handling sensitive PII data.

    Domain 4: Serving and scaling models

    Subdomain 4.2: Scaling online model serving

    20.You are deploying a BERT-based sentiment analysis model to Vertex AI. The application experiences highly sporadic traffic: zero traffic for hours, followed by sudden spikes of thousands of requests per second. You need to minimize costs during idle periods but ensure the model can handle spikes without dropping requests. Cold starts of up to 30 seconds are acceptable. How should you configure the endpoint?

    1. A.Set `minReplicaCount` to 1 and `maxReplicaCount` to 10. Enable traffic splitting.
    2. B.Set `minReplicaCount` to 0 and `maxReplicaCount` to a high value sufficient for peak load.
    3. C.Set `minReplicaCount` to 5 to handle the initial spike and rely on autoscaling for the rest.
    4. D.Deploy the model to a standard Kubernetes Engine (GKE) cluster with Horizontal Pod Autoscaling instead of Vertex AI.
    Show answer & explanation

    Correct answer: BSet `minReplicaCount` to 0 and `maxReplicaCount` to a high value sufficient for peak load.

    • A. Incorrect. Setting `minReplicaCount` to 1 means at least one replica is always running, which incurs baseline costs during long idle periods. Additionally, traffic splitting is used for blue-green or canary deployments and does not help with scaling for sporadic traffic spikes.
    • B. Correct. Setting `minReplicaCount` to 0 enables the endpoint to 'scale to zero,' which eliminates compute costs when there is no traffic. A high `maxReplicaCount` ensures the system can handle large sudden spikes. Because the scenario explicitly states that a 30-second cold start is acceptable, the latency penalty of scaling from zero is not a blocker.
    • C. Incorrect. Setting `minReplicaCount` to 5 would result in high costs during idle periods, violating the requirement to minimize costs. While it would handle initial traffic faster than scaling from zero, it is not the most cost-effective solution given the acceptable cold-start window.
    • D. Incorrect. Deploying to GKE with HPA introduces more operational overhead and complexity than Vertex AI. Standard GKE also generally requires paying for node resources even when pods are scaled down, making it less effective for minimizing idle costs compared to Vertex AI's managed scale-to-zero functionality.

    Subdomain 4.1: Serving models

    21.You have a large XGBoost model stored in a Google Cloud Storage bucket. You need to run batch predictions on a dataset of 500GB stored in CSV format in GCS. The predictions do not need to be real-time, but the job must complete within a 2-hour window. You want to minimize operational overhead and do not want to manage infrastructure. Which service should you use?

    1. A.Vertex AI Online Prediction
    2. B.Vertex AI Batch Prediction
    3. C.Dataflow with a custom Python DoFn loading the model
    4. D.Dataproc with Spark ML
    Show answer & explanation

    Correct answer: BVertex AI Batch Prediction

    • A. Vertex AI Online Prediction is designed for low-latency, real-time inference on a per-request basis. It is not optimized for processing 500GB of batch data and may hit payload limits or incur excessive costs compared to batch-specific services.
    • B. Vertex AI Batch Prediction is the best choice because it is a fully managed service specifically designed for large-scale, non-real-time inference. It can scale to process 500GB of CSV data in parallel to meet time requirements while minimizing operational overhead, as it handles all underlying infrastructure and model loading automatically.
    • C. While Dataflow can process large datasets, using a custom Python DoFn requires writing, testing, and maintaining pipeline code and handling model dependencies on worker nodes. This results in higher operational overhead compared to using the built-in Vertex AI Batch Prediction service.
    • D. Dataproc requires provisioning and managing Spark or Hadoop clusters. This involves significant operational complexity and infrastructure management, which contradicts the goal of minimizing overhead and avoiding infrastructure management.

    Subdomain 4.1: Serving models

    22.You are preparing to deploy a new version of a credit risk model. Before enabling it for all users, you want to compare its performance against the current production model using live traffic. You want to route 50% of traffic to the new model and 50% to the old model, but you need to ensure that a specific user always receives predictions from the same model version to maintain a consistent user experience. What should you do?

    1. A.Use Vertex AI Endpoint traffic splitting with a random 50/50 split.
    2. B.Implement the routing logic in your client application using a hash of the User ID to select the endpoint.
    3. C.Use Vertex AI Experiments to track the two models.
    4. D.Deploy both models to the same endpoint and use the deployModel API to toggle between them.
    Show answer & explanation

    Correct answer: BImplement the routing logic in your client application using a hash of the User ID to select the endpoint.

    • A. Vertex AI Endpoint traffic splitting distributes requests by a set percentage but does so randomly on a per-request basis. It does not provide native support for session stickiness or deterministic routing based on user identity, which means a single user could receive different results from different models across multiple requests.
    • B. Implementing routing logic in the client (or a proxy layer) using a hash of the User ID is the standard way to achieve sticky A/B testing. By applying a consistent hashing algorithm, you ensure that a specific user is always routed to the same model version, providing a consistent experience while maintaining the desired 50/50 traffic distribution.
    • C. Vertex AI Experiments is designed for tracking and comparing model metadata, parameters, and metrics during the training and evaluation phases. It is not a traffic management or request routing service for live inference traffic.
    • D. Deploying multiple models to one endpoint and using the deployModel API allows you to set traffic splits, but it does not solve the requirement for per-user stickiness. Updating splits via API is used for rolling updates or standard percentage-based canary deployments, not for deterministic user-level routing.

    Subdomain 4.2: Scaling online model serving

    23.You are deploying a model using NVIDIA Triton Inference Server on Vertex AI. The model is an ONNX format deep learning model. You want to maximize throughput on NVIDIA T4 GPUs. Which optimization step is specific to this setup and highly recommended?

    1. A.Convert the ONNX model to a TensorFlow SavedModel.
    2. B.Use the TensorRT optimization engine within Triton to optimize the model execution plan for the specific GPU.
    3. C.Disable the dynamic batching feature in Triton.
    4. D.Run the model on a CPU-only instance to avoid GPU overhead.
    Show answer & explanation

    Correct answer: BUse the TensorRT optimization engine within Triton to optimize the model execution plan for the specific GPU.

    • A. Converting the ONNX model to a TensorFlow SavedModel is unnecessary because Triton natively supports the ONNX format via its ONNX Runtime and TensorRT backends. This conversion would add extra complexity and potential compatibility issues without providing performance benefits on NVIDIA hardware.
    • B. Using the TensorRT optimization engine (via Triton's TensorRT backend or by generating TensorRT engines from ONNX) is highly recommended for maximizing throughput on NVIDIA GPUs like the T4. TensorRT optimizes the model execution plan through kernel fusion, precision calibration (FP16/INT8), and layer/tensor optimizations specifically for the target GPU architecture.
    • C. Disabling dynamic batching is counterproductive for maximizing throughput. Triton's dynamic batching feature aggregates multiple individual inference requests into larger batches, which increases GPU utilization and significantly improves overall throughput by efficiently utilizing the parallel processing capabilities of the GPU.
    • D. Running the model on a CPU-only instance would fail to leverage the hardware acceleration provided by NVIDIA T4 GPUs. For deep learning inference, GPUs are specifically designed for high-compute workloads, and moving to a CPU would result in significantly lower throughput and higher latency.

    Subdomain 4.1: Serving models

    24.You need to deploy a Scikit-learn model to Vertex AI. You want to use a pre-built container. Which of the following file names does Vertex AI expect the model artifact to have for Scikit-learn?(Select 2)

    1. A.model.pkl
    2. B.model.joblib
    3. C.saved_model.pb
    4. D.model.bst
    5. E.checkpoint.ckpt
    Show answer & explanation

    Correct answers: A, Bmodel.pkl; model.joblib

    • A. Correct. Vertex AI's pre-built containers for Scikit-learn expect serialized model files named either 'model.pkl' or 'model.joblib'. 'model.pkl' is the standard format used when using Python's pickle library for serialization.
    • B. Correct. 'model.joblib' is a supported filename for Scikit-learn models in Vertex AI pre-built containers. Joblib is often preferred over pickle for Scikit-learn models because it is more efficient with objects that contain large NumPy arrays.
    • C. Incorrect. 'saved_model.pb' is the standard file format for TensorFlow SavedModel artifacts. Vertex AI uses this for TensorFlow pre-built containers, not Scikit-learn.
    • D. Incorrect. 'model.bst' is the file naming convention typically used for XGBoost models. The Scikit-learn pre-built container will not recognize this artifact name.
    • E. Incorrect. 'checkpoint.ckpt' refers to model checkpoints, commonly used during training in TensorFlow or PyTorch, and is not a valid serving artifact for Scikit-learn models on Vertex AI.

    Domain 5: Automating and orchestrating ML pipelines

    Subdomain 5.1: Developing end-to-end ML pipelines

    25.You are creating a custom component for Vertex AI Pipelines using the @component decorator. You need to pass a large dataset (5 GB) from the previous step to this component. How should you define the input in the function signature to handle this efficiently?

    1. A.Pass the data as a base64 encoded string argument.
    2. B.Pass the data as a standard Python list.
    3. C.Use the Input[Dataset] type annotation. The KFP backend will automatically mount the data from Cloud Storage.
    4. D.Pass the GCS URI as a string and write code inside the function to download the data using gsutil.
    Show answer & explanation

    Correct answer: CUse the Input[Dataset] type annotation. The KFP backend will automatically mount the data from Cloud Storage.

    • A. Incorrect. Passing data as a base64 encoded string is highly inefficient for large datasets due to memory overhead and strict size limits for pipeline parameters in the metadata store.
    • B. Incorrect. Component parameters (like lists) must be serialized and transmitted between steps. A 5 GB dataset exceeds serialization limits and would likely cause the pipeline to fail or consume excessive memory.
    • C. Correct. Using the Input[Dataset] type annotation treats the dataset as an artifact rather than a parameter. This allows the Vertex AI / KFP backend to manage the data location in Cloud Storage and provide the component with the path to the artifact, ensuring efficient handling without serializing the actual data into the pipeline's metadata.
    • D. Incorrect. While passing a URI as a string is technically possible, it is less portable and more error-prone as it requires manual handling of data transfers and assumes the container has specific utilities like gsutil installed. It also bypasses Vertex AI's native artifact tracking.

    Subdomain 5.1: Developing end-to-end ML pipelines

    26.You are designing a TFX pipeline. You want to detect two specific types of issues: 1) The distribution of the serving data is significantly different from the training data. 2) The distribution of the serving data is changing over time (e.g., day-to-day). Which concepts/configurations in Vertex AI Model Monitoring or TFX correspond to these issues?

    1. A.1) Training-Serving Skew, 2) Prediction Drift
    2. B.1) Prediction Drift, 2) Training-Serving Skew
    3. C.1) Concept Drift, 2) Label Drift
    4. D.1) Schema Skew, 2) Feature Skew
    Show answer & explanation

    Correct answer: A1) Training-Serving Skew, 2) Prediction Drift

    • A. Correct. Training-Serving Skew refers to the divergence between the distribution of the training dataset and the data seen at serving time. Prediction Drift (often called population drift) refers to how the distribution of model inputs or outputs in production changes over time (e.g., comparing today's data to yesterday's data).
    • B. Incorrect. This option reverses the two concepts. Training-Serving Skew is the comparison between training and serving datasets, while Prediction Drift measures temporal changes within the production environment.
    • C. Incorrect. Concept Drift refers to a change in the statistical relationship between the input features and the target label (the 'meaning' of the data changes). Label Drift refers to changes in the distribution of the target variable itself. Neither term specifically addresses the training-vs-serving comparison and temporal input changes in the way Vertex AI Model Monitoring defines Skew and Drift.
    • D. Incorrect. Schema Skew refers to differences in the data structure or types between training and serving (e.g., an integer becoming a float). While Feature Skew is sometimes used as a broad term, it does not specifically distinguish between the training/serving comparison and the temporal changes described in the scenario.

    Subdomain 5.2: Automating model retraining

    27.Your team uses Vertex AI Pipelines to orchestrate model retraining. You need to ensure that the training data used for each run is reproducible and that you can trace which dataset version produced which model. You are using BigQuery as the data source. What is the best practice to achieve this?

    1. A.Select * from the BigQuery table directly in the training component.
    2. B.Export the BigQuery table to a CSV file in Cloud Storage with a timestamped filename. Pass the Cloud Storage URI as an input artifact to the training component.
    3. C.Use the BigQuery FOR SYSTEM_TIME AS OF clause in your query to snapshot data at the pipeline run time, or use a managed dataset in Vertex AI with versioning enabled.
    4. D.Copy the BigQuery table to a new table named 'training_data' before every run, overwriting the previous data.
    Show answer & explanation

    Correct answer: CUse the BigQuery FOR SYSTEM_TIME AS OF clause in your query to snapshot data at the pipeline run time, or use a managed dataset in Vertex AI with versioning enabled.

    • A. Querying a live BigQuery table directly using a standard SELECT statement does not guarantee reproducibility. If the underlying data changes through updates, inserts, or deletes, subsequent pipeline runs will use different data, making it impossible to audit or recreate a specific model version's training environment.
    • B. Exporting to a timestamped CSV provides a point-in-time snapshot, but it is operationally inefficient and manual. It introduces extra storage overhead and breaks the native data lineage features provided by Vertex AI ML Metadata and BigQuery.
    • C. This is the best practice. BigQuery's 'FOR SYSTEM_TIME AS OF' (Time Travel) allows you to snapshot the data exactly as it existed at the pipeline's execution time. Alternatively, Vertex AI Managed Datasets provide built-in versioning and metadata tracking, which automatically links specific data versions to model artifacts in the ML Metadata lineage.
    • D. Overwriting a single 'training_data' table destroys the historical state of previous training runs. This approach prevents traceability and lineage tracking, as you lose the ability to verify what specific data was used to produce older models.

    Subdomain 5.2: Automating model retraining

    28.You have a requirement to retrain a model only when the distribution of the input feature `income` shifts significantly compared to the training dataset. You have set up Vertex AI Model Monitoring on the prediction endpoint. Which specific metric and threshold configuration should you focus on?

    1. A.Prediction drift with Jensen-Shannon divergence.
    2. B.Training-serving skew with Jensen-Shannon divergence.
    3. C.Model performance (accuracy) threshold.
    4. D.Feature attribution drift.
    Show answer & explanation

    Correct answer: BTraining-serving skew with Jensen-Shannon divergence.

    • A. Prediction drift monitors the change in the distribution of the model's outputs (predictions) over time, comparing current serving data to previous serving data. It does not directly address the requirement of comparing input features to the training dataset.
    • B. Training-serving skew specifically measures the difference between the distribution of features in the training data and the distribution of features in the serving data. Vertex AI Model Monitoring uses Jensen-Shannon divergence to quantify this shift for numerical features like 'income'. This is the appropriate metric to trigger retraining when the incoming data no longer matches the distribution the model was trained on.
    • C. Monitoring model performance (like accuracy) requires ground-truth labels. In many production environments, labels are delayed or unavailable. Furthermore, performance metrics detect that the model is failing, whereas the requirement specifically targets input distribution shifts as the trigger.
    • D. Feature attribution drift tracks changes in how much a feature contributes to the model's predictions (using explanations like SHAP). While it can indicate changing model behavior, it is not the primary metric for measuring raw feature distribution shifts relative to training data.

    Subdomain 5.2: Automating model retraining

    29.Your automated retraining pipeline generates a new model artifact. Before deploying this model to the production endpoint, you need to verify its performance on a specific 'golden' dataset that represents critical edge cases. This dataset is stored in BigQuery. Which pipeline component should you add?

    1. A.A `ModelUploadOp` component.
    2. B.A `BigQueryQueryJobOp` to fetch data, followed by a `CustomPythonComponent` that loads the model, runs predictions on the golden dataset, calculates metrics, and raises an error if metrics are below thresholds.
    3. C.A `HyperparameterTuningJob` component.
    4. D.A `DataflowPythonJobOp` to clean the golden dataset.
    Show answer & explanation

    Correct answer: BA `BigQueryQueryJobOp` to fetch data, followed by a `CustomPythonComponent` that loads the model, runs predictions on the golden dataset, calculates metrics, and raises an error if metrics are below thresholds.

    • A. The `ModelUploadOp` component is used to upload a model artifact to the Vertex AI Model Registry. It serves as a registration step and does not include functionality to fetch data or execute evaluation logic for performance verification.
    • B. This is the correct approach for implementing an evaluation 'gate'. The `BigQueryQueryJobOp` retrieves the specific golden dataset from BigQuery, and the `CustomPythonComponent` allows you to define custom logic to load the model artifact, perform inference, and calculate metrics. By raising an exception if the metrics are below the required threshold, the pipeline will fail, effectively preventing the deployment of a model that does not meet performance standards.
    • C. A `HyperparameterTuningJob` is used during the model training phase to optimize hyperparameters. It is not intended for post-training validation or for gating deployments based on a specific 'golden' dataset.
    • D. A `DataflowPythonJobOp` is typically used for large-scale data ingestion, cleaning, or transformation. While it could be part of a data preparation pipeline, it is not the appropriate component for model evaluation and threshold-based deployment gating.

    Domain 6: Monitoring AI solutions

    Subdomain 6.1: Identifying risks to AI solutions

    30.You are securing a Vertex AI Pipeline that processes highly sensitive PII data. You need to ensure that data exfiltration is prevented even if an attacker compromises the code running within a pipeline component. The solution must prevent the pipeline containers from connecting to the public internet or unauthorized Google Cloud services. Which two actions should you take?(Select 2)

    1. A.Configure the pipeline to run using a Service Account with the Project Editor role.
    2. B.Implement VPC Service Controls and define a Service Perimeter containing the Vertex AI API and Cloud Storage.
    3. C.Enable Cloud Data Loss Prevention (DLP) API to automatically redact PII in transit.
    4. D.Configure the Vertex AI Pipeline to use a private worker pool peered with your VPC.
    5. E.Encrypt all data using Customer-Managed Encryption Keys (CMEK).
    Show answer & explanation

    Correct answers: B, DImplement VPC Service Controls and define a Service Perimeter containing the Vertex AI API and Cloud Storage.; Configure the Vertex AI Pipeline to use a private worker pool peered with your VPC.

    • A. Incorrect. Using a Service Account with the Project Editor role violates the principle of least privilege. It grants broad administrative access and does nothing to restrict network egress or prevent data exfiltration.
    • B. Correct. VPC Service Controls (VPC SC) allow you to define a security perimeter around Google Cloud resources. This prevents data from being moved to resources outside the perimeter, effectively mitigating data exfiltration risks even if an account is compromised.
    • C. Incorrect. Cloud DLP is used for discovering, classifying, and redacting sensitive data. While it helps manage PII, it is not a network-level control and cannot prevent a container from connecting to the public internet.
    • D. Correct. Configuring Vertex AI Pipelines to use a private worker pool peered with your VPC ensures that the pipeline containers run within your private network. This allows you to disable public internet access for the containers and control traffic via your VPC settings.
    • E. Incorrect. CMEK provides encryption at rest using keys you manage. While it increases data security, it does not prevent network-based exfiltration of data once the data is accessed or decrypted by the pipeline runtime.

    Subdomain 6.1: Identifying risks to AI solutions

    31.A retail company uses a custom image classification model on Vertex AI to identify products on shelves. You observe that the model frequently misclassifies products when the lighting conditions change slightly or when there is minor noise in the image, suggesting the model is brittle. You want to assess the model's robustness against adversarial attacks before releasing it to production. What should you do?

    1. A.Monitor the model for training-serving skew using Vertex AI Model Monitoring.
    2. B.Use the What-If Tool to visualize the decision boundary on the training set.
    3. C.Perform adversarial evaluation by generating perturbed examples (e.g., using the Fast Gradient Sign Method) and measuring the accuracy drop.
    4. D.Increase the L2 regularization parameter during retraining to smooth the decision boundary.
    Show answer & explanation

    Correct answer: CPerform adversarial evaluation by generating perturbed examples (e.g., using the Fast Gradient Sign Method) and measuring the accuracy drop.

    • A. Vertex AI Model Monitoring is primarily used in production to detect distribution drift and training-serving skew. While it is a critical production safeguard, it is a reactive measure and does not actively test or assess the model's robustness against crafted adversarial perturbations before release.
    • B. The What-If Tool is excellent for counterfactual analysis and exploring model behavior, but it is not optimized for high-dimensional image data. Visualizing decision boundaries for images is impractical and does not provide a systematic, quantitative assessment of adversarial robustness.
    • C. Adversarial evaluation is the standard procedure for assessing robustness. By using techniques like the Fast Gradient Sign Method (FGSM) to create small, intentional perturbations, you can quantitatively measure how susceptible the model is to small changes in input. This provides a direct metric of robustness before the model is deployed.
    • D. Increasing L2 regularization is a technique used during training to improve generalization and potentially smooth the decision boundary. However, it is a mitigation strategy, not an evaluation method. It does not provide a way to measure or assess the model's current level of adversarial robustness.

    Subdomain 6.1: Identifying risks to AI solutions

    32.A healthcare provider wants to use an image segmentation model to identify tumors in MRI scans. The doctors require visual explanations that highlight the specific regions of the image contributing to the positive classification. The explanations must be high-contrast and suitable for identifying boundaries. Which explanation method should you select in Vertex Explainable AI?

    1. A.Integrated Gradients
    2. B.Sampled Shapley
    3. C.XRAI
    4. D.Feature Importance
    Show answer & explanation

    Correct answer: CXRAI

    • A. Integrated Gradients provides pixel-level attribution by integrating gradients from a baseline image to the input image. While accurate for localizing importance, it often produces noisy, low-contrast maps that do not clearly delineate object boundaries compared to region-based methods.
    • B. Sampled Shapley is a method that approximates Shapley values. While it can be applied to images (typically via superpixels), it is computationally expensive and is generally better suited for tabular data or models with a smaller number of features rather than high-resolution medical imaging.
    • C. XRAI (eXtended Region Attribute Integration) is specifically designed for image data. It combines Integrated Gradients with image segmentation (over-segmentation) to aggregate pixel-level attributions into meaningful regions. This results in high-contrast visual explanations that are significantly better at identifying object boundaries and specific anatomical regions, making it ideal for medical imaging tasks.
    • D. Feature Importance is a general term describing how much each input feature contributes to a prediction. In the context of Vertex Explainable AI, it does not refer to a specific visualization method for images that would provide the spatial, high-contrast boundary maps required by the medical staff.

    Subdomain 6.2: Monitoring, testing, and troubleshooting AI solutions

    33.You are managing a fraud detection model deployed on Vertex AI. The model uses a custom container. Recently, you noticed that the feature attribution for the 'transaction_amount' feature has changed drastically compared to the baseline established during training, even though the feature's data distribution remains stable. You need to identify the type of issue occurring.

    1. A.Training-serving skew
    2. B.Prediction drift
    3. C.Feature attribution drift
    4. D.Concept drift
    Show answer & explanation

    Correct answer: CFeature attribution drift

    • A. Training-serving skew refers to differences between the data or preprocessing logic used during training versus serving. It typically involves mismatches in input distributions or feature encoding. Since the feature's data distribution is reported as stable, and the issue focuses on attribution values rather than input values, training-serving skew is less likely.
    • B. Prediction drift occurs when the distribution of the model's output (predictions) shifts over time, often due to input distribution changes. While changes in feature attribution might eventually correlate with prediction drift, the scenario specifically describes a shift in how importance is assigned to a feature, not a shift in the final output distribution.
    • C. Feature attribution drift specifically describes changes in how much a model attributes importance to a given feature compared to a baseline established during training. Vertex AI Model Monitoring can detect this even when the feature's raw data distribution remains stable, indicating that the model's internal behavior or the interplay between features has changed.
    • D. Concept drift refers to a change in the underlying relationship between input features and the target label (the 'ground truth' changes). While concept drift often leads to changes in feature importance, the prompt specifically identifies the change in the attribution metric relative to a baseline with stable inputs, making 'Feature attribution drift' the more precise diagnosis in the context of Vertex AI monitoring tools.

    Subdomain 6.2: Monitoring, testing, and troubleshooting AI solutions

    34.Your team has deployed a model to a Vertex AI Endpoint. You need to perform an A/B test to compare the performance of a new model version (v2) against the current version (v1) with live traffic. You want 10% of traffic to go to v2. How should you configure this?

    1. A.Deploy v2 to a new Endpoint and update the client application to send 10% of requests to the new Endpoint URL.
    2. B.Deploy v2 to the same Endpoint as v1 and configure `traffic_split` to {"v1": 90, "v2": 10}.
    3. C.Use Vertex AI Experiments to route traffic dynamically based on user ID.
    4. D.Deploy v2 as a canary deployment in Kubernetes Engine and use Istio for traffic splitting.
    Show answer & explanation

    Correct answer: BDeploy v2 to the same Endpoint as v1 and configure `traffic_split` to {"v1": 90, "v2": 10}.

    • A. Deploying to a new endpoint and managing traffic at the client level is inefficient and error-prone. This approach requires manual routing logic in the application layer and does not leverage Vertex AI's native management, integrated metrics, and logging across model versions.
    • B. This is the correct approach. Vertex AI Endpoints natively support percentage-based traffic splitting across multiple deployed models. By configuring the traffic_split parameter, you can route a specific percentage of traffic (e.g., 90% to v1 and 10% to v2) without changing the client application code, enabling seamless A/B testing.
    • C. Vertex AI Experiments is a tool used for tracking and comparing training runs, metadata, and model artifacts. It does not provide functionality for routing live inference traffic or performing real-time A/B splits on an endpoint.
    • D. While GKE and Istio are powerful for traffic management in microservices, this option adds unnecessary infrastructure complexity and bypasses the built-in capabilities of Vertex AI Endpoints. Since the model is already on Vertex AI, using native traffic splitting is the most efficient method.

    Subdomain 6.2: Monitoring, testing, and troubleshooting AI solutions

    35.A deployed model on Vertex AI Endpoint is experiencing high latency during peak loads. The metric `CPU Utilization` is consistently above 90%. You have `min_replica_count=1` and `max_replica_count=10`. Autoscaling is enabled but seems too slow to react. What configuration change could help mitigate this?

    1. A.Increase the max_replica_count to 20.
    2. B.Lower the autoscaling_metric_specs target CPU utilization threshold (e.g., from 60% to 40%).
    3. C.Increase the min_replica_count to match the average load (e.g., 5).
    4. D.Switch to a machine type with fewer vCPUs.
    Show answer & explanation

    Correct answer: BLower the autoscaling_metric_specs target CPU utilization threshold (e.g., from 60% to 40%).

    • A. Increasing the max_replica_count raises the upper limit of the total available resources, but it does not improve the speed at which the autoscaler provisions new instances. If the autoscaler is slow to react, the endpoint will still suffer from high latency regardless of the maximum capacity, unless the current limit of 10 is actually being hit during peaks.
    • B. Lowering the autoscaling_metric_specs target CPU utilization threshold makes the autoscaler more aggressive. By triggering the scale-out process at a lower CPU percentage (e.g., 40% instead of 60%), the system starts provisioning new replicas earlier. This provides a 'buffer' or headroom that handles the increasing load while new instances are booting up and warming up, directly addressing the issue of slow reaction times.
    • C. Increasing the min_replica_count ensures higher baseline capacity and reduces the system's reliance on rapid autoscaling during common load spikes. While this effectively mitigates latency by ensuring instances are already available, it is a static, costlier solution for over-provisioning rather than a configuration change that improves the autoscaler's responsiveness itself.
    • D. Switching to a machine type with fewer vCPUs would reduce the compute capacity of each replica, causing them to reach high utilization and saturation even faster. This would exacerbate the high latency and CPU utilization issues rather than mitigating them.

    Want the full experience?

    These are just samples. Practice the full Google Professional Machine Learning Engineer question bank in quiz mode — free, no signup, with domain practice and exam simulation.