Professional Machine Learning Engineer (Google Cloud) — Free Practice Questions
10 free sample questions from a bank of 295, with the correct answers and explanations. No signup required — start practising right now.
1You are building an ML model to detect anomalies in real-time sensor data. You will use Pub/Sub to handle incoming requests. You want to store the results for
analytics and visualization. How should you configure the pipeline?
1 = Dataflow, 2 = AI Platform, 3 = BigQuery
1 = DataProc, 2 = AutoML, 3 = Cloud Bigtable
1 = BigQuery, 2 = AutoML, 3 = Cloud Functions
1 = BigQuery, 2 = AI Platform, 3 = Cloud Storage
Answer: A
The short version
A — Stream with Dataflow, predict on AI Platform, store in BigQuery. That trio gives real-time Pub-Sub handling plus analytics-ready results.
Key concepts in this question
Pub-Sub ingest: buffers real-time sensor events for streaming processing
Dataflow: serverless stream and batch ETL that windows and routes sensor data
AI Platform prediction: hosts anomaly models for online serving at scale
BigQuery sink: stores scored results for visualization and SQL analytics
Why A is correct
Anomaly detection on live sensors needs a streaming pipe to the model and a warehouse for downstream BI. Dataflow connects Pub-Sub to AI Platform prediction with low ops, then BigQuery persists outputs for dashboards. Other combos mix batch, training-only, or storage services that break real-time scoring. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
B. pairs batch Dataproc with AutoML and Bigtable, missing streaming prediction plus warehouse analytics
C. starts with BigQuery as ingest, unsuitable for real-time Pub-Sub scoring flow
D. chains BigQuery to AI Platform to Storage, lacking stream processing and analytic serving
PMLE exam tip
Real-time sensor plus analytics equals Dataflow to AI Platform to BigQuery: stream, predict, analyze.
2Your organization wants to make its internal shuttle service route more efficient. The shuttles currently stop at all pick-up points across the city every 30 minutes
between 7 am and 10 am. The development team has already built an application on Google Kubernetes Engine that requires users to confirm their presence and
shuttle station one day in advance. What approach should you take?
1. Build a tree-based regression model that predicts how many passengers will be picked up at each shuttle station. 2. Dispatch an appropriately sized shuttle and provide the map with the required stops based on the prediction.
1. Build a tree-based classification model that predicts whether the shuttle should pick up passengers at each shuttle station. 2. Dispatch an available shuttle and provide the map with the required stops based on the prediction.
1. Define the optimal route as the shortest route that passes by all shuttle stations with confirmed attendance at the given time under capacity constraints. 2. Dispatch an appropriately sized shuttle and indicate the required stops on the map.
1. Build a reinforcement learning model with tree-based classification models that predict the presence of passengers at shuttle stops as agents and a reward function around a distance-based metric. 2. Dispatch an appropriately sized shuttle and provide the map with the required stops based on the simulated outcome.
Answer: C
The short version
C — Optimize the confirmed-attendance route under capacity. Shortest feasible tour serving only confirmed stops respects shuttle limits and advance bookings.
Key concepts in this question
Confirmed presence: next-day reservations turn the problem into known demand, not forecasting
Routing optimization: shortest tour covering required stations under capacity constraints
Tree and RL models: predict demand when unknown, unnecessary when attendance is confirmed
Dispatch sizing: follows routing solution rather than speculative passenger counts
Why C is correct
With users confirming station and time a day ahead, the efficient approach is combinatorial routing over confirmed points, not demand prediction. Defining optimal as shortest capacity-feasible route directly minimizes travel while honoring shuttle size. Prediction models add error where deterministic optimization suffices.
Why the others are wrong
A. forecasts counts that are already known from confirmations, adding noise
B. classifies pickup need already answered by reservations
D. builds RL agents for presence already supplied by the app
PMLE exam tip
Confirmed ridership plus shuttle capacity equals route optimization, not ML forecasting: shortest feasible tour wins.
3You were asked to investigate failures of a production line component based on sensor readings. After receiving the dataset, you discover that less than 1% of the
readings are positive examples representing failure incidents. You have tried to train several classification models, but none of them converge. How should you
resolve the class imbalance problem?
Use the class distribution to generate 10% positive examples.
Use a convolutional neural network with max pooling and softmax activation.
Downsample the data with upweighting to create a sample with 10% positive examples.
Remove negative examples until the numbers of positive and negative examples are equal.
Answer: C
The short version
C — Downsample with upweighting to 10 percent positives. That balances convergence while preserving population representation for rare failures.
Key concepts in this question
Extreme imbalance: under 1 percent positives stall gradient learning and bias to negatives
Downsampling: reduces majority size to make training tractable
Upweighting: restores statistical importance of kept examples to match reality
10 percent target: practical balance that converges without discarding all negative variety
Why C is correct
Non-converging classifiers on rare failures need fewer negatives but must not pretend the world is balanced. Downsampling to 10 percent positives plus upweighting keeps training stable while loss reflects true prevalence. Naive equalization or raw distribution either distorts or fails to fix learning. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
A. keeps the skewed distribution that already prevents convergence
B. changes architecture without addressing the underlying class ratio
D. equalizes fully, losing negative diversity and miscalibrating probabilities
PMLE exam tip
Under 1 percent positives not converging equals downsample with upweight to about 10 percent: balance for learning, weight for truth.
4You want to rebuild your ML pipeline for structured data on Google Cloud. You are using PySpark to conduct data transformations at scale, but your pipelines are
taking over 12 hours to run. To speed up development and pipeline run time, you want to use a serverless tool and SQL syntax. You have already moved your raw
data into Cloud Storage. How should you build the pipeline on Google Cloud while meeting the speed and processing requirements?
Use Data Fusionג€™s GUI to build the transformation pipelines, and then write the data into BigQuery.
Convert your PySpark into SparkSQL queries to transform the data, and then run your pipeline on Dataproc to write the data into BigQuery.
Ingest your data into Cloud SQL, convert your PySpark commands into SQL queries to transform the data, and then use federated queries from BigQuery for machine learning.
Ingest your data into BigQuery using BigQuery Load, convert your PySpark commands into BigQuery SQL queries to transform the data, and then write the transformations to a new table.
Answer: D
The short version
D — Load to BigQuery then transform with BigQuery SQL. Serverless SQL replaces 12-hour PySpark with fast scalable queries on Cloud Storage data.
Key concepts in this question
PySpark drag: 12-hour cluster jobs slow iteration for structured transforms
Serverless SQL: BigQuery scales transform without cluster care using familiar syntax
Load then SQL: ingest raw from Cloud Storage once, then iterate in warehouse
Data Fusion and Dataproc: keep GUI or Spark ops instead of pure serverless SQL speed
Why D is correct
Moving raw into BigQuery via Load and rewriting PySpark as BigQuery SQL removes cluster management and exploits columnar parallelism. That meets both serverless and SQL-syntax goals while cutting runtime. Alternatives retain Spark clusters or add extra engines without simplifying to SQL. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
A. adds GUI orchestration yet still writes through another pipeline layer
B. keeps Spark on Dataproc, preserving cluster overhead and SparkSQL limits
C. routes through Cloud SQL and federated queries, less scalable than native warehouse
PMLE exam tip
Slow PySpark plus want serverless SQL equals BigQuery Load plus BigQuery SQL: warehouse transforms, no clusters.
5You manage a team of data scientists who use a cloud-based backend system to submit training jobs. This system has become very difficult to administer, and
you want to use a managed service instead. The data scientists you work with use many different frameworks, including Keras, PyTorch, theano, Scikit-learn, and
custom libraries. What should you do?
Use the AI Platform custom containers feature to receive training jobs using any framework.
Configure Kubeflow to run on Google Kubernetes Engine and receive training jobs through TF Job.
Create a library of VM images on Compute Engine, and publish these images on a centralized repository.
Set up Slurm workload manager to receive jobs that can be scheduled to run on your cloud infrastructure.
Answer: A
The short version
A — Use AI Platform custom containers for any framework. Keras, PyTorch, theano, and custom libs all run when packaged as containers.
Key concepts in this question
Framework sprawl: many libraries beyond TensorFlow need a neutral runtime
Custom containers: let teams bring any dependencies and entrypoints to managed training
Kubeflow TF Job: favors TensorFlow workflows, heavier to run for diverse stacks
VM images and Slurm: return to self-managed ops the team wants to escape
Why A is correct
Replacing a hard-to-admin backend with managed service while keeping framework freedom points to containerized training on AI Platform. Custom containers accept any framework image while Google manages scheduling and scale. Other paths reintroduce cluster or scheduler administration. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
B. centers on TensorFlow jobs, awkward for theano and scikit plus custom code
C. publishes VM images, leaving orchestration and upkeep to the team
D. runs self-managed Slurm, opposite of the managed-service goal
PMLE exam tip
Many frameworks plus want managed equals custom containers: bring any image, let AI Platform run it.
6You work for an online retail company that is creating a visual search engine. You have set up an end-to-end ML pipeline on Google Cloud to classify whether an
image contains your company's product. Expecting the release of new products in the near future, you configured a retraining functionality in the pipeline so that
new data can be fed into your ML models. You also want to use AI Platform's continuous evaluation service to ensure that the models have high accuracy on your
test dataset. What should you do?
Keep the original test dataset unchanged even if newer products are incorporated into retraining.
Extend your test dataset with images of the newer products when they are introduced to retraining.
Replace your test dataset with images of the newer products when they are introduced to retraining.
Update your test dataset with images of the newer products when your evaluation metrics drop below a pre-decided threshold.
Answer: B
The short version
B — Extend the test set with new-product images on retraining. Continuous evaluation stays valid only when tests cover evolving classes.
Key concepts in this question
Visual search growth: new products expand the label space the model must recognize
Test staleness: old-only tests miss regressions on new items while reporting false confidence
Extension: adds new-product images while retaining old ones for backward checks
Replacement or thresholds: either forgets history or delays coverage until metrics already drop
Why B is correct
High accuracy must hold across both legacy and incoming products as retraining ingests new data. Extending the test set at introduction time ensures continuous evaluation measures true generalization. Keeping the set frozen hides new-product failures while full replacement loses regression signal. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
A. freezes tests, letting new-product errors go unevaluated
C. swaps tests, abandoning verification on original products
D. waits for metric drops before updating, reacting after user impact
PMLE exam tip
New products plus continuous evaluation equals extend tests at retrain: cover old and new, never freeze or swap.
7You need to build classification workflows over several structured datasets currently stored in BigQuery. Because you will be performing the classification several
times, you want to complete the following steps without writing code: exploratory data analysis, feature selection, model building, training, and hyperparameter
tuning and serving. What should you do?
Configure AutoML Tables to perform the classification task.
Run a BigQuery ML task to perform logistic regression for the classification.
Use AI Platform Notebooks to run the classification model with pandas library.
Use AI Platform to run the classification model job configured for hyperparameter tuning.
Answer: A
The short version
A — Configure AutoML Tables for code-free classification. It automates EDA, features, tuning, training, and serving on BigQuery data.
Key concepts in this question
No-code requirement: EDA through serving without writing pipelines
Structured BigQuery data: tabular inputs suited to automated feature and model search
AutoML Tables: handles selection, tuning, and deployment behind a UI and API
BigQuery ML and Notebooks: need SQL or Python authoring, violating the no-code goal
Why A is correct
Repeated classification over BigQuery tables with zero code calls for a fully managed AutoML service. AutoML Tables profiles data, engineers features, tunes, and serves from the console. Other options demand SQL, pandas, or job configs. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
B. requires writing logistic-regression SQL and manual iteration
C. needs pandas coding in notebooks for modeling steps
D. configures AI Platform jobs and tuning specs with code and YAML
PMLE exam tip
BigQuery tables plus no code plus repeated tuning equals AutoML Tables: point, click, deploy. Match model ops to data shape and retraining triggers for valid results.
8You work for a public transportation company and need to build a model to estimate delay times for multiple transportation routes. Predictions are served directly
to users in an app in real time. Because different seasons and population increases impact the data relevance, you will retrain the model every month. You want to
follow Google-recommended best practices. How should you configure the end-to-end architecture of the predictive model?
Configure Kubeflow Pipelines to schedule your multi-step workflow from training to deploying your model.
Use a model trained and deployed on BigQuery ML, and trigger retraining with the scheduled query feature in BigQuery.
Write a Cloud Functions script that launches a training and deploying job on AI Platform that is triggered by Cloud Scheduler.
Use Cloud Composer to programmatically schedule a Dataflow job that executes the workflow from training to deploying your model.
Answer: A
The short version
A — Schedule multi-step flow with Kubeflow Pipelines. Monthly retrain to real-time serving needs orchestrated training plus deployment.
Key concepts in this question
Monthly retraining: seasonality and growth demand automated refresh cadence
Real-time app serving: predictions must reach users with low latency after each retrain
Kubeflow Pipelines: schedules and versions end-to-end steps from training to deploy
Functions and Composer: glue jobs but lack ML-native pipeline versioning and scheduling polish
Why A is correct
Google best practice for recurring model refresh with live serving is a scheduled pipeline that trains, validates, and deploys as one versioned workflow. Kubeflow Pipelines provides that orchestration natively. Ad hoc functions or generic DAGs add custom upkeep without the same ML lifecycle integration. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
B. ties training to BigQuery ML and scheduled queries, mismatched to general app serving
C. stitches functions and scheduler manually, fragile for monthly lifecycle management
D. moves data with Dataflow via Composer, not the train-to-deploy model path
PMLE exam tip
Monthly retrain to live app equals Kubeflow Pipelines: schedule the whole train-to-deploy workflow as one.
9You are developing ML models with AI Platform for image segmentation on CT scans. You frequently update your model architectures based on the newest
available research papers, and have to rerun training on the same dataset to benchmark their performance. You want to minimize computation costs and manual
intervention while having version control for your code. What should you do?
Use Cloud Functions to identify changes to your code in Cloud Storage and trigger a retraining job.
Use the gcloud command-line tool to submit training jobs on AI Platform when you update your code.
Use Cloud Build linked with Cloud Source Repositories to trigger retraining when new code is pushed to the repository.
Create an automated workflow in Cloud Composer that runs daily and looks for changes in code in Cloud Storage using a sensor.
Answer: C
The short version
C — Trigger retraining with Cloud Build plus Source Repos. Code pushes auto-launch same-data benchmarks with version control and low ops.
Key concepts in this question
Frequent arch changes: new research ideas need rapid same-dataset comparison
Version control: ties each training run to an exact code commit
Build triggers: start AI Platform jobs automatically on push without manual CLI
Functions and Composer polling: add custom sensors or scripts instead of native source triggers
Why C is correct
Linking Cloud Source Repositories to Cloud Build creates push-triggered retraining that versions code and minimizes hand steps. Each architecture commit reproducibly benchmarks on the identical dataset. Manual gcloud or daily polling sensors cost more effort and lose commit linkage. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
A. watches object storage with functions, missing source version semantics
B. requires manual CLI submits per idea, increasing toil and inconsistency
D. polls storage daily with Composer, delayed and decoupled from commits
PMLE exam tip
New arch plus same data plus versioned cheap reruns equals Build triggers on source push.
10Your team needs to build a model that predicts whether images contain a driver's license, passport, or credit card. The data engineering team already built the
pipeline and generated a dataset composed of 10,000 images with driver's licenses, 1,000 images with passports, and 1,000 images with credit cards. You now
have to train a model with the following label map: [˜drivers_license', ˜passport', `˜credit_card']. Which loss function should you use?
Categorical hinge
Binary cross-entropy
Categorical cross-entropy
Sparse categorical cross-entropy
Answer: D
The short version
D — Use sparse categorical cross-entropy for integer labels. It handles multi-class IDs directly without one-hot memory cost on imbalanced sets.
Key concepts in this question
Label map: integer IDs for license, passport, and card across uneven counts
Imbalanced counts: 10k versus 1k each still needs proper multi-class loss, not binary
Hinge: suits SVM margins, not probabilistic multi-class image training here
Why D is correct
With 10k, 1k, and 1k images labeled as integers, sparse categorical cross-entropy computes softmax loss efficiently without expanding to one-hot. That matches the given label map and keeps memory low. Binary or hinge losses mismatch the three-way single-label task. This follows Google ML best practice to align pipeline choice with data characteristics, retraining cadence, and evaluation validity.
Why the others are wrong
A. optimizes margin separation, not calibrated three-class probabilities
B. fits two-class yes-no problems, not three mutually exclusive IDs
C. needs one-hot targets, wasteful when integer IDs are already provided
PMLE exam tip
Integer labels for three classes equals sparse categorical cross-entropy: integers in, softmax loss out.