Google Cloud · Free Practice Questions · Last reviewed May 2026
42real exam-style questions organised by domain, each with the correct answer highlighted and a plain-English explanation of why it's right — and why the others are wrong.
18% of exam · 6 sample questions below
A data scientist creates a custom Python function component for a Vertex AI pipeline using the Kubeflow Pipelines SDK v2. The component takes a string parameter 'input_text' and outputs a Metrics artifact. The scientist wants to include a lightweight Python function without building a container. Which code snippet correctly defines this component?
@dsl.component\ndef my_component(input_text: str) -> Metric:\n metrics = Metric()\n metrics.log_metric('length', len(input_text))
@dsl.pipeline\ndef my_pipeline(input_text: str):\n metrics = Metrics()\n metrics.log_metric('length', len(input_text))
def my_component(input_text: str) -> Metrics:\n from kfp.dsl import Metrics\n metrics = Metrics()\n metrics.log_metric('length', len(input_text))\n return metrics
@dsl.component(base_image='python:3.9')\ndef my_component(input_text: str) -> Metrics:\n from kfp.dsl import Metrics\n metrics = Metrics()\n metrics.log_metric('length', len(input_text))\n return metrics
Correct: Uses @dsl.component with base_image, imports Metrics inside the function, and returns a Metrics artifact.
A machine learning engineer is building a Vertex AI pipeline that uses a pre-built Google Cloud Pipeline Components (GCPC) to train a custom model. Which component should the engineer use to submit a custom training job to Vertex AI?
HyperparameterTuningJob
CustomJob
Correct: CustomJob (or TrainingJob) is the GCPC component to run a custom training job on Vertex AI.
BatchPredictionJob
ModelDeploy
A team has a Vertex AI pipeline that includes a container component for data preprocessing. The team notices that the component is re-executed every time the pipeline runs, even when the inputs and code haven't changed. They want to leverage pipeline caching to avoid redundant executions. What should they do to enable caching for this component?
Set the 'caching' flag to 'True' in the pipeline definition using 'pipeline.caching = True'.
Set the environment variable 'ENABLE_CACHE' to 'true' on the pipeline run request.
Re-compile the pipeline with the '--enable-cache' flag.
Ensure that the component does not have 'dsl.cache_options(enable_cache=False)' set.
Caching is enabled by default; if someone explicitly disabled it, removing that line will re-enable caching.
A machine learning team uses Vertex AI Pipelines to orchestrate their training pipeline. They want to trigger the pipeline automatically in response to new data arriving in a Cloud Storage bucket, and also support a scheduled run every day at 6 AM. Which combination of services should they use to achieve both event-driven and schedule-based triggers?
Cloud Scheduler for the schedule, and Cloud Pub/Sub with Push subscription to Vertex AI for event-driven.
Cloud Functions for both schedule and event-driven, using cron trigger.
Cloud Scheduler for the schedule, and Cloud Functions triggered by Cloud Storage events to call the Vertex AI API for event-driven.
Correct: Cloud Scheduler for cron schedule, Cloud Functions for event-driven from Cloud Storage.
Vertex AI Pipelines built-in scheduler for schedule, and Cloud Pub/Sub for event-driven.
A company is using Vertex AI Pipelines to automate model retraining. They have a component that creates a BigQuery table with training data. To ensure idempotency, the component should check if the table already exists and recreate it if necessary. What is the best practice for passing data between pipeline components?
Pass data in-memory as Python objects between components.
Use BigQuery table names as component outputs and inputs.
Use Cloud SQL to store intermediate results and pass connection strings.
Store data as artifacts in Cloud Storage and pass the GCS URI between components.
Correct: Passing GCS URIs allows components to be idempotent and data to be versioned.
A data engineer wants to orchestrate a complex workflow that includes running a Vertex AI pipeline, then a BigQuery job, and finally a Dataflow pipeline. The workflow must handle dependencies, retries, and monitoring. Which Google Cloud service is most suitable for this orchestration?
Cloud Tasks
Cloud Composer
Correct: Cloud Composer (Airflow) provides DAG-based orchestration with operators for all mentioned services.
Cloud Scheduler
Workflows
Want more Automating and Orchestrating ML Pipelines practice?
Practice this domain11% of exam · 6 sample questions below
A data science team uses Vertex AI Experiments to track training runs. They want to automatically log parameters, metrics, and artifacts for all runs with minimal code changes. Which approach should they take?
Manually log each parameter and metric using `aiplatform.log_metrics()` after each training step.
Use MLflow autologging by calling `mlflow.autolog()` before the training code and wrap the training script with `mlflow.start_run()`.
MLflow autologging captures parameters, metrics, and artifacts automatically when used with Vertex AI Experiments.
Enable Vertex AI Experiments autologging by setting `autolog=True` in the experiment run context.
Use TensorBoard with tf.keras.callbacks.TensorBoard to log metrics.
A machine learning team wants to share features across multiple models to reduce training-serving skew and ensure consistency. Which Vertex AI service should they use?
Vertex AI Workbench
Vertex AI Model Registry
Vertex AI Feature Store
Feature Store is designed for sharing and serving features consistently across training and serving.
Vertex AI Experiments
An organization uses Vertex AI Pipelines and wants to track the lineage of datasets, models, and metrics across pipeline runs. They need to query upstream and downstream dependencies of an artifact. Which service should they use?
Vertex AI Feature Store
Vertex AI Experiments
Vertex AI Model Registry
Vertex AI Metadata
Vertex AI Metadata provides a metadata store and lineage queries for artifacts, executions, and contexts.
A team uses Vertex AI Feature Store with an online store for low-latency serving. They need to support frequent updates to features (e.g., every minute) and require high write throughput (thousands of writes per second). Which online store type should they choose?
Optimized online store
Firestore online store
Bigtable online store
Bigtable supports high write throughput and low-latency reads, ideal for frequent updates.
Cloud SQL online store
A machine learning team wants to implement champion/challenger model deployment. They have two model versions: v1 (champion) and v2 (challenger). They deploy both to the same endpoint with traffic splitting. How should they manage model versions in Vertex AI Model Registry to reflect this?
Upload both models without aliases. Use endpoint traffic splitting by model version ID.
Upload v1 with alias 'champion' and v2 with alias 'challenger'. Then deploy both to the endpoint with traffic split.
Aliases like 'champion' and 'challenger' are used to identify models and manage traffic splitting.
Use Vertex AI Experiments to designate champion/challenger.
Create two separate endpoints: one for champion and one for challenger.
A data engineer needs to version large datasets (multiple TB) in a Data Lake on Google Cloud. They require ACID transactions to ensure consistency when multiple jobs read/write concurrently. Which solution should they use?
Delta Lake on Dataproc
Delta Lake provides ACID transactions on cloud storage, ideal for concurrent reads/writes on data lakes.
BigQuery table snapshots
DVC (Data Version Control)
Vertex AI Feature Store
Want more Collaborating Within and Across Teams to Manage Data and Models practice?
Practice this domain20% of exam · 6 sample questions below
A data scientist wants to deploy a trained TensorFlow model to Vertex AI for online predictions. They need to serve predictions with low latency and want to leverage GPU acceleration. Which machine type should they select when creating the Vertex AI endpoint?
n1-standard-4 with 1 NVIDIA Tesla T4
Attaching a GPU to an n1-standard machine enables GPU acceleration.
n1-standard-4
e2-standard-4
n1-highmem-8
You are deploying a new version of a model to a Vertex AI endpoint that already has a champion model serving 100% of traffic. You want to gradually shift traffic to the new version while monitoring for errors. Which approach should you use?
Use Cloud Load Balancing with weighted backend services pointing to different endpoints.
Deploy the challenger to the same endpoint with initial traffic split, e.g., champion 90%, challenger 10%, and gradually adjust.
This is the correct method for A/B testing with traffic splitting in Vertex AI.
Delete the champion model and redeploy with the challenger as the new version.
Create a new endpoint for the challenger and use a load balancer to split traffic.
A company is using Vertex AI Prediction with a custom container that performs preprocessing before inference. The preprocessing step is CPU-intensive and the inference step uses a GPU. They want to minimize prediction latency while optimizing cost. Which architecture should they use?
Use Cloud Run for preprocessing and send HTTP requests to a GPU-backed Vertex AI endpoint for inference.
Use two separate Vertex AI endpoints: one CPU-based for preprocessing, one GPU-based for inference, and chain them with Cloud Tasks.
Use Dataflow for preprocessing and then invoke the model, but Dataflow is not designed for real-time prediction.
Use a single GPU machine (e.g., n1-standard-4 with T4) and perform both preprocessing and inference on the same instance.
This minimizes latency by keeping all processing local, and you can choose a machine with sufficient CPU cores.
You need to serve a large embedding model for similarity search with low latency. The model was trained to generate 256-dimensional embeddings. You plan to use Vertex AI Vector Search. Which index type should you choose to balance accuracy and performance for a dataset with 10 million vectors?
Tree-based index
Approximate nearest neighbor (ANN) index using ScaNN
ScaNN is designed for efficient large-scale similarity search with configurable accuracy.
Brute-force index
Hash-based index
A machine learning engineer needs to run batch predictions on 50 TB of data stored in BigQuery using a Vertex AI model. The model is a custom container. What is the most efficient way to set up the batch prediction job?
Create a Vertex AI batch prediction job with BigQuery source and BigQuery destination.
Vertex AI batch prediction supports BigQuery directly for input and output.
Use Dataflow to process the data and call the model via Vertex AI online prediction.
Export BigQuery data to CSV in GCS, then create a batch prediction job with GCS source.
Create a Cloud Function to iterate over BigQuery rows and call the endpoint.
You have a Vertex AI endpoint with min_replica_count=2 and max_replica_count=10. You notice that during a traffic spike, the endpoint does not scale up quickly enough, causing increased latency. What should you do to improve autoscaling responsiveness?
Increase max_replica_count to 20.
Disable autoscaling and manually manage replicas.
Increase min_replica_count to 10.
Reduce the target CPU utilization percentage from default to a lower value.
Lower target utilization triggers scaling sooner, improving responsiveness.
Want more Serving and Scaling Models practice?
Practice this domain13% of exam · 6 sample questions below
A data scientist has deployed a model on Vertex AI Endpoints and wants to monitor the model's predictions for any drift over time. Which Vertex AI service should they use?
Vertex AI Feature Store
Vertex AI Predictions
Vertex AI Explainable AI
Vertex AI Model Monitoring
Vertex AI Model Monitoring is designed for monitoring drift and skew in deployed models.
An MLOps engineer needs to collect ground truth labels for a deployed classification model to compare predictions against actuals. Where should the engineer store the ground truth data to enable Vertex AI model quality monitoring?
BigQuery
Vertex AI Model Monitoring uses ground truth labels stored in BigQuery to compute quality metrics.
Firestore
Cloud Spanner
Cloud Storage
A team is monitoring a deployed model and notices that the prediction distribution has changed significantly over the last week. They want to detect which features are contributing most to the drift. Which tool should they use?
Vertex AI Explainable AI
Explainable AI provides feature attributions (SHAP, integrated gradients) that can help identify which features are drifting.
Vertex AI Feature Store
Vertex AI Model Monitoring
Vertex AI Pipelines
An engineer wants to configure alerting when the data distribution of a serving feature deviates from the training data distribution. The model is deployed on Vertex AI Endpoints. Which divergence metric should they use to compare the training and serving distributions?
Kullback-Leibler divergence
Population Stability Index (PSI)
Jensen-Shannon divergence
JS divergence is the recommended metric for detecting distribution skew in Vertex AI Model Monitoring.
Chi-squared test
A team is monitoring a model on Vertex AI Endpoints and wants to track the p99 latency of online predictions. Which approach should they use to set up latency monitoring and alerting?
Enable Vertex AI Model Monitoring and select 'latency' as a metric
Enable Vertex AI Explainable AI to output latency statistics
Configure Cloud Monitoring to scrape Prometheus metrics from the endpoint
Use Cloud Logging to create log-based metrics from prediction logs and set up alerts in Cloud Monitoring
Prediction logs contain latency information; log-based metrics can capture p99 and other percentiles.
An ML team wants to automatically retrain a model when data drift is detected. They have set up a Cloud Monitoring alert on drift. What service should they use to trigger a retraining pipeline in response to the alert?
Cloud Functions
Cloud Functions can subscribe to Pub/Sub and trigger Vertex AI Pipelines, enabling automated retraining.
Cloud Scheduler
Vertex AI Feature Store
Vertex AI Model Monitoring
Want more Monitoring ML Solutions practice?
Practice this domain13% of exam · 6 sample questions below
A retail company wants to predict customer churn using historical purchase data stored in BigQuery. The data includes customer demographics, transaction history, and support interactions. The team is comfortable writing SQL and wants to avoid moving data to a separate environment. Which approach should they take?
Use the Cloud Natural Language API to analyze customer support interactions and combine results with purchase data in BigQuery.
Export the data to a CSV file and use Vertex AI AutoML Tables to train a classification model.
Use BigQuery ML to create a logistic regression model (LOGISTIC_REG) on the data directly in BigQuery.
BigQuery ML supports logistic regression for binary classification and runs entirely in BigQuery using SQL.
Create a Dataflow pipeline to stream data to Cloud SQL and use Cloud SQL's built-in ML functions.
A data scientist needs to train a time-series forecasting model on historical sales data stored in BigQuery to predict future demand. The data has strong seasonal patterns. Which BigQuery ML model type should they use?
MATRIX_FACTORIZATION
BOOSTED_TREE_REGRESSOR
ARIMA_PLUS
ARIMA_PLUS is the correct model for time-series forecasting in BigQuery ML.
K_MEANS
A healthcare provider needs to extract structured information from incoming PDF forms (e.g., patient intake forms). They want to automate data extraction without writing custom models. Which Google Cloud service should they use?
Document AI with a form parser processor
Document AI's form parser is designed to extract key-value pairs and tables from forms.
Natural Language API for entity extraction
Vision API
AutoML Vision for object detection
A company wants to build a product recommendation engine for their e-commerce website. They have historical purchase data and user interaction logs. They want a managed service that can quickly generate personalized recommendations without building custom models. Which service should they use?
Dataflow with TensorFlow
BigQuery ML with MATRIX_FACTORIZATION
AutoML Tables
Recommendations AI
Recommendations AI provides pre-built models for personalized recommendations, ideal for e-commerce.
A media company wants to automatically moderate user-uploaded videos by detecting explicit content (e.g., violence, adult material). They need a solution that integrates with their video processing pipeline and scales to millions of videos. Which approach should they take?
Use Video Intelligence API with explicit content detection
Video Intelligence API has built-in explicit content detection, suitable for this use case.
Use AutoML Video to train a custom explicit content detection model
Use Natural Language API on video transcripts
Use Vision API to analyze each video frame
A company wants to transcribe customer service calls in real-time to detect sentiment and identify urgent issues. They need a solution with low latency. Which combination of pre-built APIs should they use?
Text-to-Speech and Natural Language API
Speech-to-Text and Translation API
Video Intelligence API
Speech-to-Text and Natural Language API
Speech-to-Text transcribes audio, then Natural Language API performs sentiment analysis on the text.
Want more Architecting Low-Code ML Solutions practice?
Practice this domain20% of exam · 6 sample questions below
You have a TensorFlow training script that runs on a single machine. To speed up training on Vertex AI with 8 GPUs on a single machine, which strategy should you use?
tf.distribute.ParameterServerStrategy
tf.distribute.MirroredStrategy
MirroredStrategy is designed for single-machine multi-GPU synchronous training.
tf.distribute.TPUStrategy
tf.distribute.MultiWorkerMirroredStrategy
A data science team is building a feature engineering pipeline that processes large-scale data from BigQuery daily. They need to compute aggregate features and store the results in Vertex AI Feature Store for both online serving and offline training. Which Google Cloud service is best suited for this batch computation?
Cloud Composer
Dataproc
Cloud Functions
Dataflow
Dataflow (Apache Beam) is the correct choice for scalable batch processing and integrates with Feature Store.
You are fine-tuning a large language model (LLM) from Hugging Face Transformers using Vertex AI Training. The model has 7 billion parameters and does not fit into the memory of a single GPU. You need to train across multiple GPUs, splitting the model layers across devices. Which distributed training approach should you use?
Model parallelism using pipeline parallelism
Pipeline parallelism splits layers across devices, allowing large models to fit by distributing the model parameters.
Data parallelism with MultiWorkerMirroredStrategy
Mixed precision training (FP16)
Data parallelism with tf.distribute.MirroredStrategy
A company is using Vertex AI Vizier for hyperparameter tuning of a model with 5 integer hyperparameters, each with a range of 10-100. They have a budget of 50 trials and want to maximize the chance of finding the best configuration. Which Vizier algorithm should they use?
Grid search
Simulated annealing
Bayesian optimization (GP bandit)
Bayesian optimization uses a probabilistic model to select promising configurations, ideal for small budgets.
Random search
You want to use a pre-trained model from TensorFlow Hub for image classification, but you need to adapt it to classify your own custom categories with a small dataset. Which Vertex AI approach is most appropriate?
Write a custom training script that loads the pre-trained model and fine-tunes it on your dataset
Fine-tuning a pre-trained model is the standard transfer learning approach, efficient with small data.
Deploy the pre-trained model as-is via Vertex AI JumpStart
Build a custom container with the pre-trained model and deploy to Vertex AI Endpoints
Use Vertex AI AutoML for image classification
Your Vertex AI custom training job is failing with an out-of-memory error on a single GPU. You need to reduce memory usage without changing the model architecture. Which approach should you try first?
Decrease the batch size
Decreasing batch size directly reduces the memory footprint of activations and gradients, easily lowering GPU memory usage.
Implement model parallelism across GPUs
Use gradient accumulation
Enable mixed precision training (FP16)
Want more Scaling Prototypes into ML Models practice?
Practice this domain5% of exam · 6 sample questions below
A data science team uses BigQuery to store raw data and Vertex AI for model training. They want to ensure that only authorized users can access training data, and that model artifacts are automatically versioned and tracked. Which combination of Google Cloud services should they use?
Dataflow for data access control and Vertex AI Experiments for model tracking
Cloud Storage with bucket-level IAM and Cloud Build for versioning
Cloud Composer for data access control and Cloud Source Repositories for model versioning
Vertex AI Feature Store with access control and Vertex AI ML Metadata for model versioning
Vertex AI Feature Store provides controlled access to features, and ML Metadata tracks model artifacts and versions.
An ML team uses Vertex AI Pipelines to automate model retraining. The pipeline includes a step that queries BigQuery to create a training dataset. The team notices that the pipeline fails intermittently with a '403 Exceeded rate limits' error. What is the most likely cause and solution?
The pipeline is issuing too many concurrent queries; use a BigQuery reservation to guarantee slot capacity
Reservations provide dedicated slots, avoiding API rate limits.
The training dataset is too large; partition the table and query only the latest partition
The pipeline step timeout is too short; increase the timeout to 30 minutes
The SQL query is inefficient; rewrite it using materialized views
A company stores training data in Cloud Storage and uses Vertex AI Training for model training. They want to implement a data validation pipeline to detect data drift before retraining. Which service should they use?
Vertex AI Model Monitoring
Vertex AI Model Monitoring can detect data drift by comparing distributions.
BigQuery ML
Cloud Data Loss Prevention
Dataflow
A team uses Vertex AI Feature Store to serve features for real-time predictions. They notice that feature values are frequently updated from multiple source systems, leading to inconsistencies. They need to ensure that feature values are consistent across all serving endpoints. What should they do?
Use batch ingestion with weekly updates to reduce update frequency
Increase the offline storage TTL to retain historical feature values
Implement a manual approval process for feature updates
Use a streaming ingestion pipeline with exactly-once semantics
Exactly-once streaming ensures each update is applied exactly once, maintaining consistency.
An organization uses Cloud Composer to orchestrate ML workflows. A DAG that triggers Vertex AI training jobs fails because the training job exceeds the 7-day maximum runtime. What is the best way to handle long-running training jobs in Cloud Composer?
Increase the DAG execution timeout to 14 days in the Airflow configuration
Use Vertex AI Pipeline to manage the training job asynchronously
Vertex AI Pipeline can handle long-running jobs independently of the DAG runtime.
Refactor the training job to run on Dataflow, which supports longer runtimes
Set max_active_runs=1 in the DAG to prevent overlapping runs
A team wants to share a trained model with other teams within the organization. They need to provide access to the model artifact in Vertex AI Model Registry and ensure that only authorized teams can deploy the model. What should they do?
Grant the other teams access to the Cloud Storage bucket where the model is stored
Set the model to public in Vertex AI Model Registry
Use Cloud Key Management Service to encrypt the model and share the decryption key
Use IAM to grant the 'aiplatform.models.deploy' role to the other teams on the model resource
IAM roles provide fine-grained access control within Vertex AI.
Want more Collaborating to manage data and models practice?
Practice this domainThe PMLE exam has 60 questions and must be completed in 120 minutes. The passing score is 720/1000.
Scenario-based questions covering exam objectives with detailed answer explanations.
The exam covers 7 domains: Automating and Orchestrating ML Pipelines, Collaborating Within and Across Teams to Manage Data and Models, Serving and Scaling Models, Monitoring ML Solutions, Architecting Low-Code ML Solutions, Scaling Prototypes into ML Models, Collaborating to manage data and models. Questions are weighted by domain — higher-weight domains appear more on your actual exam.
No. These are original exam-style practice questions written against the official Google Cloud PMLE exam objectives. They are not copied from the real exam. Courseiva focuses on genuine understanding, not memorisation of braindumps.
Courseiva tracks your accuracy per domain and routes you toward weak areas automatically. Free, no account required.