A newly deployed model's online accuracy appears lower than in offline evaluation. The ML engineer suspects that the serving-side feature pipeline computes some features differently from the training pipeline. The training dataset is available in BigQuery, and ground-truth labels will not arrive for several weeks.
Which monitoring configuration best detects this issue?
Feature drift detection that compares recent serving windows with earlier windows of serving traffic.
Training-serving skew detection that compares serving feature distributions with the training data.
Performance monitoring that compares predictions with ground-truth labels as the labels are collected.
Cloud Monitoring alerts on endpoint latency and error rate for traffic sent to the deployed model.
B
Training-serving skew detection compares production inputs with the training data baseline, so a feature computed differently at serving time shows up immediately. Drift detection compares serving windows with each other, so a bug present since deployment appears in every window and causes no change. Label-based performance monitoring waits weeks for labels, and latency and error alerts measure availability, not feature correctness.
Monitoring AI solutions
25
Select One
A bank serves an XGBoost credit-decision model through Agent Platform online inference. Regulators require a feature attribution for every online prediction. The bank also wants an alert when the features that drive predictions in production change significantly over time.
Which TWO actions should the ML engineer take?
Configure the model's explanation spec to use the integrated gradients feature attribution method.
Configure the model's explanation spec to use the sampled Shapley method for feature attributions.
Enable feature attribution drift detection in Model Monitoring for the model's deployed endpoint.
Enable training-serving skew detection on raw input feature values in Model Monitoring instead.
B
Sampled Shapley works for non-differentiable models such as gradient-boosted trees. Configuring it in the model's explanation spec returns attributions with each online prediction and enables feature attribution drift detection in Model Monitoring. Integrated gradients requires a differentiable model, and skew detection on raw feature values does not track how attributions change.
Monitoring AI solutions
24
Select Two
C
A company runs several customer-facing applications built on Gemini and on third-party models. Security wants one centrally configured control that screens user prompts for prompt injection and jailbreak attempts, and screens model responses for sensitive data, such as payment card numbers, before they reach users.
What should the ML engineer use?
Gemini safety settings with the dangerous-content threshold set to block low and above for every request.
A system instruction in each application that tells the model to refuse injected instructions and card data.
Regular expressions in each application that remove card-number patterns from prompts and from responses.
Model Armor templates that enable prompt injection and jailbreak detection and Sensitive Data Protection.
D
Model Armor is model-agnostic. One centrally managed template screens prompts for prompt injection and jailbreak attempts and screens responses with Sensitive Data Protection, for Gemini and third-party models alike. Gemini safety settings apply only to Gemini and cover harm categories, not injection or card numbers. System instructions can be overridden by injected prompts, and per-app regex is not central and does not detect injection.
Monitoring AI solutions
23
Select One
Labels for a payment-fraud model (chargebacks) arrive 60 to 90 days after each transaction. Fraud patterns change at unpredictable times, and each retraining run is expensive. The team wants an early signal of likely degradation and wants to retrain only when there is evidence that retraining is needed.
Which retraining policy should the ML engineer adopt?
Retrain every day on the most recent labeled data, regardless of whether model performance has changed.
Retrain only after accuracy measured on newly labeled transactions falls below a fixed minimum threshold.
Monitor feature and prediction drift, and run the retraining pipeline when drift exceeds a threshold.
Retrain on a fixed quarterly schedule aligned with the arrival of each quarter's chargeback labels.
C
Feature and prediction drift can be measured without labels, so it gives an early warning long before chargebacks arrive, and retraining runs only when drift crosses a threshold. A retraining pipeline should still evaluate the new model before deployment, because drift does not always mean degradation. Daily retraining wastes the expensive runs, waiting for labels detects problems 60 to 90 days late, and a fixed quarterly schedule ignores unpredictable shifts.
Automating and orchestrating ML pipelines
22
Select One
A team keeps its pipeline code in a Git repository. Changes merged to the main branch must rebuild component images, run unit tests, and publish a compiled pipeline template. Separately, the pipeline must run as soon as an upstream job finalizes each month's training data, which can happen on any day in the first week of the month.
Which TWO components should the ML engineer implement?
A Cloud Build trigger on main that builds images, runs tests, and uploads the compiled template.
A Cloud Scheduler job that runs the pipeline on the eighth day of each month, after the data is final.
A Pub/Sub message from the upstream job that invokes a Cloud Run function to submit a templated run.
A first pipeline step that clones the repository and recompiles the pipeline in each run.
A
A Cloud Build trigger on main provides CI: it builds images, runs tests, and publishes the compiled template, for example to an Artifact Registry Kubeflow Pipelines repository. An event published when the data is finalized starts the run immediately on whatever day that happens. A fixed day-8 schedule waits up to a week, and recompiling inside each run bypasses the CI tests.
Automating and orchestrating ML pipelines
21
Select Two
C
A TensorFlow model is trained with a Python preprocessing script that normalizes numeric inputs and builds vocabularies for categorical inputs. For serving, an application team reimplemented the same logic in Java, and production prediction quality is lower than in offline evaluation. All features are derived from the raw request payload at request time.
What should the ML engineer do to prevent this problem from recurring?
Publish the preprocessing logic as a shared specification, and add unit tests to the Python and Java code.
Implement the transformations with TensorFlow Transform and export them as part of the serving model.
Store all features in Agent Platform Feature Store, and have the application read them for each request.
Enable training-serving skew detection so the team is alerted when serving inputs diverge from training.
B
TensorFlow Transform computes statistics such as normalization values and vocabularies in a full pass at training time, then exports them as a graph attached to the serving model, so serving applies exactly the same transformations with no second implementation. A shared specification still leaves two implementations that can drift apart, Feature Store serves precomputed features but these features come from the request payload, and skew detection reports the problem rather than preventing it.
Automating and orchestrating ML pipelines
20
Select One
A weekly Agent Platform Pipelines run retrains and redeploys a model. Last month, an upstream change silently converted a numeric column to strings, and the pipeline deployed a worse model. The team wants the run to stop before training when incoming data violates the expected schema, and to deploy only when the new model outperforms the production model.
Which TWO changes should the ML engineer make?
Enable Model Monitoring on the endpoint to detect skew after each newly trained model is deployed.
Add a data validation step that checks statistics against a curated schema and fails on anomalies.
Configure retries on the training step so that transient data problems are resolved by rerunning it.
Add a conditional step that compares new and production model metrics on the same evaluation set.
B
A validation step, for example TensorFlow Data Validation against a curated schema, fails the run before training when a type changes, and a conditional step deploys only when the new model beats production on the same evaluation set. Model Monitoring acts only after deployment, and retries rerun the same bad data.
Automating and orchestrating ML pipelines
19
Select Two
D
A newly formed ML team needs to orchestrate training workflows that pass datasets, models, and metrics between steps. The team wants artifact lineage to be recorded automatically, wants to pay only while workflows run, and does not want to manage clusters or long-running orchestration environments.
Which orchestration option should the team use?
Agent Platform Pipelines, running pipeline definitions written with the Kubeflow Pipelines SDK.
A Managed Service for Apache Airflow environment with DAGs that call platform training operators.
Kubeflow Pipelines installed on a GKE Autopilot cluster with an in-cluster metadata database.
Workflows that call the training and deployment APIs in sequence and write their outputs to logs.
A
Agent Platform Pipelines runs Kubeflow Pipelines definitions serverlessly, bills per run, and records artifacts and lineage automatically in ML Metadata. A managed Airflow environment runs continuously and does not record ML artifact lineage on its own, Kubeflow on GKE requires running a cluster, and Workflows sequences API calls but has no artifact lineage model.
Automating and orchestrating ML pipelines
18
Select One
A company serves 35 low-traffic TensorFlow models, each deployed to its own Agent Platform endpoint on one dedicated node. All models use the same prebuilt TensorFlow inference container image and framework version, and most nodes run below 5% utilization. The company wants to reduce serving cost as much as possible while keeping each model independently deployable.
What should the ML engineer do?
Deploy all 35 models to one shared endpoint so that the deployed models run on the endpoint's nodes.
Combine all 35 models into one custom container that routes each request to a model by its name.
Create a deployment resource pool and deploy the models into it so that they share the same VMs.
Move each endpoint to the smallest machine type and set each endpoint's maximum replica count to 1.
C
A deployment resource pool co-hosts many models on shared VMs, and each model is still deployed and undeployed independently. The stated requirement, the same prebuilt TensorFlow container image and framework version, is met. Deploying many models to one endpoint does not share nodes, because each deployed model gets its own compute. A combined container loses independent deployability, and smaller machines still leave 35 always-on nodes.
Serving and scaling models
17
Select One
Client applications in VPC networks in three separate projects must call an Agent Platform online inference endpoint. Security policy prohibits VPC Network Peering, and the model must not be reachable through a public endpoint.
What should the ML engineer do?
Deploy the model to a public endpoint and restrict which identities can call it by using IAM role bindings.
Deploy the model to a private endpoint that uses VPC Network Peering with each client VPC network.
Deploy the model to a public endpoint and route all client traffic through Cloud NAT in each VPC.
Deploy to a Private Service Connect endpoint, allowlist the client projects, and add forwarding rules.
D
A Private Service Connect endpoint exposes the model only through private forwarding rules created in each allowlisted client project's VPC, with no peering. Peering-based private endpoints are prohibited by policy, public endpoints remain reachable at a public address even with IAM restrictions, and Cloud NAT handles outbound traffic to the internet and does nothing to make the endpoint private.
Serving and scaling models
16
Select One
An internal tool uses an open-weight model from Model Garden with no custom weights or tuning. Model Garden offers the model both as a fully managed API and as weights for self-deployment. Usage is sporadic: a few hundred interactive requests on some days and none on others. The company wants to minimize cost while the tool is idle and avoid managing serving infrastructure.
Which option should the ML engineer choose?
Deploy the model to a dedicated Agent Platform endpoint with one GPU replica that stays available.
Call the model through its managed model-as-a-service API in Model Garden and pay per token used.
Deploy the model to a GKE cluster with vLLM, and scale the GPU node pool down outside business hours.
Run scheduled batch inference jobs and store generated answers for the tool to look up on request.
B
A model-as-a-service API is serverless and billed per token, so idle days cost nothing and there is no infrastructure to run. A dedicated endpoint bills node-hours even when no requests arrive, GKE with vLLM means operating the cluster, which the company wants to avoid, and batch jobs cannot answer interactive, user-specific requests.
Serving and scaling models
15
Select One
Each night, a company scores 60 million customer records stored in BigQuery with a PyTorch model. The model is packaged in a custom container that requires system-level libraries. Scores must be in BigQuery by 6:00 AM, and no application needs online predictions.
Which approach meets these requirements at the lowest cost?
Run an Agent Platform batch inference job that uses BigQuery tables for both input and output.
Deploy the model to an autoscaling online endpoint, and call the endpoint from a nightly Dataflow job.
Import the model into BigQuery ML, and run ML.PREDICT from a scheduled query in BigQuery each night.
Keep a GPU endpoint deployed with one minimum replica, and call it from a scheduled Cloud Run job.
A
A batch inference job provisions compute only for the run, supports custom containers, and reads from and writes to BigQuery directly. Online endpoints bill for deployed nodes, and the Dataflow fan-out adds a second service. BigQuery ML can import only specific model formats (such as TensorFlow, ONNX, and XGBoost), so it cannot run a custom container with system libraries. An always-on GPU endpoint pays for idle hours all day.
Serving and scaling models
14
Select One
A fraud model is served from an Agent Platform endpoint that client applications call by endpoint ID. A retrained version must receive 10% of live traffic for two weeks while the current version serves the rest. The team must be able to roll back immediately, and client applications must not change their configuration.
Which TWO actions should the ML engineer take?
Assign the default version alias to the new version so that the endpoint sends it the configured traffic.
Deploy the new version to a new endpoint and have the clients send 10% of their requests to that endpoint.
Upload the retrained model to Model Registry as a new version of the model that is already registered.
Deploy the new version to the existing endpoint, then set the endpoint's traffic split to 90/10.
C
Registering the retrained model as a new version keeps lineage in Model Registry. Deploying it to the existing endpoint with a 90/10 split keeps the endpoint ID that clients already use, and setting the split back to 100/0 rolls back immediately. Version aliases label versions for reference; they do not route endpoint traffic, and a new endpoint forces client changes.
Serving and scaling models
13
Select Two
D
A company uses a Gemini model to assign each support ticket to one of 300 internal categories whose definitions rarely change. Prompt engineering has plateaued below the accuracy target. Adding enough few-shot examples to reach the target makes each prompt too long to meet the latency budget. The team has 15,000 tickets labeled by domain experts.
What should the ML engineer do?
Retrieve the most similar labeled tickets for each request and add them to the prompt as few-shot examples.
Ground the model on a search index of the category definitions so that it can look up definitions at runtime.
Run supervised fine-tuning of the Gemini model on the labeled tickets, then serve the tuned model.
Raise the temperature, request five candidate labels per ticket, and return the most frequent label.
C
Supervised fine-tuning teaches the model the stable 300-label task from 15,000 examples, so production prompts no longer need long few-shot blocks. That addresses both the accuracy plateau and the latency budget. Retrieving similar examples still lengthens the prompt and adds a retrieval call, grounding on definitions adds latency without changing classification behavior beyond what prompting already reached, and sampling five candidates multiplies generation cost and latency.
Scaling prototypes into ML models
12
Select One
A custom training job on Agent Platform reads training files from a Cloud Storage bucket in a different project. The job fails with a 403 permission error. The engineer who submitted the job has read access to the bucket, and the job configuration does not specify a service account. The organization requires least-privilege access for workloads.
What should the engineer do?
Grant the bucket's object viewer role to the Compute Engine default service account in the training project.
Pass the engineer's OAuth access token to the training container as an environment variable at submission.
Grant the engineer the Service Account Token Creator role on the platform's default custom code service agent.
Create a user-managed service account with object viewer access to the bucket and specify it in the job.
D
When no service account is specified, custom training runs as the platform's custom code service agent, not as the submitter, so the submitter's access does not apply. A dedicated user-managed service account with only the needed role is least privilege. Granting the role to the service agent would also work, but it would give every default-identity job in the project that access. The Compute Engine default service account is not the job's identity, passing user tokens into containers is insecure, and the Token Creator role grants no bucket access.
Scaling prototypes into ML models
11
Select One
An ML engineer is configuring an Agent Platform hyperparameter tuning job that uses the default Bayesian optimization search algorithm. Each trial takes two hours, and the budget allows 40 trials. Finding the best hyperparameter configuration matters more than finishing the job quickly.
How should the engineer configure the job?
Set the maximum trial count to 40 and the parallel trial count to 40 so all trials run in a single wave.
Set the maximum trial count to 40 and keep the parallel trial count low so later trials use earlier results.
Switch to grid search over 40 combinations so that every region of the search space gets equal coverage.
Switch to random search with 40 parallel trials so that every trial result remains statistically independent.
B
Bayesian optimization chooses each new trial using completed trial results. Running trials a few at a time gives later trials more information, at the cost of longer wall-clock time, which the question accepts. Running all 40 in parallel turns the search into a single uninformed wave, and grid search and random search ignore earlier results.
Scaling prototypes into ML models
10
Select One
A team fine-tunes a 13-billion-parameter language model in PyTorch on one node with eight 80 GB GPUs, using bf16 mixed precision, the Adam optimizer, and Distributed Data Parallel. Even with a per-GPU batch size of 1, every GPU runs out of memory before the first optimizer step, because each GPU holds a full copy of the parameters, gradients, and optimizer states.
Which change most directly resolves the error?
Switch to Fully Sharded Data Parallel to shard parameters, gradients, and optimizer states across GPUs.
Add three more identical nodes and continue using Distributed Data Parallel with the same per-GPU batch.
Enable gradient accumulation over eight micro-batches while keeping the per-GPU batch size at one example.
Increase the number of data loader workers per GPU so that input batches are prepared in parallel threads.
A
FSDP shards parameters, gradients, and optimizer states across the eight GPUs, which divides per-GPU model-state memory by about eight. Distributed Data Parallel keeps a full replica on every GPU, so adding nodes does not reduce per-GPU memory. Gradient accumulation lowers activation memory per step but leaves the model state untouched, and data loader workers use CPU, not GPU memory.
Scaling prototypes into ML models
9
Select One
A team trains a PyTorch computer vision model that depends on several custom CUDA kernels written in-house. Training on CPUs is too slow, and the team cannot rewrite the kernels. The team wants to reduce training time by using Agent Platform custom training.
Which compute configuration should the ML engineer choose?
A Cloud TPU slice that runs the existing training code through PyTorch/XLA without modifying the kernels.
A memory-optimized CPU machine type with more vCPUs and a larger per-worker batch size during training.
A machine type with multiple NVIDIA GPUs, using distributed data parallel training across those GPUs.
A Cloud TPU slice, after porting the model to JAX and replacing the custom kernels with XLA operations.
C
NVIDIA GPUs run custom CUDA kernels natively, and distributed data parallel training across several GPUs shortens training time. TPUs run models compiled through XLA and cannot execute CUDA kernels, so PyTorch/XLA cannot use them unchanged. Porting to JAX violates the constraint against rewriting the kernels, and more CPUs do not fix the stated speed problem.
Scaling prototypes into ML models
8
Select One
A team must choose between two prompt templates for a Gemini application that summarizes internal incident reports. No reference summaries exist, and there is no budget to create them. The team needs a repeatable evaluation that measures whether each summary is grounded in its source report and follows a defined quality rubric.
Which evaluation approach should the ML engineer use?
Compute ROUGE-L between each summary and its source report, and select the higher-scoring template.
Compare the average token log probability of each template's outputs, and select the more confident template.
Compute BLEU between the two templates' outputs, and treat high agreement as evidence that both are reliable.
Use the gen AI evaluation service with LLM-as-a-judge metrics that score groundedness against the rubric.
D
Model-based (LLM-as-a-judge) metrics score each output against criteria such as groundedness and a custom rubric, with no reference summaries required. ROUGE against the source report measures word overlap, which rewards copying. Token log probability measures model confidence, not quality, and agreement between two templates shows they are similar, not that either is good.
Collaborating within and across teams to manage data and models
7
Select One
Data scientists use Agent Platform Workbench instances to explore regulated data in BigQuery and Cloud Storage. Security requires that data cannot be copied to Google Cloud resources outside a set of approved projects, and that notebook instances cannot reach the public internet. The notebooks must still be able to call Google Cloud APIs.
Which TWO controls should the ML engineer implement?
Place the approved projects in a VPC Service Controls perimeter that restricts BigQuery and Cloud Storage.
Encrypt the regulated BigQuery datasets and Cloud Storage buckets with customer-managed encryption keys in Cloud KMS.
Enable Data Access audit logs for BigQuery and Cloud Storage, and alert the security team on any export operations.
Create Workbench instances without external IP addresses in a subnet that has Private Google Access enabled.
A
A VPC Service Controls perimeter blocks API calls that would move data from protected services to projects outside the perimeter; adding the Agent Platform API to the perimeter extends that protection to notebook and training resources. Instances without external IPs cannot reach the internet, and Private Google Access keeps Google API access. CMEK protects data at rest but does not stop an authorized user from copying it, and audit logs only detect copies after they happen.
Collaborating within and across teams to manage data and models
6
Select Two
D
A team computes customer features every hour into BigQuery tables. An online fraud model needs these features at prediction time with low single-digit-millisecond read latency. BigQuery must remain the offline source of truth, and the team wants to avoid building and operating its own pipeline to copy features into a serving database.
What should the ML engineer do?
Register the tables in Agent Platform Feature Store and sync a feature view to an online store hourly.
Write a Dataflow job that copies each hourly snapshot into Memorystore and read features from Memorystore.
Query the BigQuery feature tables directly from the custom inference container for each prediction request.
Export hourly snapshots to Cloud Storage and load them into the inference container's memory at startup.
A
Feature Store uses BigQuery as the offline store. A feature view syncs on a schedule to a managed online store built for low-latency reads, with no copy pipeline for the team to run. Querying BigQuery per request cannot meet millisecond latency, a Dataflow-to-Memorystore pipeline is exactly the custom pipeline the team wants to avoid, and loading data at container startup serves stale features until the next restart.
Collaborating within and across teams to manage data and models
5
Select One
A company wants to train a text classifier on customer support notes stored in BigQuery. The free-text notes contain customer names, email addresses, and phone numbers. Data scientists must not see these values. Each customer's values must map to the same surrogate across tables so that records can still be joined, and the compliance team must be able to recover the original values when legally required.
What should the ML engineer do?
Use Sensitive Data Protection to replace each detected value with its infoType name before training.
Apply BigQuery column-level access control to the notes column and grant access to the other columns.
Use Sensitive Data Protection deterministic encryption with a Cloud KMS-wrapped key on detected values.
Apply SHA-256 hashing in SQL to the entire notes column and train on the hashed column in a new dataset.
C
Deterministic encryption replaces each detected value with the same surrogate every time it appears, so joins still work, and holders of the Cloud KMS-wrapped key can reverse it. Replacing values with infoType names breaks both joins and recovery. Column-level access control hides the whole notes column, which removes the text the classifier needs. Hashing the entire column destroys the text and cannot be reversed.
Collaborating within and across teams to manage data and models
4
Select One
A support application calls a Gemini model on Agent Platform using standard pay-as-you-go. Every request contains the same 40,000-token product manual followed by a short customer question, and answers must be returned to users interactively. During predictable weekday peaks, the application receives 429 errors. Input-token costs are also above budget.
Which TWO actions should the ML engineer take?
Create an explicit context cache that holds the manual, and reference that cache in each request.
Submit peak-period requests as batch inference jobs so they do not compete for shared online capacity.
Send requests to the global endpoint so that the project receives dedicated capacity during peaks.
Purchase Provisioned Throughput for the model in its region, sized to cover the weekday peak load.
A
Explicit context caching stores the repeated 40,000-token prefix once, so later requests are billed at the cached-token rate and process faster. Provisioned Throughput reserves capacity for a model in a region, which removes 429 errors from shared-pool contention up to the purchased amount. Batch inference is not interactive, and the global endpoint can improve availability by routing across regions but reserves no capacity.
Architecting low-code AI solutions
3
Select Two
D
An accounts-payable team receives about 40,000 PDF invoices per month from hundreds of suppliers, each with its own layout. The team must extract the supplier name, invoice date, total amount, and line items into BigQuery, and send any field extracted with low confidence to a human reviewer. The team has no labeled documents and wants to minimize development effort.
What should the ML engineer do?
Run Vision API document text detection, then parse the returned text with supplier-specific regular expressions.
Process the invoices with the pretrained Document AI Invoice Parser and use its per-entity confidence scores.
Create a Document AI Custom Extractor, label examples of every supplier layout, and train a processor version.
Send each PDF to Gemini with a prompt requesting JSON output, and treat schema-valid responses as high confidence.
B
The pretrained Invoice Parser extracts standard invoice fields across layouts without training, and returns a confidence score for each entity that can drive human-review routing. OCR plus regex breaks across hundreds of layouts. A Custom Extractor is for document types without a specialized processor, so it adds schema and labeling work here. A schema-valid JSON response from Gemini says nothing about whether each field is correct, and it has no per-field confidence.
Architecting low-code AI solutions
2
Select One
A retailer stores three years of daily unit sales for 12,000 SKUs in a BigQuery table. Planners need a 30-day demand forecast for every SKU each week, and the forecasts must reflect regional holiday effects. The analytics team works only in SQL, and all training and inference must run inside BigQuery. The team wants to manage as few model objects as possible.
What should the team do?
Train a boosted tree regressor on lagged sales features, then call ML.PREDICT once for each future date.
Train an Agent Platform AutoML forecasting model on the table, then schedule batch inference to BigQuery.
Generate one CREATE MODEL statement per SKU in a script, then union the ML.FORECAST output of every model.
Train one ARIMA_PLUS model with the SKU as the time series ID and a holiday region, then run ML.FORECAST.
D
One ARIMA_PLUS model with TIME_SERIES_ID_COL forecasts all 12,000 series as a single model object, and HOLIDAY_REGION adds holiday effects, all in SQL. A boosted tree needs lagged values for future dates that do not exist yet, so multi-step forecasts require a manual recursive loop. AutoML forecasting would work, but its training runs outside BigQuery. A per-SKU loop creates 12,000 model objects.
Architecting low-code AI solutions
1
Select One