Google

Professional Machine Learning Engineer Free Practice Questions — Page 4

Question 12

Your company's business stakeholders want to understand the factors driving customer churn to inform their business strategy. You need to build a customer churn prediction model that prioritizes simple interpretability of your model's results. You need to choose the ML framework and modeling technique that will explain which features led to the prediction. What should you do?

A. Build a TensorFlow deep neural network (DNN) model, and use SHAP values for feature importance analysis.
B. Build a PyTorch long short-term memory (LSTM) network, and use attention mechanisms for interpretability.
C. Build a logistic regression model in scikit-learn, and interpret the model's output coefficients to understand feature impact.
D. Build a linear regression model in scikit-learn, and interpret the model's standardized coefficients to understand feature impact.
Show Answer
Correct Answer: C
Explanation:
Customer churn prediction is a binary classification problem, making logistic regression an appropriate modeling technique. Logistic regression in scikit-learn is inherently interpretable because each feature has a coefficient indicating its effect on the log-odds of churn, allowing stakeholders to understand feature impact directly. Deep neural networks and LSTMs are less interpretable even with post hoc methods like SHAP or attention, and linear regression is not the appropriate model for a binary target.

Question 12

You work in the credit card fraud detection department of a bank that processes millions of transactions per day. You need to create and serve a real-time fraud detection model. To address the challenge of feature engineering at this scale with limited raw data, you plan to create time-related aggregate features, such as the average transaction amount within the last month or the amount of time since the last transaction. How should you process the data for model training and serving?

A. Ingest the transaction data into BigQuery. Use the TRANSFORM clause in BigQuery ML to create new features by applying SQL functions to the raw transaction data.
B. Create streaming Dataflow pipelines that read transaction data from Pub/Sub. Use a windowing function to aggregate transaction data over time. Store the engineered features in Agent Platform Feature Store.
C. Ingest the transaction data into BigQuery. Use a TRANSFORM_ONLY model in BigQuery ML to create a reusable feature engineering pipeline. Use this pipeline to preprocess the data.
D. Orchestrate a workflow in Agent Platform Pipelines that exports raw transaction data from BigQuery to Cloud Storage. Perform feature engineering using a Python script in a custom component in the pipeline.
Show Answer
Correct Answer: B
Explanation:
A streaming Dataflow pipeline can process incoming transactions and compute time-windowed aggregates, such as recent average amounts or time since the prior transaction. Store the resulting features in the Feature Store so they can be retrieved for low-latency online predictions and used consistently for training.

Question 13

You are creating a retraining policy for a customer churn prediction model deployed in Vertex AI. New training data is added weekly. You want to implement a model retraining process that minimizes cost and effort. What should you do?

A. Retrain the model when a significant shift in the distribution of customer attributes is detected in the production data compared to the training data.
B. Retrain the model when the model's latency increases by 10% due to increased traffic.
C. Retrain the model when the model accuracy drops by 10% on the new training dataset.
D. Retrain the model every week when new training data is available.
Show Answer
Correct Answer: A
Explanation:
Retraining should be triggered based on evidence that the production data no longer matches the training data (data drift/skew), rather than on a fixed schedule or infrastructure metrics. Detecting a significant distribution shift is a standard, cost-effective trigger in Vertex AI because it retrains only when needed. Increased latency is unrelated to model quality, weekly retraining can waste resources, and evaluating accuracy on newly collected training data is not the preferred production trigger compared with monitoring for drift.

Question 13

You are part of a team of ML engineers building a new churn prediction model using PyTorch. Your team’s raw data is stored in BigQuery. For the initial prototyping phase, your team needs a collaborative, cloud-based environment that meets the following criteria: • It must provide access to GPU accelerators. • It must allow seamless authentication to BigQuery without manual management of service account keys. • It must be pre-configured with common ML frameworks. You need to choose the most secure solution with the least setup overhead for your team to begin model development and experimentation. What should you do?

A. Configure a JupyterHub server on a cluster of Compute Engine instances. Install the necessary GPU drivers and other required libraries on each instance. Instruct each team member to create and download a service account key for BigQuery access.
B. Package the PyTorch model code in a Docker container, and upload it to Artifact Registry. Use Agent Platform Serverless Training to run a custom training job that runs on a GPU-enabled machine type. Instruct the team to analyze the training logs to iterate on the model.
C. Instruct team members to use the free version of Agent Platform Colab Enterprise. Use the Agent Platform SDK for Python to load the data into a shared Agent Platform Colab Enterprise notebook. Have each member perform analysis in the shared notebook.
D. Create Agent Platform Workbench instances for your team members. Select instance types with attached GPUs and the preinstalled PyTorch kernel. Use the BigQuery client library to access the data, and use the instances’ managed identity for authentication.
Show Answer
Correct Answer: D
Explanation:
Vertex AI Workbench provides managed notebook instances with GPU-capable machine types and preinstalled ML environments such as PyTorch. The BigQuery client library can authenticate through the instance’s attached service account, avoiding manually managed service-account keys. This offers lower setup overhead for interactive model prototyping than building and maintaining JupyterHub infrastructure or using a training-job service.

Question 14

You are a lead ML architect at a small company that is migrating from on-premises to Google Cloud. Your company has limited resources and expertise in cloud infrastructure. You want to serve your models from Google Cloud as soon as possible. You want to use a scalable, reliable, and cost-effective solution that requires no additional resources. What should you do?

A. Configure Compute Engine VMs to host your models.
B. Create a Cloud Run function to deploy your models as serverless functions.
C. Create a managed cluster on Google Kubernetes Engine (GKE), and deploy your models as containers.
D. Deploy your models on Vertex AI endpoints.
Show Answer
Correct Answer: D
Explanation:
Vertex AI endpoints provide a fully managed model serving platform with autoscaling, high availability, and minimal infrastructure management. This best fits a small team seeking a scalable, reliable, and cost-effective solution that requires no additional cloud infrastructure expertise. Compute Engine, Cloud Run, and GKE all require more deployment and infrastructure management.

Question 14

You are responsible for managing the recommendation engine on an ecommerce website. The current model is deployed on a public Agent Platform endpoint and is actively serving production traffic. You have developed an updated version of the model and registered the model in Model Registry. You need to perform an A/B test to compare the new model’s performance to the current model. You plan to implement a traffic split, routing 10% of all incoming production requests to the new model and sending the remaining 90% to the current model. You want this transition to be transparent, and require no modifications to the client application that calls the endpoint. What should you do?

A. Deploy the new model to a serverless Cloud Run service. Implement logic in the client application that routes 10% of user requests to the Cloud Run service and the rest to the original endpoint.
B. Deploy the new model to the Agent Platform endpoint where the current model is deployed. Configure the endpoint’s traffic split to allocate 10% of user requests to the new model.
C. Create two separate Agent Platform Pipelines, one for each model version. Use Agent Platform Experiments to run both pipelines simultaneously. Configure the experiment to send 10% of user requests to the new model’s pipeline and the rest to the production model’s pipeline.
D. Deploy the new model to a new Agent Platform endpoint. Configure Cloud Load Balancing to send 10% of user requests to the new endpoint and the rest to the original endpoint.
Show Answer
Correct Answer: B
Explanation:
Deploy the new model to the existing endpoint and configure the endpoint’s traffic split to send 10% of requests to the new model and 90% to the current model. The endpoint handles the routing, so the client application does not need to change.

Question 15

You work at an organization that manages a popular payment app. You built a fraudulent transaction detection model by using scikit-learn and deployed it to a Vertex AI endpoint. The endpoint is currently using 1 e2-standard-2 machine with 2 vCPUs and 8 GB of memory. You discover that traffic on the gateway fluctuates to four times more than the endpoint's capacity. You need to address this issue by using the most cost-effective approach. What should you do?

A. Re-deploy the model with a TPU accelerator.
B. Change the machine type to e2-highcpu-32 with 32 vCPUs and 32 GB of memory.
C. Set up a monitoring job and an alert for CPU usage. If you receive an alert, scale the vCPUs as needed.
D. Increase the number of maximum replicas to 6 nodes, each with 1 e2-standard-2 machine.
Show Answer
Correct Answer: D
Explanation:
The endpoint experiences fluctuating traffic up to four times its current capacity. The most cost-effective solution is to use Vertex AI's horizontal autoscaling by increasing the maximum number of replicas while keeping the same machine type. This allows the service to scale out during traffic spikes and scale back down when demand decreases. TPUs are not appropriate for a scikit-learn model, switching to a much larger machine is unnecessary and more expensive for variable workloads, and relying on monitoring plus manual scaling does not proactively address fluctuating demand.

Question 15

You are developing an AI text generator that will be able to dynamically adapt its generated responses to mirror the writing style of the user and mimic famous authors if their style is detected. You have a large dataset of various authors’ works, and you plan to host the model on a custom VM. You want to use the most effective model. What should you do?

A. Fine-tune the latest Llama model from Model Garden on Agent Platform Serverless Training.
B. Use the latest Gemini Flash foundational model.
C. Deploy the latest Llama model from Model Garden, and use prompt engineering.
D. Fine-tune a BERT-based model from Hugging Face.
Show Answer
Correct Answer: A
Explanation:
Fine-tuning a generative Llama model on the authors’ works can teach it to reproduce a range of writing styles more consistently than prompt engineering alone. BERT is primarily designed for language understanding, not open-ended text generation, and an untuned Gemini model would not learn the styles from the provided dataset.

Question 16

You have created multiple versions of an ML model and have imported them to Vertex AI Model Registry. You want to perform A/B testing to identify the best performing model using the simplest approach. What should you do?

A. Split incoming traffic to distribute prediction requests among the versions. Monitor the performance of each version using Vertex AI's built-in monitoring tools.
B. Split incoming traffic among Google Kubernetes Engine (GKE) clusters, and use Traffic Director to distribute prediction requests to different versions. Monitor the performance of each version using Cloud Monitoring.
C. Split incoming traffic to distribute prediction requests among the versions. Monitor the performance of each version using Looker Studio dashboards that compare logged data for each version.
D. Split incoming traffic among separate Cloud Run instances of deployed models. Monitor the performance of each version using Cloud Monitoring.
Show Answer
Correct Answer: A
Explanation:
Vertex AI supports traffic splitting across deployed model versions/endpoints for A/B testing, making it the simplest managed approach. You can route a percentage of prediction traffic to each model version and use Vertex AI's built-in monitoring capabilities to evaluate performance. The other options introduce additional infrastructure (GKE, Cloud Run) or extra dashboarding work (Looker Studio), making them less simple.

Question 16

You are the lead ML engineer for a large ecommerce company. The Data Analytics team has prepared a dataset of 50 million transaction rows, which is stored in a partitioned BigQuery table. The team consists primarily of SQL experts with limited experience in Python or TensorFlow. You need to build a binary classification model to predict the likelihood of a customer making a purchase in the next seven days. You need to provide daily batch predictions. You need to minimize development effort, data movement, and the overall complexity of the solution. What should you do?

A. Create a model with BigQuery ML that includes the MODEL_TYPE=AUTOML_CLASSIFIER settings. Use the ML.PREDICT function to generate predictions as part of your nightly data warehouse jobs.
B. Use the BigQuery ML TRANSFORM function to normalize and scale numerical features, one-hot encode categorical features, and train a MODEL_TYPE=LOGISTIC_REG mode. Use the ML.PREDICT function to generate predictions as part of your nightly data warehouse jobs.
C. Train a classification model with Agent Platform AutoML Tabular Workflows, deploy the trained model to an Agent Platform endpoint, and add a nightly Cloud Run job to trigger batch predictions.
D. Develop an XGBoost model on an Agent Platform Workbench notebook. Load the data into a pandas DataFrame, and pickle it to a Cloud Storage bucket. Create another notebook that loads the pickled model from Cloud Storage and saves predictions back to Cloud Storage. Schedule this notebook for nightly execution.
Show Answer
Correct Answer: A
Explanation:
BigQuery ML AutoML classification can train directly on the partitioned BigQuery table, avoiding data movement and minimizing custom modeling work for a SQL-focused team. Use ML.PREDICT in the nightly warehouse job to generate batch predictions. The other options add manual preprocessing or extra Python and serving infrastructure.

$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.