Professional Machine Learning Engineer Free Practice Questions
This is the free Google Professional Machine Learning Engineer practice question bank —
190 of 367 total questions, each with a full explanation, free to
read with no signup required. Updated 2026-10-13.
Every answer is verified against official Google documentation —
see our methodology.
Question 1
You have developed an application that uses a chain of multiple scikit-learn models to predict the optimal price for your company’s products. The workflow logic is shown in the diagram. Members of your team use the individual models in other solution workflows. You want to deploy this workflow while ensuring version control for each individual model and the overall workflow. Your application needs to be able to scale down to zero. You want to minimize the compute resource utilization and the manual effort required to manage this solution. What should you do?
A. Expose each individual model as an endpoint in Vertex AI Endpoints. Create a custom container endpoint to orchestrate the workflow.
B. Create a custom container endpoint for the workflow that loads each model’s individual files Track the versions of each individual model in BigQuery.
C. Expose each individual model as an endpoint in Vertex AI Endpoints. Use Cloud Run to orchestrate the workflow.
D. Load each model’s individual files into Cloud Run. Use Cloud Run to orchestrate the workflow. Track the versions of each individual model in BigQuery.
Show Answer
Correct Answer: C
Explanation: Deploy each reusable model to Vertex AI so its model versions can be managed independently. Use Cloud Run to orchestrate the workflow: Cloud Run revisions provide versioning for the overall workflow, and Cloud Run can scale to zero when it is idle. This avoids maintaining an always-on orchestration endpoint and minimizes management effort.
Question 1
You are an AI architect at a popular photo sharing social media platform. Your organization's content moderation team currently scans images uploaded by users and removes explicit images manually. You want to implement an AI service to automatically prevent users from uploading explicit images. What should you do?
A. Train an image clustering model by using TensorFlow in a Vertex AI Workbench instance. Deploy this model to a Vertex AI endpoint and configure it for online inference. Run this model each time a new image is uploaded to identify and block inappropriate uploads.
B. Develop a custom TensorFlow model in a Vertex AI Workbench instance. Train the model on a dataset of manually labeled images. Deploy the model to a Vertex AI endpoint. Run periodic batch inference to identify inappropriate uploads and report them to the content moderation team.
C. Create a dataset using manually labeled images. Ingest this dataset into AutoML. Train an image classification model and deploy into a Vertex AI endpoint. Integrate this endpoint with the image upload process to identify and block inappropriate uploads. Monitor predictions and periodically retrain the model.
D. Send a copy of every user-uploaded image to a Cloud Storage bucket. Configure a Cloud Run function that triggers the Cloud Vision API to detect explicit content each time a new image is uploaded. Report the classifications to the content moderation team for review.
Show Answer
Correct Answer: C
Explanation: The requirement is to prevent explicit images from being uploaded, which requires real-time online inference integrated into the upload path. Image clustering is an unsupervised technique and is not appropriate for explicit-content classification. Batch inference cannot prevent uploads because it runs after the fact. Using AutoML image classification with a manually labeled dataset, deploying the model to a Vertex AI endpoint, integrating it into the upload flow, and periodically retraining based on monitored predictions matches the stated requirements.
Question 1
You want to migrate a scikit-learn classifier model to TensorFlow. You plan to train the TensorFlow classifier model using the same training set that was used to train the scikit-learn model, and then compare the performances using a common test set. You want to use the Vertex AI Python SDK to manually log the evaluation metrics of each model and compare them based on their F1 scores and confusion matrices. How should you log the metrics?
A. Use the aiplatform.log_classification_metrics function to log the F1 score, and use the aiplatform.log_metrics function to log the confusion matrix.
B. Use the aiplatform.log_classification_metrics function to log the F1 score and the confusion matrix.
C. Use the aiplatform.log_metrics function to log the F1 score and the confusion matrix.
D. Use the aiplatform.log_metrics function to log the F1 score: and use the aiplatform.log_classification_metrics function to log the confusion matrix.
Show Answer
Correct Answer: D
Explanation: Log the numeric F1 score with `aiplatform.log_metrics`. Use `aiplatform.log_classification_metrics` to log the confusion matrix, which has a classification-specific structured format.
Question 1
You are using generative AI to build a conversational agent to support bank customers’ inquiries about their product base and transaction history. You must ensure that the agent does not include personally identifiable information (PII) in its responses. You want to implement this requirement with minimal effort. What should you do?
A. Configure the safety_settings thresholds within the Agent Platform model parameters to Block_Most.
B. Develop a post-processing wrapper using Python’s re module with patterns r'\b(?:\d{4}[- ]?){3}\d{4}\b' to identify and redact credit card numbers.
C. Implement Model Armor with Sensitive Data Protection to detect and redact PII from the agent’s responses.
D. Use sampled Shapley (SHAP) values to understand the model’s predictions and ensure that it is not biased toward revealing PII.
Show Answer
Correct Answer: C
Explanation: Use Model Armor with Sensitive Data Protection to detect and redact PII in the agent’s responses. This managed approach requires less custom development than writing and maintaining regex-based filters. Safety thresholds and SHAP values do not reliably prevent PII disclosure.
Question 2
You have recently developed a new ML model in a Jupyter notebook. You want to establish a reliable and repeatable model training process that tracks the versions and lineage of your model artifacts. You plan to retrain your model weekly. How should you operationalize your training process?
A. 1. Create an instance of the CustomTrainingJob class with the Vertex AI SDK to train your model. 2. Using the Notebooks API, create a scheduled execution to run the training code weekly.
B. 1. Create an instance of the CustomJob class with the Vertex AI SDK to train your model. 2. Use the Metadata API to register your model as a model artifact. 3. Using the Notebooks API, create a scheduled execution to run the training code weekly.
C. 1. Create a managed pipeline in Vertex AI Pipelines to train your model by using a Vertex AI CustomTrainingJobOp component. 2. Use the ModelUploadOp component to upload your model to Vertex AI Model Registry. 3. Use Cloud Scheduler and Cloud Run functions to run the Vertex AI pipeline weekly.
D. 1. Create a managed pipeline in Vertex AI Pipelines to train your model using a Vertex AI HyperParameterTuningJobRunOp component. 2. Use the ModelUploadOp component to upload your model to Vertex AI Model Registry. 3. Use Cloud Scheduler and Cloud Run functions to run the Vertex AI pipeline weekly.
Show Answer
Correct Answer: C
Explanation: Vertex AI Pipelines provides a reliable, repeatable training workflow with automatic metadata and lineage tracking. Using CustomTrainingJobOp encapsulates the training step, ModelUploadOp registers the resulting model in Vertex AI Model Registry for versioning, and scheduling the pipeline weekly with Cloud Scheduler invoking a Cloud Run function provides recurring retraining. Hyperparameter tuning is not a stated requirement, making the tuning job option unnecessary. Notebook scheduling and standalone custom jobs do not provide the same operational robustness and lineage management as managed pipelines.
Question 2
You developed a Vertex AI pipeline that trains a classification model on data stored in a large BigQuery table. The pipeline has four steps, where each step is created by a Python function that uses the KubeFlow v2 API. The components have the following names:
You launch your Vertex AI pipeline as the following:
You perform many model iterations by adjusting the code and parameters of the training step. You observe high costs associated with the development, particularly the data export and preprocessing steps. You need to reduce model development costs. What should you do?
A. Change the components’ YAML filenames to export.yaml, preprocess,yaml, f "train- {dt}.yaml", f"calibrate-{dt).vaml".
B. Add the {"kubeflow.v1.caching": True} parameter to the set of params provided to your PipelineJob.
C. Move the first step of your pipeline to a separate step, and provide a cached path to Cloud Storage as an input to the main pipeline.
D. Change the name of the pipeline to f"my-awesome-pipeline-{dt}".
Show Answer
Correct Answer: A
Explanation: Caching is already enabled with `enable_caching=True`. The timestamped component YAML filenames make the export and preprocessing component definitions change between iterations, preventing their cached results from being reused. Give those expensive components stable filenames; the training and calibration components can remain iteration-specific.
Question 2
You work for a media company. You are developing a solution that requires transcription and diarizing (speaker identification) of live audio streams in near real-time. You are using an optimized WhisperX model built on the PyTorch framework that uses several libraries and weights sourced from the Hugging Face Hub. The deployment must include proprietary Python post-processing logic including speaker diarization and alignment correction that executes immediately after model inference.
You need your solution to be efficient, scalable, handle high throughput, and minimize serving latency. How should you deploy this model and its required logic?
A. Deploy the WhisperX model artifacts to an Agent Platform endpoint using a pre-built PyTorch serving container configured with a GPU. Host the custom post-processing scripts in a Cloud Run function that receives the endpoint’s prediction output and performs the final diarization.
B. Use a self-managed Google Kubernetes Engine (GKE) cluster for deployment. Package the model and logic into a container, and configure the cluster’s horizontal pod autoscaler (HPA) to manage throughput.
C. Package the WhisperX model artifacts, the specific Python post-processing scripts, and the necessary dependencies (including Hugging Face libraries) into a single, custom serving container image. Deploy this custom image to a GPU-enabled Agent Platform endpoint.
D. Locate the WhisperX model in the Model Garden and use the “1-click deploy” feature to deploy it to an Agent Platform endpoint. Route the output to a Dataflow pipeline that uses a custom DoFn function to handle the post-processing and logging.
Show Answer
Correct Answer: C
Explanation: Package the WhisperX artifacts, Hugging Face dependencies, and proprietary post-processing logic in one custom serving container, then deploy it to a GPU-enabled Agent Platform endpoint. Keeping inference and post-processing together avoids extra network hops and helps minimize latency, while the endpoint can scale to handle throughput.
Question 3
You are a SQL analyst. You need to utilize a TensorFlow customer segmentation model stored In Cloud Storage. You want to use the simplest and most efficient approach. What should you do?
A. Import the model into Vertex AI Model Registry. Deploy the model to a Vertex AI endpoint, and use SQL for inference in BigQuery.
B. Deploy the model by using TensorFlow Serving, and call for inference from BigQuery.
C. Convert the model into a BigQuery ML model, and use SQL for inference.
D. Import the model into BigQuery, and use SQL for inference.
Show Answer
Correct Answer: C
Explanation: The simplest approach is to import the TensorFlow SavedModel from Cloud Storage into BigQuery ML using the CREATE MODEL statement, creating an imported BigQuery ML model. You then run inference directly in SQL with ML.PREDICT. Option D is imprecise because there is no standalone feature to 'import into BigQuery' outside the BigQuery ML import process.
Sources:
https://cloud.google.com/bigquery/docs/making-predictions-with-imported-tensorflow-models
Question 3
You have trained a DNN regressor with TensorFlow to predict housing prices using a set of predictive features. Your default precision is tf.float64, and you use a standard TensorFlow estimator:
Your model performs well, but just before deploying it to production, you discover that your current serving latency is 10ms @ 90 percentile and you currently serve on CPUs. Your production requirements expect a model latency of 8ms @ 90 percentile. You're willing to accept a small decrease in performance in order to reach the latency requirement.
Therefore your plan is to improve latency while evaluating how much the model's prediction decreases. What should you first try to quickly lower the serving latency?
A. Switch from CPU to GPU serving.
B. Apply quantization to your SavedModel by reducing the floating point precision to tf.float16.
C. Increase the dropout rate to 0.8 and retrain your model.
D. Increase the dropout rate to 0.8 in _PREDICT mode by adjusting the TensorFlow Serving parameters.
Show Answer
Correct Answer: B
Explanation: Try reducing the model’s numeric precision first: lower-precision inference can reduce computation and potentially improve latency, while letting you measure any prediction-quality loss. Increasing dropout does not lower inference latency because dropout is inactive during prediction; switching to a GPU is a hardware change, not a precision-versus-quality tradeoff.
Question 3
You deployed a conversational application that uses Gemini. You recently collected thousands of rows of user feedback about the verbosity and accuracy of the model’s responses. The feedback indicated that the responses are factually correct but users want different levels of verbosity depending on the type of question. You need to adjust the model to return responses that are more consistent with users’ expectations. You want to use a scalable solution and minimize application maintenance. What should you do?
A. Experiment with other models in Model Garden. Perform A/B testing by setting each model as your application’s default model. Choose a model based on the results.
B. Ask users to indicate all scenarios where they expect concise responses versus verbose responses. Modify the application’s prompt to include these scenarios and their respective verbosity levels. Re-evaluate the verbosity of responses with updated prompts.
C. Implement a keyword-based routing layer. If the user’s input contains the words “detailed” or “description,” return a verbose response. If the user’s input contains the word “fact,” re-prompt Gemini to summarize the response and return a concise response.
D. Ask users to provide examples of responses with the appropriate verbosity as a list of question and answer pairs. Use this dataset to perform supervised fine-tuning (SFT) in Agent Platform. Re-evaluate the verbosity of responses with the tuned version.
Show Answer
Correct Answer: D
Explanation: Use supervised fine-tuning with representative question-and-answer examples that demonstrate the desired verbosity for different question types. This teaches Gemini the response patterns directly and can improve consistency at scale without adding keyword-based routing or extensive application prompt logic.
$19
Get all 367 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.