Free PR000269 Practice Questions & Study Guide: Google Cloud Certified – Professional Machine Learning Engineer

Official Exam Details: (PR000269)

Exam Code:
PR000269
Passing Score:
70%
Total Question Bank:
356 Verified Questions
Exam Duration:
120 Minutes

Exam Format & Question Types

This certification exam features multiple-choice questions (single and multi-select), interactive Hotspots, Hot Areas, and Drag-and-Drop scenario configurations designed to test real-world technical competency.

PR000269: Advanced Hybrid Cloud Architecture & Optimization – Study Guide

Welcome, aspiring certified architects! This comprehensive study guide and architectural master blueprint is meticulously crafted for the PR000269 certification exam. This credential validates your deep expertise in designing, implementing, and optimizing complex hybrid cloud solutions, focusing on seamless integration, robust security, and cost-efficient operations across diverse environments. Successfully mastering this exam demonstrates your capability to lead transformational initiatives in enterprise cloud adoption.

Exam Overview & Profile

  • Target Audience: Experienced cloud architects, solution designers, senior cloud engineers, and technical leaders responsible for architecting and managing hybrid cloud environments in large enterprises. Candidates should possess at least 3-5 years of hands-on experience with both public cloud platforms and on-premises infrastructure.
  • Question Count: Approximately 65-70 multiple-choice and multi-select questions.
  • Duration: 180 minutes (3 hours) to complete the exam.
  • Passing Score Context: While exact scores vary slightly per exam version, candidates should aim for a deep understanding across all domains, typically requiring a performance equivalent to 750 out of 1000 points. The exam emphasizes practical application and scenario-based problem-solving.

Deep-Dive Domain Breakdown

The PR000269 exam is structured into critical domains, each demanding a nuanced understanding of architectural principles and specific technology applications:

  • Domain 1: Hybrid Cloud Strategy & Connectivity (25%)

    • Architectural Concepts: Evaluate various hybrid cloud models (bursting, disaster recovery, data locality), understand enterprise governance frameworks, and align technical solutions with business objectives.
    • Service Selections: Deep knowledge of dedicated network connections (e.g., Direct Connect, ExpressRoute), VPN architectures (site-to-site, client VPN), SD-WAN integration strategies, and multi-cloud networking solutions (e.g., transit gateways, virtual WANs, network overlays). Secure network segmentation and routing for hybrid traffic.
    • Core Technologies: IPsec, BGP, MPLS, DNS resolution strategies across hybrid environments, network virtual appliances (NVAs), and firewall integration patterns.
  • Domain 2: Data Management & Migration in Hybrid Environments (25%)

    • Architectural Concepts: Design data synchronization and replication strategies (active-active, active-passive), evaluate data sovereignty and compliance requirements, and plan data tiering for cost and performance. Master various migration methodologies (lift-and-shift, re-platforming, re-factoring).
    • Service Selections: Hybrid database services (e.g., Managed instances, cloud database migration services), storage gateways (file, block, tape), content delivery networks (CDNs) for hybrid applications, and data transfer acceleration services.
    • Core Technologies: Database replication mechanisms, object storage API compatibility, data encryption in transit and at rest for hybrid data, and backup/restore strategies.
  • Domain 3: Application Modernization & Deployment (20%)

    • Architectural Concepts: Design patterns for containerized workloads (Kubernetes in hybrid), serverless functions leveraging edge computing, API management strategies, and microservices architectures extending across on-premises and public cloud. Develop robust disaster recovery (DR) and business continuity (BC) plans for hybrid applications.
    • Service Selections: Container orchestration platforms (e.g., AKS, EKS, GKE, OpenShift), API gateways, CI/CD pipelines for hybrid deployments, serverless platforms, and workload migration tools.
    • Core Technologies: Docker, Kubernetes, GitOps, Infrastructure as Code (IaC) for hybrid deployments (Terraform, Ansible), and service mesh implementations.
  • Domain 4: Security, Governance, and Cost Optimization (30%)

    • Architectural Concepts: Implement unified identity and access management (IAM) across hybrid environments, enforce consistent security policies, and design centralized logging and monitoring solutions. Apply FinOps principles for cost allocation, budgeting, and optimization in complex hybrid estates. Understand compliance frameworks (e.g., GDPR, HIPAA, PCI DSS) and their implications for hybrid designs.
    • Service Selections: Identity federation services (e.g., Okta, Azure AD Connect, AWS SSO), cloud security posture management (CSPM) tools, security information and event management (SIEM) systems, cost management tools, and policy enforcement services.
    • Core Technologies: SAML, OAuth, OpenID Connect, network access control lists (NACLs), security groups, multi-factor authentication (MFA), encryption key management, and tag-based cost allocation.

High-Yield Exam Tips & Scenario Traps

  • Prioritize Trade-offs: Many questions present scenarios requiring you to choose the “best” solution. Always weigh cost, performance, security, operational overhead, and compliance. There’s rarely a single perfect answer; focus on the most appropriate based on scenario constraints.
  • Security is Paramount: In hybrid scenarios, never compromise on security. Questions involving data transfer, access, or storage will often have a strong security component. Think about end-to-end encryption, least privilege, and unified identity.
  • Networking Deep Dive: Hybrid networking is a common area for traps. Understand latency implications, routing complexities between diverse networks, and bandwidth considerations. Know the difference between direct connectivity and VPNs, and when to use each.
  • Avoid Over-engineering: Simpler, more robust solutions are often preferred. Don’t assume the most complex option is always correct. Evaluate if a solution scales appropriately without introducing unnecessary complexity or cost.
  • FinOps Perspective: Always consider the cost implications of your architectural decisions, especially regarding data egress, storage tiers, and compute instance types across hybrid environments. Resource tagging strategies are crucial for cost allocation.
  • Scenario Traps: Watch out for scenarios that subtly introduce compliance requirements, budget constraints, or performance bottlenecks that might invalidate an otherwise plausible solution. For instance, a high-performance solution might be too expensive, or a cost-effective one might not meet RPO/RTO targets.

Frequently Asked Questions (FAQ)

Q1: What is the best way to prepare for the scenario-based questions?
A1: Focus on real-world experience. Beyond theoretical knowledge, immerse yourself in whitepapers detailing enterprise hybrid cloud reference architectures. Practice designing solutions for common challenges like database migration with minimal downtime, multi-site disaster recovery, or securing legacy applications with modern cloud IAM. Understand the “why” behind architectural choices, not just the “how.”

Q2: Are there specific resources recommended for this exam?
A2: Absolutely. Leverage official documentation and solution architectures from leading cloud providers. Explore detailed case studies of successful hybrid cloud implementations. Engage with communities and forums focused on enterprise cloud architecture. Hands-on labs simulating hybrid environments are invaluable, as is reviewing comprehensive architectural blueprints for common hybrid patterns.

Q3: How should I approach time management during the exam?
A3: Allocate approximately 2-2.5 minutes per question. If a question feels overly complex or time-consuming, make an educated guess, mark it for review, and move on. Return to flagged questions if time permits. Ensure you read each question and all answer options thoroughly before selecting, as subtle differences can change the correct choice.

Q4: Is practical hands-on experience truly necessary for PR000269?
A4: Yes, it is indispensable. While theoretical knowledge is foundational, the PR000269 exam heavily assesses your ability to apply that knowledge in practical, complex scenarios. Understanding the operational nuances, configuration challenges, and integration points of hybrid cloud technologies comes primarily from hands-on work. Simulated labs and personal projects will significantly enhance your preparedness.

Free PR000269 Sample Practice Questions

Test your knowledge with these sample scenario questions complete with verified explanations:

General Practice Questions

QUESTION 1

You 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?

  • A. 1 = Dataflow, 2 = AI Platform, 3 = BigQuery
  • B. 1 = DataProc, 2 = AutoML, 3 = Cloud Bigtable
  • C. 1 = BigQuery, 2 = AutoML, 3 = Cloud Functions
  • D. 1 = BigQuery, 2 = AI Platform, 3 = Cloud Storage
Click to View Verified Solution & Explanation

Correct Option: A

Explanation: The question asks for a pipeline to detect anomalies in real-time sensor data from Pub/Sub, apply an ML model, and store results for analytics. Let’s break down the optimal services for each step:

  • Step 1: Handle incoming requests from Pub/Sub (real-time stream processing).
    Google Cloud Dataflow is the ideal fully managed service for executing Apache Beam pipelines, making it perfect for real-time stream processing from Pub/Sub.
  • Step 2: Apply an ML model for anomaly detection.
    AI Platform (now largely superseded by Vertex AI) is the primary Google Cloud service for deploying and serving custom machine learning models for predictions. It allows you to host your trained anomaly detection model for real-time inference.
  • Step 3: Store the results for analytics and visualization.
    BigQuery is Google Cloud’s fully managed, serverless data warehouse designed for large-scale data analytics. It seamlessly integrates with visualization tools (e.g., Looker Studio) and is perfect for storing and querying the anomaly detection results.

Combining these, option A (Dataflow, AI Platform, BigQuery) forms a cohesive and highly scalable real-time anomaly detection pipeline.

Reference: https://cloud.google.com/dataflow/docs/guides/create-pipeline-pubsub, https://cloud.google.com/ai-platform/prediction/docs/deploy-model, https://cloud.google.com/bigquery/docs

QUESTION 2

Your 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?

  • A. 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.
  • B. 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.
  • C. 1. Define the optimal route as the shortest route that passes by all shuttle stations with attendance at the given time under capacity constraints. 2. Dispatch an appropriately sized shuttle and indicate the required stops on the map.
  • D. 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.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)

Reasoning: The problem states that users confirm their presence and shuttle station one day in advance. This means the attendance at each shuttle station is known, not to be predicted. The goal is to make the route more efficient. Therefore, the most appropriate approach is to directly define an optimization problem: finding the shortest route that visits only the shuttle stations with confirmed attendance, while also considering shuttle capacity constraints. This is a classic combinatorial optimization problem, solvable with algorithms (e.g., using Google OR-Tools) that can determine the optimal sequence of stops and assign an appropriately sized shuttle.

✄ Why the other choices are incorrect:

  • Option A is incorrect: Building a tree-based regression model to predict passenger count is unnecessary for determining which stops to visit, as user presence is already confirmed. While helpful for shuttle sizing, it doesn’t address the primary routing optimization based on known attendance.
  • Option B is incorrect: Building a tree-based classification model to predict whether a shuttle should pick up passengers is redundant. The problem explicitly states that users confirm their presence, meaning this information is already known, not needing prediction.
  • Option D is incorrect: Reinforcement Learning (RL) is generally used for sequential decision-making in dynamic environments or when an explicit model is hard to define. However, for a daily routing problem with known attendance, a direct optimization approach is more suitable and efficient. Furthermore, using “tree-based classification models that predict the presence of passengers at shuttle stops as agents” is a convoluted and incorrect framing, as presence is confirmed, and classification models are not typically agents in this context.

Reference: https://developers.google.com/optimization/routing

QUESTION 3

You 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?

  • A. Use the class distribution to generate 10% positive examples.
  • B. Use a convolutional neural network with max pooling and softmax activation.
  • C. Downsample the data with upweighting to create a sample with 10% positive examples.
  • D. Remove negative examples until the numbers of positive and negative examples are equal.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

Why C is correct:

This is a standard technique taught in advanced machine learning (including Google’s ML guidelines) for severe class imbalance.

Downsampling the majority class: By reducing the negative examples until the positive examples make up about 10% of the dataset, you give the model enough positive signal to actually learn and converge.

Upweighting: Because you artificially removed negative examples, your model would normally output skewed, uncalibrated probabilities (it would think failures happen 10% of the time instead of <1%). By upweighting the remaining negative examples during training (giving them a higher sample weight in the loss function), the model’s final probability predictions remain mathematically calibrated to the real world.

QUESTION 4

You 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?

  • A. Use Data Fusion's GUI to build the transformation pipelines, and then write the data into BigQuery.
  • B. Convert your PySpark into SparkSQL queries to transform the data, and then run your pipeline on Dataproc to write the data into BigQuery.
  • C. 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.
  • D. 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.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

Option D is the most suitable choice as it directly addresses all the requirements:

  • Serverless Tool: BigQuery is a fully managed, serverless data warehouse designed for petabyte-scale analytics.
  • SQL Syntax: Converting PySpark commands into BigQuery SQL allows for powerful, expressive, and familiar SQL-based transformations, meeting the

    Reference: https://cloud.google.com/bigquery/docs/loading-data

QUESTION 5

You 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?

  • A. Use the AI Platform custom containers feature to receive training jobs using any framework.
  • B. Configure Kubeflow to run on Google Kubernetes Engine and receive training jobs through TF Job.
  • C. Create a library of VM images on Compute Engine, and publish these images on a centralized repository.
  • D. Set up Slurm workload manager to receive jobs that can be scheduled to run on your cloud infrastructure.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

The problem asks for a managed service solution for data scientists who use diverse machine learning frameworks (Keras, PyTorch, Theano, Scikit-learn, custom libraries) and want to reduce administration overhead. AI Platform (now Vertex AI) Training is a managed service designed for this purpose. The custom containers feature allows users to package their training application and its dependencies, including any specific framework or custom library, into a Docker image. This image can then be submitted to AI Platform for managed execution, directly addressing the requirement for supporting many different frameworks and reducing administration.

Why the other choices are incorrect:

  • B: Configure Kubeflow to run on Google Kubernetes Engine and receive training jobs through TF Job. While Kubeflow on GKE provides some management, setting up and maintaining Kubeflow itself is still a significant administrative task compared to a fully managed service. Furthermore, TFJob is specific to TensorFlow and would not natively support the wide array of frameworks mentioned (PyTorch, Scikit-learn, custom libraries) without additional operators and configuration.
  • C: Create a library of VM images on Compute Engine, and publish these images on a centralized repository. This approach requires manual management of VMs and orchestration of training jobs, which contradicts the goal of using a managed service to reduce administration. It does not provide a managed way to receive and run training jobs.
  • D: Set up Slurm workload manager to receive jobs that can be scheduled to run on your cloud infrastructure. Slurm is an open-source workload manager, not a managed service provided by Google Cloud for ML training. Setting it up and maintaining it on cloud infrastructure would introduce significant administrative burden, going against the core requirement of using a managed service to simplify administration.

Reference: https://cloud.google.com/vertex-ai/docs/training/create-custom-container

QUESTION 6

You 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?

  • A. Keep the original test dataset unchanged even if newer products are incorporated into retraining.
  • B. Extend your test dataset with images of the newer products when they are introduced to retraining.
  • C. Replace your test dataset with images of the newer products when they are introduced to retraining.
  • D. Update your test dataset with images of the newer products when your evaluation metrics drop below a pre-decided threshold.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

When new products are introduced and the ML model is retrained to recognize them, the test dataset used for continuous evaluation must also be updated to remain representative of the entire product catalog.Extending your test dataset with images of the newer products ensures that the model’s performance is accurately evaluated on both existing and newly introduced products. This maintains the integrity and relevance of the continuous evaluation process, providing a true measure of accuracy for all products.

  • Option A is incorrect: Keeping the test dataset unchanged would lead to a stale evaluation that doesn’t reflect the model’s ability to classify new products.
  • Option C is incorrect: Replacing the test dataset entirely would remove the ability to evaluate the model’s performance on older products, leading to an incomplete assessment.
  • Option D is incorrect: Waiting for metrics to drop is a reactive approach. The test dataset should be proactively updated when new products are introduced to maintain its representativeness.

Reference: https://cloud.google.com/vertex-ai/docs/model-monitoring/overview

QUESTION 7

You 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?

  • A. Configure AutoML Tables to perform the classification task.
  • B. Run a BigQuery ML task to perform logistic regression for the classification.
  • C. Use AI Platform Notebooks to run the classification model with pandas library.
  • D. Use AI Platform to run the classification model job configured for hyperparameter tuning.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

The core requirement is to perform classification workflows on structured datasets stored in BigQuery, repeatedly, and without writing code for exploratory data analysis, feature selection, model building, training, hyperparameter tuning, and serving.

AutoML Tables is specifically designed for this scenario. It is a managed service that automates the end-to-end machine learning workflow for structured data, from data preparation and feature engineering to model training, hyperparameter tuning, evaluation, and deployment, all with a user-friendly, no-code/low-code interface. This perfectly aligns with the requirement to complete these steps without writing code.

Reference: https://cloud.google.com/automl-tables/docs/beginners-guide

QUESTION 8

You 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?

  • A. Configure Kubeflow Pipelines to schedule your multi-step workflow from training to deploying your model.
  • B. Use a model trained and deployed on BigQuery ML, and trigger retraining with the scheduled query feature in BigQuery.
  • C. Write a Cloud Functions script that launches a training and deploying job on AI Platform that is triggered by Cloud Scheduler.
  • D. Use Cloud Composer to programmatically schedule a Dataflow job that executes the workflow from training to deploying your model.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation: Kubeflow Pipelines, part of Vertex AI Pipelines on Google Cloud, is specifically designed for building, deploying, and managing end-to-end machine learning workflows. This aligns perfectly with the requirement for a multi-step workflow from training to deploying, monthly retraining (via scheduled runs), and serving real-time predictions to users in an app. It represents a Google-recommended best practice for MLOps, providing integrated features for data preprocessing, model training, evaluation, and deployment to a managed endpoint for real-time inference.

Reference: https://cloud.google.com/vertex-ai/docs/pipelines/introduction

QUESTION 9

You 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?

  • A. Use Cloud Functions to identify changes to your code in Cloud Storage and trigger a retraining job.
  • B. Use the gcloud command-line tool to submit training jobs on AI Platform when you update your code.
  • C. Use Cloud Build linked with Cloud Source Repositories to trigger retraining when new code is pushed to the repository.
  • D. Create an automated workflow in Cloud Composer that runs daily and looks for changes in code in Cloud Storage using a sensor.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

Option C is the most suitable approach. Cloud Source Repositories provide robust version control for your ML code. Linking this with Cloud Build allows you to automatically trigger a retraining pipeline whenever new code is pushed to the repository. This satisfies all requirements: it minimizes manual intervention through automation, ensures code version control, and triggers retraining only when code changes, which implicitly helps optimize computation costs by avoiding unnecessary runs. Cloud Build can easily submit AI Platform training jobs as part of its steps.

Why other options are incorrect:

  • Option A is incorrect: While Cloud Functions can detect Cloud Storage changes and trigger jobs, Cloud Storage is not primarily designed for robust code version control like a Git repository, and this approach is less integrated for CI/CD than Cloud Build.
  • Option B is incorrect: Using the gcloud command-line tool requires manual intervention for each training job submission, which contradicts the goal of minimizing manual intervention.
  • Option D is incorrect: Cloud Composer is excellent for orchestrating complex workflows, but a daily run is not as reactive or cost-efficient as a push-triggered build if changes are infrequent. Using a sensor on Cloud Storage for code changes is less direct for version control compared to Cloud Source Repositories and Cloud Build’s integrated CI/CD capabilities.

Reference: https://cloud.google.com/build/docs/automate-builds https://cloud.google.com/source-repositories/docs

QUESTION 10

Your 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?

  • A. Categorical hinge
  • B. Binary cross-entropy
  • C. Categorical cross-entropy
  • D. Sparse categorical cross-entropy
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

The correct answer is D: Sparse categorical cross-entropy.

Here is why D is the right choice and C is incorrect:

The Core Difference: Label Encoding

The choice between Categorical Cross-Entropy and Sparse Categorical Cross-Entropy depends entirely on how your labels are formatted, not on the data itself.

Sparse Categorical Cross-Entropy (D): You use this when your classes are mutually exclusive and your target labels are provided as integers (e.g., 0, 1, 2). The prompt explicitly states you are using a label map: [‘drivers_license’, ‘passport’, ‘credit_card’]. This means your pipeline will map the strings to their corresponding integer index (0 for driver’s license, 1 for passport, 2 for credit card).

Categorical Cross-Entropy (C): You would only use this if your pipeline had explicitly converted those labels into one-hot encoded arrays (e.g., [1, 0, 0] for a driver’s license, [0, 1, 0] for a passport). Since the prompt defines a label map list rather than one-hot vectors, sparse is the computationally efficient and correct choice.

QUESTION 11

You are designing an ML recommendation model for shoppers on your company’s ecommerce website. You will use Recommendations AI to build, test, and deploy your system. How should you develop recommendations that increase revenue while following best practices?

  • A. Use the ג€Other Products You May Likeג€ recommendation type to increase the click-through rate.
  • B. Use the ג€Frequently Bought Togetherג€ recommendation type to increase the shopping cart size for each order.
  • C. Import your user events and then your product catalog to make sure you have the highest quality event stream.
  • D. Because it will take time to collect and record product data, use placeholder values for the product catalog to test the viability of the model.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Using the “Frequently Bought Together” recommendation type is a direct and effective strategy to increase the shopping cart size for each order. This type of recommendation identifies products that customers commonly purchase together, encouraging cross-selling and upselling, which directly contributes to higher revenue per transaction. This aligns perfectly with the goal of increasing revenue while following best practices in e-commerce recommendations.

❌ Why the other choices are incorrect:

  • Option A is incorrect: While increasing the click-through rate (CTR) is a desirable outcome, the “Other Products You May Like” recommendation type primarily focuses on product discovery and engagement, not necessarily on immediately increasing the shopping cart size or overall revenue as directly as cross-selling. A high CTR doesn’t guarantee a purchase or a larger cart.
  • Option C is incorrect: According to Google Cloud’s best practices for Recommendations AI (and the Retail API), the product catalog should be imported *before* user events. User events often reference product IDs, and the catalog needs to be available to validate these references and ensure data quality. Importing user events first can lead to errors or lower quality recommendations.
  • Option D is incorrect: Using placeholder values for the product catalog would render the recommendations largely meaningless and ineffective for testing the viability of the model. Recommendations AI relies on rich, accurate product data to generate relevant and valuable suggestions. Meaningful testing requires realistic data.

Reference: https://cloud.google.com/retail/docs/recommendations-overview#recommendation-types; https://cloud.google.com/retail/docs/data-import-requirements

QUESTION 12

You are designing an architecture with a serverless ML system to enrich customer support tickets with informative metadata before they are routed to a support agent. You need a set of models to predict ticket priority, predict ticket resolution time, and perform sentiment analysis to help agents make strategic decisions when they process support requests. Tickets are not expected to have any domain-specific terms or jargon.

The proposed architecture has the following flow:

Which endpoints should the Enrichment Cloud Functions call?

  • A. 1 = AI Platform, 2 = AI Platform, 3 = AutoML Vision
  • B. 1 = AI Platform, 2 = AI Platform, 3 = AutoML Natural Language
  • C. 1 = AI Platform, 2 = AI Platform, 3 = Cloud Natural Language API
  • D. 1 = Cloud Natural Language API, 2 = AI Platform, 3 = Cloud Vision API
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)Reasoning:The architecture involves three distinct ML tasks integrated with Cloud Functions for enrichment.Endpoints 1 and 2 are linked to "Classification Training" (predict ticket priority) and "Regression Training" (predict ticket resolution time), respectively. This indicates custom-trained models are being deployed. Google Cloud’s primary platform for deploying custom machine learning models, trained using various frameworks or AutoML, is Vertex AI (formerly AI Platform). Therefore, Endpoint 1 and Endpoint 2 should be AI Platform endpoints.Endpoint 3 is responsible for "sentiment analysis." The crucial detail is that "Tickets are not expected to have any domain-specific terms or jargon." This strongly suggests that a pre-trained, general-purpose natural language API would be sufficient, eliminating the need for custom training (like AutoML Natural Language). The Google Cloud Natural Language API provides pre-trained models for sentiment analysis, entity extraction, and syntax analysis out-of-the-box, making it the ideal choice for this scenario.❌ Why the other choices are incorrect:* Option A is incorrect: AutoML Vision is for image analysis tasks, not natural language processing like sentiment analysis.* Option B is incorrect: AutoML Natural Language is used for building custom natural language models when domain-specific data or tasks require it. The problem explicitly states "Tickets are not expected to have any domain-specific terms or jargon," making a pre-trained API more suitable and cost-effective than a custom AutoML model for general sentiment analysis.* Option D is incorrect: Cloud Natural Language API is for pre-trained NLP tasks, not for hosting custom classification or regression models trained offline. Cloud Vision API is for image analysis, not text sentiment analysis.

Reference: https://cloud.google.com/vertex-ai/docs/overview/what-is-vertex-ai, https://cloud.google.com/natural-language/docs/reference/rest

QUESTION 13

You have trained a deep neural network model on Google Cloud. The model has low loss on the training data, but is performing worse on the validation data. You want the model to be resilient to overfitting. Which strategy should you use when retraining the model?

  • A. Apply a dropout parameter of 0.2, and decrease the learning rate by a factor of 10.
  • B. Apply a L2 regularization parameter of 0.4, and decrease the learning rate by a factor of 10.
  • C. Run a hyperparameter tuning job on AI Platform to optimize for the L2 regularization and dropout parameters.
  • D. Run a hyperparameter tuning job on AI Platform to optimize for the learning rate, and increase the number of neurons by a factor of 2.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

The problem description indicates overfitting: low loss on training data but worse performance on validation data. Overfitting means the model has learned noise and specific patterns from the training data rather than generalizing well to unseen data.

Option C is the most effective strategy. Hyperparameter tuning on AI Platform is designed to systematically explore different hyperparameter values to find the optimal combination that minimizes validation loss and improves generalization. Both L2 regularization and dropout are powerful techniques specifically used to combat overfitting by penalizing complex models and preventing co-adaptation of neurons, respectively. Optimizing these parameters through tuning directly addresses the overfitting issue.

Options A and B suggest applying specific regularization techniques with arbitrary values. While valid techniques, choosing optimal parameters without tuning is suboptimal. Decreasing the learning rate primarily affects convergence, not directly overfitting. Option D, increasing the number of neurons, would likely worsen overfitting by increasing model capacity, making it a counterproductive strategy for this problem.

Reference: https://cloud.google.com/ai-platform/training/docs/hyperparameter-tuning-overview

QUESTION 14

You built and manage a production system that is responsible for predicting sales numbers. Model accuracy is crucial, because the production model is required to keep up with market changes. Since being deployed to production, the model hasn’t changed; however the accuracy of the model has steadily deteriorated.

What issue is most likely causing the steady decline in model accuracy?

  • A. Poor data quality
  • B. Lack of model retraining
  • C. Too few layers in the model for capturing information.
  • D. Incorrect data split ratio during model training, evaluation, validation, and test
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Reasoning: The scenario describes a production model for sales prediction whose accuracy has steadily deteriorated over time, despite the model itself not having changed since deployment. It also mentions the crucial need for the model to keep up with market changes. This is a classic symptom of model drift or concept drift, where the underlying statistical properties of the target variable (sales numbers) or the input features change over time. If the model is not periodically retrained with new, representative data that reflects current market conditions, its ability to make accurate predictions will naturally decline. Lack of retraining means the model’s learned patterns become stale and misaligned with the evolving reality, leading to a steady decline in accuracy.

❌ Why the other choices are incorrect:

  • Option A is incorrect: While poor data quality can certainly impact model accuracy, a steady deterioration over time, especially in the context of needing to adapt to market changes, points more strongly to the model’s inability to learn new patterns rather than a persistent or worsening fundamental data quality issue. If data quality itself was changing (e.g., new types of errors appearing), that would be a form of data drift, which still necessitates model retraining.
  • Option C is incorrect: “Too few layers in the model for capturing information” suggests an architectural inadequacy. If this were the primary issue, the model would likely have exhibited poor performance from its initial deployment, rather than a steady deterioration after being accurate enough for production. A lack of model complexity would manifest as underfitting, which would be apparent early on.
  • Option D is incorrect: An “incorrect data split ratio during model training, evaluation, validation, and test” would typically lead to issues during the development and initial deployment phase, such as an inaccurate assessment of model performance or a model that doesn’t generalize well from the start. It doesn’t explain a steady decline in accuracy over time once deployed, assuming the initial performance was acceptable.

Reference: https://cloud.google.com/architecture/overview-ml-system-design#data_drift_and_concept_drift

QUESTION 15

You have been asked to develop an input pipeline for an ML training model that processes images from disparate sources at a low latency. You discover that your input data does not fit in memory. How should you create a dataset following Google-recommended best practices?

  • A. Create a tf.data.Dataset.prefetch transformation.
  • B. Convert the images to tf.Tensor objects, and then run Dataset.from_tensor_slices().
  • C. Convert the images to tf.Tensor objects, and then run tf.data.Dataset.from_tensors().
  • D. Convert the images into TFRecords, store the images in Cloud Storage, and then use the tf.data API to read the images for training.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: When dealing with large datasets that do not fit in memory, converting images into TFRecords and storing them in Cloud Storage is a Google-recommended best practice. TFRecords provide a serialized, efficient format for storing data, allowing the tf.data API to read and process them in a streaming fashion directly from Cloud Storage. This approach avoids loading the entire dataset into memory, enabling scalable and low-latency input pipelines suitable for machine learning training from disparate sources.

❌ Why the other choices are incorrect:

  • Option A is incorrect: tf.data.Dataset.prefetch is a transformation used to optimize an existing dataset by overlapping data preprocessing and model execution. It improves pipeline performance but does not address the initial problem of creating a dataset from data that doesn’t fit in memory.
  • Option B is incorrect: tf.data.Dataset.from_tensor_slices() requires the entire input data to be converted into tf.Tensor objects and present in memory first, which contradicts the problem statement that the data does not fit in memory.
  • Option C is incorrect: tf.data.Dataset.from_tensors() creates a dataset with a single element, which is the input tensor(s). This is not suitable for creating a dataset from multiple images for training and, like option B, also requires the data to fit in memory.

Reference: https://www.tensorflow.org/guide/data_performance#optimize_data_loading

QUESTION 16

You are an ML engineer at a large grocery retailer with stores in multiple regions. You have been asked to create an inventory prediction model. Your model’s features include region, location, historical demand, and seasonal popularity. You want the algorithm to learn from new inventory data on a daily basis. Which algorithms should you use to build the model?

  • A. Classification
  • B. Reinforcement Learning
  • C. Recurrent Neural Networks (RNN)
  • D. Convolutional Neural Networks (CNN)
Click to View Verified Solution & Explanation

Correct Option: C

Explanation: The problem describes an inventory prediction task involving features such as historical demand and seasonal popularity, with a requirement to learn from new data daily. This is fundamentally a time-series forecasting problem.

  • Recurrent Neural Networks (RNNs), including variants like LSTMs and GRUs, are specifically designed to process sequential data and capture temporal dependencies. They are highly effective for time-series forecasting, where past data (historical demand, seasonal popularity) directly influences future predictions. Their ability to maintain an internal state makes them suitable for learning from new daily data and adapting to evolving patterns.

Let’s consider why other options are less suitable:

  • A: Classification is used for predicting discrete categories, whereas inventory prediction typically involves forecasting a continuous quantity (e.g., number of items to stock), which is a regression problem.
  • B: Reinforcement Learning is focused on decision-making through trial and error in an environment to maximize rewards. While it can be used for inventory *management* (e.g., reordering policies), it is not the primary algorithm for direct inventory *prediction* (forecasting future demand).
  • D: Convolutional Neural Networks (CNNs) are primarily designed for spatial data (like images) or extracting local features from sequences. While 1D CNNs can be used in some time-series applications, they are generally less effective than RNNs at capturing long-range temporal dependencies crucial for problems like historical demand forecasting over extended periods.

    Reference: https://cloud.google.com/architecture/overview-machine-learning-products

QUESTION 17

You are building a real-time prediction engine that streams files which may contain Personally Identifiable Information (PII) to Google Cloud. You want to use the

Cloud Data Loss Prevention (DLP) API to scan the files. How should you ensure that the PII is not accessible by unauthorized individuals?

  • A. Stream all files to Google Cloud, and then write the data to BigQuery. Periodically conduct a bulk scan of the table using the DLP API.
  • B. Stream all files to Google Cloud, and write batches of the data to BigQuery. While the data is being written to BigQuery, conduct a bulk scan of the data using the DLP API.
  • C. Create two buckets of data: Sensitive and Non-sensitive. Write all data to the Non-sensitive bucket. Periodically conduct a bulk scan of that bucket using the DLP API, and move the sensitive data to the Sensitive bucket.
  • D. Create three buckets of data: Quarantine, Sensitive, and Non-sensitive. Write all data to the Quarantine bucket. Periodically conduct a bulk scan of that bucket using the DLP API, and move the data to either the Sensitive or Non-Sensitive bucket.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation: Option D provides the most secure approach to handling streaming data that may contain PII. By initially writing all data to a ‘Quarantine’ bucket with highly restricted access, you ensure that no PII is prematurely exposed. The Cloud Data Loss Prevention (DLP) API can then scan this isolated data. Once PII is identified or confirmed absent, the data can be safely moved to a ‘Sensitive’ bucket (with appropriate strict controls for PII) or a ‘Non-sensitive’ bucket, respectively. This workflow prevents unauthorized access from the moment the data is streamed to Google Cloud, fulfilling the requirement.

Why the other choices are incorrect:

  • Option A is incorrect: Writing data directly to BigQuery before a periodic scan means PII resides in BigQuery and is accessible for a period before it’s identified or protected, failing to prevent initial unauthorized access.
  • Option B is incorrect: Similar to A, writing data to BigQuery even in batches, while scanning concurrently, still means PII is in BigQuery and potentially accessible before the scan completes and protection measures are in place.
  • Option C is incorrect: Writing all data, including potential PII, to a ‘Non-sensitive’ bucket initially is risky. This bucket might have less stringent access controls, making the PII vulnerable until the periodic scan identifies and moves it.

Reference: https://cloud.google.com/dlp/docs/inspecting-storage

QUESTION 18

You work for a large hotel chain and have been asked to assist the marketing team in gathering predictions for a targeted marketing strategy. You need to make predictions about user lifetime value (LTV) over the next 20 days so that marketing can be adjusted accordingly. The customer dataset is in BigQuery, and you are preparing the tabular data for training with AutoML Tables. This data has a time signal that is spread across multiple columns. How should you ensure that AutoML fits the best model to your data?

  • A. Manually combine all columns that contain a time signal into an array. AIlow AutoML to interpret this array appropriately. Choose an automatic data split across the training, validation, and testing sets.
  • B. Submit the data for training without performing any manual transformations. AIlow AutoML to handle the appropriate transformations. Choose an automatic data split across the training, validation, and testing sets.
  • C. Submit the data for training without performing any manual transformations, and indicate an appropriate column as the Time column. AIlow AutoML to split your data based on the time signal provided, and reserve the more recent data for the validation and testing sets.
  • D. Submit the data for training without performing any manual transformations. Use the columns that have a time signal to manually split your data. Ensure that the data in your validation set is from 30 days after the data in your training set and that the data in your testing sets from 30 days after your validation set.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

You’re predicting 20‑day LTV, which means each label uses 20 days of future data. If you let AutoML do a normal time split, the future window of the training labels overlaps with the validation period, causing target leakage.

Because the time signal is spread across multiple columns (Year/Month/Day), you also cannot select a single Time column for AutoML’s built‑in chronological split.

Option D fixes both issues by manually splitting the data in BigQuery and inserting a 30‑day gap, ensuring:

No overlap between label windows

No leakage

Proper rolling‑window evaluation

QUESTION 19

You have written unit tests for a Kubeflow Pipeline that require custom libraries. You want to automate the execution of unit tests with each new push to your development branch in Cloud Source Repositories. What should you do?

  • A. Write a script that sequentially performs the push to your development branch and executes the unit tests on Cloud Run.
  • B. Using Cloud Build, set an automated trigger to execute the unit tests when changes are pushed to your development branch.
  • C. Set up a Cloud Logging sink to a Pub/Sub topic that captures interactions with Cloud Source Repositories. Configure a Pub/Sub trigger for Cloud Run, and execute the unit tests on Cloud Run.
  • D. Set up a Cloud Logging sink to a Pub/Sub topic that captures interactions with Cloud Source Repositories. Execute the unit tests using a Cloud Function that is triggered when messages are sent to the Pub/Sub topic.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)

Reasoning: Cloud Build is Google Cloud’s fully managed continuous integration/continuous delivery (CI/CD) platform. It provides native integration with Cloud Source Repositories, allowing you to easily configure automated triggers that respond to specific events, such as pushes to a development branch. Once triggered, Cloud Build can execute a series of steps defined in a `cloudbuild.yaml` file, which can include installing custom libraries and running unit tests. This approach is the standard and most efficient way to automate CI tasks in Google Cloud.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Writing a script that *sequentially performs the push and executes unit tests* doesn’t address the automation *on push* requirement. The goal is for the tests to run automatically *after* a push occurs, not as part of a manual or pre-push script.
  • Option C is incorrect: While technically possible to set up a complex chain of Cloud Logging, Pub/Sub, and Cloud Run, it’s an overly complicated and indirect method for a task that Cloud Build is explicitly designed to handle directly and more efficiently. Cloud Build offers direct triggers for Cloud Source Repositories pushes.
  • Option D is incorrect: Similar to Option C, using a Cloud Logging sink and Pub/Sub to trigger a Cloud Function is an unnecessarily complex mechanism for detecting pushes. Furthermore, Cloud Functions typically have resource (memory, CPU, execution time) limitations that might make them unsuitable for running comprehensive unit tests, especially those involving custom libraries or significant computation. Cloud Build provides a more robust and flexible environment for such tasks.

Reference: https://cloud.google.com/build/docs/running-builds/automate-builds-on-source-changes

QUESTION 20

You are training an LSTM-based model on AI Platform to summarize text using the following job submission script: gcloud ai-platform jobs submit training $JOB_NAME \

–package-path $TRAINER_PACKAGE_PATH \

–module-name $MAIN_TRAINER_MODULE \

–job-dir $JOB_DIR \

–region $REGION \

–scale-tier basic \

— \

–epochs 20 \

–batch_size=32 \

–learning_rate=0.001 \

You want to ensure that training time is minimized without significantly compromising the accuracy of your model. What should you do?

  • A. Modify the 'epochs' parameter.
  • B. Modify the 'scale-tier' parameter.
  • C. Modify the 'batch size' parameter.
  • D. Modify the 'learning rate' parameter.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

To minimize training time without significantly compromising model accuracy, the most direct approach is to increase the computational resources available for training. The ‘scale-tier’ parameter in AI Platform (now Vertex AI Training) directly controls the type and number of machines used for a training job. Changing the ‘scale-tier’ from ‘basic’ to a more powerful option (e.g., ‘standard’, ‘premium’, or a ‘custom’ tier with GPUs) will provide more compute power, allowing the same training process (same number of epochs, batch size, learning rate) to complete in less wall-clock time. This approach primarily impacts the speed of execution, not the intrinsic learning dynamics or the final accuracy of the model, assuming the model can effectively utilize the increased resources and the training process is stable.

  • A: Modify the ‘epochs’ parameter: Reducing epochs directly reduces training time but can significantly compromise accuracy if the model hasn’t converged sufficiently. If the model is overfitting, reducing epochs might help, but it’s a direct trade-off with the model’s ability to learn.
  • C: Modify the ‘batch size’ parameter: Changing batch size affects both training time per epoch and model convergence/generalization. Larger batch sizes can sometimes speed up individual steps but may require more epochs to converge, or they can lead to poorer generalization (lower accuracy).
  • D: Modify the ‘learning rate’ parameter: The learning rate is crucial for convergence speed and final accuracy. An optimal learning rate can speed up convergence, but an incorrect one can lead to divergence or slow convergence, significantly affecting accuracy.

Reference: https://cloud.google.com/ai-platform/training/docs/machine-types-training

QUESTION 21

You have deployed multiple versions of an image classification model on AI Platform. You want to monitor the performance of the model versions over time. How should you perform this comparison?

  • A. Compare the loss performance for each model on a held-out dataset.
  • B. Compare the loss performance for each model on the validation data.
  • C. Compare the receiver operating characteristic (ROC) curve for each model using the What-If Tool.
  • D. Compare the mean average precision across the models using the Continuous Evaluation feature.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: Comparing the mean average precision (mAP) across models using the Continuous Evaluation feature is the most appropriate method. mAP is a robust and widely accepted metric for evaluating the performance of image classification models, especially in multi-class or multi-label scenarios, as it considers both precision and recall. AI Platform’s (now Vertex AI) Continuous Evaluation feature is specifically designed to monitor deployed model performance over time and compare different model versions, automatically tracking key metrics to detect performance degradation or drift.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Comparing loss performance on a held-out dataset is primarily a method for model development and evaluation during training, not for ongoing monitoring of deployed models over time. Loss is a training objective and often less intuitive for direct performance comparison in production than classification metrics like precision, recall, or mAP.
  • Option B is incorrect: Comparing loss performance on validation data is incorrect for the same reasons as Option A. Validation data is used during the training process to tune hyperparameters and prevent overfitting, not for monitoring deployed models in production.
  • Option C is incorrect: While Receiver Operating Characteristic (ROC) curves are valuable for evaluating classification models, using the What-If Tool to compare them is not the primary or most scalable method for monitoring multiple model versions over time. The What-If Tool is best suited for interactive exploration, debugging, and understanding model fairness for individual predictions or small datasets, rather than systematic continuous performance monitoring across versions.

Reference: https://cloud.google.com/ai-platform/prediction/docs/model-monitoring

QUESTION 22

You trained a text classification model. You have the following SignatureDefs:

You started a TensorFlow-serving component server and tried to send an HTTP request to get a prediction using: headers = {"content-type": "application/json"} json_response = requests.post(‘http: //localhost:8501/v1/models/text_model:predict’, data=data, headers=headers)

What is the correct way to write the predict request?

  • A. data = json.dumps({ג€signature_nameג€: ג€seving_defaultג€, ג€instancesג€ [['ab', 'bc', 'cd']]})
  • B. data = json.dumps({ג€signature_nameג€: ג€serving_defaultג€, ג€instancesג€ [['a', 'b', 'c', 'd', 'e', 'f']]})
  • C. data = json.dumps({ג€signature_nameג€: ג€serving_defaultג€, ג€instancesג€ [['a', 'b', 'c'], ['d', 'e', 'f']]})
  • D. data = json.dumps({ג€signature_nameג€: ג€serving_defaultג€, ג€instancesג€ [['a', 'b'], ['c', 'd'], ['e', 'f']]})
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)The SignatureDef for ‘serving_default’ specifies an input named ‘text’ with a shape of (-1, 2) and dtype DT_STRING. This means the model expects batches of string inputs, where each individual instance within the batch is an array of exactly two strings. Option D correctly structures the ‘instances’ array for the prediction request. It provides three instances, each containing an array of two strings (e.g., ['a', 'b']), perfectly matching the (-1, 2) input shape.

❌ Why the other choices are incorrect:

  • Option A is incorrect: The signature_name has a typo (‘seving_default’ instead of ‘serving_default’). More importantly, it provides one instance with three strings (['ab', 'bc', 'cd']), which does not match the required input shape of two strings per instance.
  • Option B is incorrect: It provides one instance with six strings (['a', 'b', 'c', 'd', 'e', 'f']), which does not match the required input shape of two strings per instance.
  • Option C is incorrect: It provides two instances, but each instance contains three strings (e.g., ['a', 'b', 'c']), which does not match the required input shape of two strings per instance.

Reference: https://www.tensorflow.org/tfx/serving/api_rest#request_format_2

QUESTION 23

Your organization’s call center has asked you to develop a model that analyzes customer sentiments in each call. The call center receives over one million calls daily, and data is stored in Cloud Storage. The data collected must not leave the region in which the call originated, and no Personally Identifiable Information (PII) can be stored or analyzed. The data science team has a third-party tool for visualization and access which requires a SQL ANSI-2011 compliant interface. You need to select components for data processing and for analytics. How should the data pipeline be designed?

  • A. 1= Dataflow, 2= BigQuery
  • B. 1 = Pub/Sub, 2= Datastore
  • C. 1 = Dataflow, 2 = Cloud SQL
  • D. 1 = Cloud Function, 2= Cloud SQL
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)Reasoning: For Component 1, Dataflow is the most suitable choice. It’s a fully managed service for large-scale data processing that can efficiently orchestrate the transcription of over one million daily calls using the Google Speech-to-Text API and ensure PII redaction with the Cloud Data Loss Prevention API. Dataflow supports regional execution, addressing data residency requirements. For Component 2, BigQuery is ideal. It is a highly scalable, serverless data warehouse designed for analytics on massive datasets. BigQuery fully supports ANSI-2011 compliant SQL, meeting the visualization tool’s interface requirement, and offers optimal performance and cost-efficiency for analytical queries at this scale.

Reference: https://cloud.google.com/dataflow/docs; https://cloud.google.com/bigquery/docs

QUESTION 24

You are an ML engineer at a global shoe store. You manage the ML models for the company’s website. You are asked to build a model that will recommend new products to the user based on their purchase behavior and similarity with other users. What should you do?

  • A. Build a classification model.
  • B. Build a knowledge-based filtering model.
  • C. Build a collaborative-based filtering model.
  • D. Build a regression model using the features as predictors.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

The problem describes a classic scenario for a recommendation system where new products are suggested based on a user’s purchase behavior and their similarity to other users. This approach is precisely what Collaborative Filtering models are designed for. Collaborative filtering works by analyzing the preferences or behavior of many users (e.g., purchases, ratings) to find patterns and make recommendations. It leverages the ‘wisdom of the crowd’ by assuming that if two users have similar preferences for some items, they will likely have similar preferences for other items.

A: Build a classification model. While one could frame a recommendation as a binary classification (e.g., ‘will the user buy this product?’), it doesn’t inherently capture the ‘similarity with other users’ aspect as effectively as collaborative filtering for discovering new items.

B: Build a knowledge-based filtering model. Knowledge-based systems rely on explicit item characteristics and user preferences, often requiring users to specify their needs. They don’t primarily leverage user-item interaction data or user similarity in the way described.

D: Build a regression model using the features as predictors. A regression model might predict a numerical rating for an item, but it typically doesn’t directly address the ‘similarity with other users’ and the discovery of new recommendations based on collective behavior as comprehensively as a collaborative filtering approach.

Reference: https://cloud.google.com/architecture/overview-of-recommender-systems

QUESTION 25

You work for a social media company. You need to detect whether posted images contain cars. Each training example is a member of exactly one class. You have trained an object detection neural network and deployed the model version to AI Platform Prediction for evaluation. Before deployment, you created an evaluation job and attached it to the AI Platform Prediction model version. You notice that the precision is lower than your business requirements allow. How should you adjust the model’s final layer softmax threshold to increase precision?

  • A. Increase the recall.
  • B. Decrease the recall.
  • C. Increase the number of false positives.
  • D. Decrease the number of false negatives.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

To increase precision, the model needs to be more conservative in its positive predictions, meaning it should only classify an image as containing a car if it is highly confident. This is achieved by increasing the softmax threshold. When the threshold is increased, fewer instances will be classified as positive. This typically leads to a reduction in false positives (FP), which directly increases precision (Precision = TP / (TP + FP)). However, a consequence of increasing the threshold is that some true positive instances that had a lower confidence score will now be classified as negative, becoming false negatives (FN). This reduction in true positives (TP) and increase in false negatives (FN) results in a decrease in recall (Recall = TP / (TP + FN)). Therefore, to increase precision, you typically adjust the threshold in a way that decreases recall.

Reference: https://developers.google.com/machine-learning/crash-course/precision-and-recall/video-quiz

QUESTION 26

You are responsible for building a unified analytics environment across a variety of on-premises data marts. Your company is experiencing data quality and security challenges when integrating data across the servers, caused by the use of a wide range of disconnected tools and temporary solutions. You need a fully managed, cloud-native data integration service that will lower the total cost of work and reduce repetitive work. Some members on your team prefer a codeless interface for building Extract, Transform, Load (ETL) process. Which service should you use?

  • A. Dataflow
  • B. Dataprep
  • C. Apache Flink
  • D. Cloud Data Fusion
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)

Reasoning: Cloud Data Fusion is a fully managed, cloud-native data integration service built on open-source CDAP. It provides a graphical user interface (GUI) for building and managing ETL/ELT pipelines, directly addressing the requirement for a ‘codeless interface’ and ‘reducing repetitive work’. It is designed to integrate data from various sources, including on-premises data marts, into a unified analytics environment, thereby solving data quality and security challenges by centralizing integration efforts.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Dataflow is a powerful service for executing Apache Beam pipelines, but it primarily relies on code (Java, Python, Go) for defining data transformations. It does not offer a codeless, graphical interface as requested.
  • Option B is incorrect: Dataprep is excellent for data profiling, cleaning, and preparation with a visual interface, but it’s more focused on data wrangling within Google Cloud environments rather than acting as a comprehensive, multi-source data integration service for unifying disparate on-premises data marts through ETL pipelines.
  • Option C is incorrect: Apache Flink is an open-source stream processing framework. It is not a fully managed Google Cloud service and requires significant operational overhead. It also does not inherently provide a codeless interface, contradicting the question’s requirements.

Reference: https://cloud.google.com/data-fusion/docs

QUESTION 27

You are an ML engineer at a regulated insurance company. You are asked to develop an insurance approval model that accepts or rejects insurance applications from potential customers. What factors should you consider before building the model?

  • A. Redaction, reproducibility, and explain ability.
  • B. Traceability, reproducibility, and explain ability.
  • C. Federated learning, reproducibility, and explain ability.
  • D. Differential privacy, federated learning, and explain ability.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

For an ML engineer developing an insurance approval model for a regulated company, several key factors are crucial before model building:

  • Traceability: In a regulated environment, it’s paramount to be able to track the lineage of data, model versions, training parameters, and decisions made by the model. This allows for auditing, debugging, and proving compliance with regulations. Auditors need to understand the full lifecycle from data ingestion to model deployment and inference.
  • Reproducibility: The ability to consistently reproduce the model’s training process and its predictions is essential for verification, validation, and auditing. If a model’s decision or performance is questioned, it must be possible to replicate the results reliably.
  • Explainability: Especially for sensitive decisions like insurance approvals, models must be explainable. Regulators and customers often require understanding why a particular decision (e.g., acceptance or rejection) was made, aligning with principles of fair lending and consumer protection.

Comparing this to other options:

  • Redaction (Option A): While data privacy and redaction are important for sensitive data, traceability is a broader and more fundamental requirement for auditing the entire ML lifecycle in a regulated context.
  • Federated learning (Options C and D) and Differential privacy (Option D): These are specific advanced techniques primarily focused on privacy-preserving machine learning. While privacy is a concern, they are specific *solutions* or *approaches*, rather than fundamental *factors to consider* at the same level as traceability, reproducibility, and explainability, which are overarching requirements for regulatory compliance and trust in an insurance context.

Therefore, Traceability, Reproducibility, and Explainability are the most critical factors to consider before building such a model.

Reference: https://cloud.google.com/architecture/guidance/mlops-governance-security#traceability_and_auditability; https://cloud.google.com/architecture/framework/machine-learning/ml-operations#reproducibility; https://cloud.google.com/architecture/responsible-ai-principles

QUESTION 28 (Multi-Select)

You are training a Resnet model on AI Platform using TPUs to visually categorize types of defects in automobile engines. You capture the training profile using the Cloud TPU profiler plugin and observe that it is highly input-bound. You want to reduce the bottleneck and speed up your model training process. Which modifications should you make to the tf.data dataset? (Choose two.)

  • A. Use the interleave option for reading data.
  • B. Reduce the value of the repeat parameter.
  • C. Increase the buffer size for the shuttle option.
  • D. Set the prefetch option equal to the training batch size.
  • E. Decrease the batch size argument in your transformation.
Click to View Verified Solution & Explanation

Correct Option: A,D

Explanation:

When training a model with TPUs, an input-bound profile indicates that the data pipeline is slower than the model’s computation, causing the TPU to wait for data. To mitigate this, modifications to the tf.data dataset are required to speed up data loading and preprocessing.

  • Option A: Use the interleave option for reading data. The tf.data.Dataset.interleave() transformation allows for parallel reading and processing of data from multiple input files. This is highly effective in reducing input bottlenecks by overlapping I/O operations and ensuring that data is fetched concurrently, rather than sequentially.
  • Option D: Set the prefetch option equal to the training batch size. The tf.data.Dataset.prefetch() transformation overlaps the data producer (input pipeline) with the data consumer (model training). By prefetching data, the next batch is loaded and preprocessed in the background while the current batch is being consumed by the model. Setting the prefetch buffer size appropriately (e.g., equal to the training batch size or using tf.data.AUTOTUNE) ensures that the TPU is kept busy and doesn’t idle waiting for data.

Why the other choices are incorrect:

  • Option B: Reduce the value of the repeat parameter. The repeat() transformation controls the number of epochs or iterations the dataset will produce. Reducing it would simply shorten the training time by running fewer epochs, but it would not address the underlying speed bottleneck of the data pipeline itself per epoch.
  • Option C: Increase the buffer size for the shuttle option. There is no standard ‘shuttle’ option in the tf.data API. Assuming it refers to the shuffle() buffer size, increasing the buffer size for shuffling primarily improves the randomness of the data order, which is good for model convergence. However, it does not directly speed up the rate at which data is loaded or processed; in some cases, a very large shuffle buffer might even introduce initial overhead while filling.
  • Option E: Decrease the batch size argument in your transformation. Decreasing the batch size generally leads to more frequent, smaller computations and more overhead per batch. On TPUs, larger batch sizes are often preferred to maximize utilization. Reducing the batch size would likely exacerbate an input-bound problem because the overhead of fetching and processing each batch would become relatively larger compared to the compute time, making the pipeline more bottlenecked by input.

Reference: https://www.tensorflow.org/guide/data_performance

QUESTION 29

You have trained a model on a dataset that required computationally expensive preprocessing operations. You need to execute the same preprocessing at prediction time. You deployed the model on AI Platform for high-throughput online prediction. Which architecture should you use?

  • A. Validate the accuracy of the model that you trained on preprocessed data. Create a new model that uses the raw data and is available in real time. Deploy the new model onto AI Platform for online prediction.
  • B. Send incoming prediction requests to a Pub/Sub topic. Transform the incoming data using a Dataflow job. Submit a prediction request to AI Platform using the transformed data. Write the predictions to an outbound Pub/Sub queue.
  • C. Stream incoming prediction request data into Cloud Spanner. Create a view to abstract your preprocessing logic. Query the view every second for new records. Submit a prediction request to AI Platform using the transformed data. Write the predictions to an outbound Pub/Sub queue.
  • D. Send incoming prediction requests to a Pub/Sub topic. Set up a Cloud Function that is triggered when messages are published to the Pub/Sub topic. Implement your preprocessing logic in the Cloud Function. Submit a prediction request to AI Platform using the transformed data. Write the predictions to an outbound Pub/Sub queue.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

The correct answer is B: Send incoming prediction requests to a Pub/Sub topic. Transform the incoming data using a Dataflow job. Submit a prediction request to AI Platform using the transformed data. Write the predictions to an outbound Pub/Sub queue.

Here is the architectural reasoning based on Google Cloud best practices:

Why B is the right choice

The key phrases in the prompt are “computationally expensive preprocessing operations” and “high-throughput.”

Cloud Dataflow (Option B) is Google Cloud’s purpose-built service for large-scale, high-throughput streaming and batch data processing. It is specifically designed to handle computationally heavy transformations in real-time by automatically scaling out worker nodes. It natively integrates with Pub/Sub for ingest and egress, making it the perfect streaming architecture for heavy ML preprocessing.

QUESTION 30

Your team trained and tested a DNN regression model with good results. Six months after deployment, the model is performing poorly due to a change in the distribution of the input data. How should you address the input differences in production?

  • A. Create alerts to monitor for skew, and retrain the model.
  • B. Perform feature selection on the model, and retrain the model with fewer features.
  • C. Retrain the model, and select an L2 regularization parameter with a hyperparameter tuning service.
  • D. Perform feature selection on the model, and retrain the model on a monthly basis with fewer features.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: The problem states the model is performing poorly due to a ‘change in the distribution of the input data,’ which is known as data drift or input skew. The most effective approach is to first monitor for this skew. Creating alerts ensures timely detection of significant distribution changes. Once skew is detected, retraining the model on the updated data distribution is the standard and necessary step to adapt the model to the new input patterns and restore its performance.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Performing feature selection and retraining with fewer features might reduce complexity or address irrelevant features, but it doesn’t directly solve the issue of a change in the distribution of existing, potentially relevant, features. It’s not the primary response to data drift.
  • Option C is incorrect: While retraining is part of the solution, L2 regularization primarily addresses overfitting to the training data and improves generalization. It does not directly account for or adapt to a shift in the input data distribution itself. Hyperparameter tuning for L2 would still be based on the data available, without explicitly detecting or reacting to drift.
  • Option D is incorrect: Similar to B, feature selection is not the core solution for data drift. Retraining monthly is a continuous training strategy, which can help, but it’s a reactive, fixed-interval approach that doesn’t necessarily align with when the data drift actually occurs. Monitoring and alerting (Option A) provides a more proactive and responsive mechanism to detect and react to skew as it happens.

Reference: https://cloud.google.com/vertex-ai/docs/model-monitoring/overview

QUESTION 31

You need to train a computer vision model that predicts the type of government ID present in a given image using a GPU-powered virtual machine on Compute Engine. You use the following parameters:

✑ Optimizer: SGD

✑ Image shape = 224ֳ—224

✑ Batch size = 64

✑ Epochs = 10

✑ Verbose =2

During training you encounter the following error: ResourceExhaustedError: Out of Memory (OOM) when allocating tensor. What should you do?

  • A. Change the optimizer.
  • B. Reduce the batch size.
  • C. Change the learning rate.
  • D. Reduce the image shape.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

A ResourceExhaustedError: Out of Memory (OOM) during model training indicates that the GPU’s memory limit has been exceeded. This commonly occurs when the allocated tensors for processing data or model parameters exceed the available memory. The batch size directly determines the amount of data (images and intermediate activations) that are processed simultaneously. A larger batch size requires more GPU memory. Reducing the batch size will decrease the memory footprint per training step, making it the most direct and effective solution to alleviate OOM errors without necessarily compromising the input data quality (image shape) or core training process (optimizer, learning rate).

Why the other choices are incorrect:

  • A: Change the optimizer. Optimizers like SGD manage how weights are updated and typically have a minimal impact on overall memory consumption compared to data and model parameters.
  • C: Change the learning rate. The learning rate controls the magnitude of weight updates and has no direct effect on memory usage.
  • D: Reduce the image shape. While reducing image shape would reduce memory, it is often a secondary step as it can significantly impact model performance and is generally less preferred than first adjusting batch size. Reducing batch size is a more common and less impactful first step for OOM.

Reference: https://www.tensorflow.org/guide/troubleshooting

QUESTION 32

You developed an ML model with AI Platform, and you want to move it to production. You serve a few thousand queries per second and are experiencing latency issues. Incoming requests are served by a load balancer that distributes them across multiple Kubeflow CPU-only pods running on Google Kubernetes Engine (GKE). Your goal is to improve the serving latency without changing the underlying infrastructure.

What should you do?

  • A. Significantly increase the max_batch_size TensorFlow Serving parameter.
  • B. Switch to the tensorflow-model-server-universal version of TensorFlow Serving.
  • C. Significantly increase the max_enqueued_batches TensorFlow Serving parameter.
  • D. Recompile TensorFlow Serving using the source to support CPU-specific optimizations. Instruct GKE to choose an appropriate baseline minimum CPU platform for serving nodes.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

The core problem is high serving latency on CPU-only Kubeflow pods on GKE. The constraint is to improve latency without changing the underlying infrastructure (i.e., staying with CPU-only GKE pods).

Option D addresses this directly: TensorFlow Serving, when compiled from source, can be optimized with CPU-specific instruction sets (e.g., AVX, AVX2, AVX512) that are not typically enabled in universal pre-built binaries for broad compatibility. These optimizations can significantly accelerate CPU-bound inference tasks. By then instructing GKE to use a specific baseline minimum CPU platform (e.g., Intel Broadwell or Skylake), you ensure that the serving nodes provide the hardware capabilities required by your custom-compiled, optimized TensorFlow Serving binary, thus maximizing performance and reducing latency.

Reference: https://www.tensorflow.org/tfx/serving/serving_performance https://cloud.google.com/kubernetes-engine/docs/concepts/node-images

QUESTION 33

You have a demand forecasting pipeline in production that uses Dataflow to preprocess raw data prior to model training and prediction. During preprocessing, you employ Z-score normalization on data stored in BigQuery and write it back to BigQuery. New training data is added every week. You want to make the process more efficient by minimizing computation time and manual intervention. What should you do?

  • A. Normalize the data using Google Kubernetes Engine.
  • B. Translate the normalization algorithm into SQL for use with BigQuery.
  • C. Use the normalizer_fn argument in TensorFlow's Feature Column API.
  • D. Normalize the data with Apache Spark using the Dataproc connector for BigQuery.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

Translating the Z-score normalization algorithm into SQL and executing it directly within BigQuery significantly optimizes the process. BigQuery’s powerful, serverless, and highly scalable query engine can efficiently compute the mean and standard deviation and apply the normalization formula across large datasets without requiring data movement out to an external processing engine like Dataflow or Spark. This approach minimizes computation time by leveraging BigQuery’s native capabilities and reduces manual intervention as the SQL query can be scheduled directly within BigQuery or orchestrated via Cloud Composer, eliminating the need to manage external processing jobs for this specific task.

Reference: https://cloud.google.com/bigquery/docs/reference/standard-sql/analytic-functions

QUESTION 34

You need to design a customized deep neural network in Keras that will predict customer purchases based on their purchase history. You want to explore model performance using multiple model architectures, store training data, and be able to compare the evaluation metrics in the same dashboard. What should you do?

  • A. Create multiple models using AutoML Tables.
  • B. Automate multiple training runs using Cloud Composer.
  • C. Run multiple training jobs on AI Platform with similar job names.
  • D. Create an experiment in Kubeflow Pipelines to organize multiple runs.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation: The user needs to design a customized Keras deep neural network, explore multiple architectures, store training data, and compare evaluation metrics in a single dashboard. Kubeflow Pipelines is specifically designed for this purpose. An experiment in Kubeflow Pipelines allows users to organize multiple runs, each potentially with a different model architecture or hyperparameters. It provides a user interface to track and compare evaluation metrics across these runs, making it ideal for experimental model development and performance comparison.

Reference: https://www.kubeflow.org/docs/pipelines/sdk/pipelines-overview/

QUESTION 35

You are developing a Kubeflow pipeline on Google Kubernetes Engine. The first step in the pipeline is to issue a query against BigQuery. You plan to use the results of that query as the input to the next step in your pipeline. You want to achieve this in the easiest way possible. What should you do?

  • A. Use the BigQuery console to execute your query, and then save the query results into a new BigQuery table.
  • B. Write a Python script that uses the BigQuery API to execute queries against BigQuery. Execute this script as the first step in your Kubeflow pipeline.
  • C. Use the Kubeflow Pipelines domain-specific language to create a custom component that uses the Python BigQuery client library to execute queries.
  • D. Locate the Kubeflow Pipelines repository on GitHub. Find the BigQuery Query Component, copy that component's URL, and use it to load the component into your pipeline. Use the component to execute queries against BigQuery.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: Kubeflow Pipelines offers a rich ecosystem of pre-built components for common tasks, including interacting with Google Cloud services like BigQuery. The google-cloud-pipeline-components library (which is often hosted on GitHub and available for direct use) provides ready-to-use components. Leveraging a pre-existing component is the easiest and most efficient way to integrate BigQuery query execution into a Kubeflow pipeline without writing custom code from scratch. You simply load the component (e.g., via its URL or from a component catalog) and configure it with your query.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Executing a query manually via the BigQuery console is not an automated step within a Kubeflow pipeline. It defeats the purpose of an automated MLOps workflow.
  • Option B is incorrect: While writing a Python script and wrapping it as a pipeline step is a valid approach for custom logic, it requires more development effort than utilizing an existing, pre-built component. The question asks for the ‘easiest way possible’.
  • Option C is incorrect: Creating a custom component using the Kubeflow Pipelines DSL also involves writing code and defining the component’s specification. While powerful for unique requirements, it is not the ‘easiest’ when a standard component already exists for BigQuery interaction.

Reference: https://cloud.google.com/vertex-ai/docs/pipelines/build-pipeline#build-pipelines-using-google-cloud-pipeline-components

QUESTION 36

You are building a model to predict daily temperatures. You split the data randomly and then transformed the training and test datasets. Temperature data for model training is uploaded hourly. During testing, your model performed with 97% accuracy; however, after deploying to production, the model’s accuracy dropped to 66%. How can you make your production model more accurate?

  • A. Normalize the data for the training, and test datasets as two separate steps.
  • B. Split the training and test data based on time rather than a random split to avoid leakage.
  • C. Add more data to your test set to ensure that you have a fair distribution and sample for testing.
  • D. Apply data transformations before splitting, and cross-validate to make sure that the transformations are applied to both the training and test sets.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

The problem describes a scenario where a model predicts daily temperatures, with hourly data uploads. This indicates time-series data. A significant drop in accuracy from testing (97%) to production (66%) after a random data split is a strong indicator of temporal data leakage. When dealing with time-series data, a random split can expose future information to the training set, leading to an over-optimistic evaluation during testing. In production, the model must predict future values based only on past data. Splitting the data based on time (e.g., using older data for training and newer data for testing) accurately simulates the real-world production environment and prevents this type of leakage, ensuring a more realistic performance evaluation and better production accuracy.

Reference: https://developers.google.com/machine-learning/crash-course/data-preparation-and-feature-engineering/data-leakage

QUESTION 37

You are developing models to classify customer support emails. You created models with TensorFlow Estimators using small datasets on your on-premises system, but you now need to train the models using large datasets to ensure high performance. You will port your models to Google Cloud and want to minimize code refactoring and infrastructure overhead for easier migration from on-prem to cloud. What should you do?

  • A. Use AI Platform for distributed training.
  • B. Create a cluster on Dataproc for training.
  • C. Create a Managed Instance Group with autoscaling.
  • D. Use Kubeflow Pipelines to train on a Google Kubernetes Engine cluster.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

The problem asks for a solution to port TensorFlow Estimator models from on-premises to Google Cloud for training with large datasets, while minimizing code refactoring and infrastructure overhead.

A: Use AI Platform for distributed training. AI Platform (now part of Vertex AI) is a fully managed service designed for training machine learning models, including those built with TensorFlow Estimators. It natively supports distributed training, allowing models to scale to large datasets without significant code changes to the Estimator itself. The service handles the underlying infrastructure, thereby minimizing operational overhead and facilitating an easier migration from on-premises environments.

B: Create a cluster on Dataproc for training. Dataproc is primarily a managed Spark and Hadoop service. While it is possible to run TensorFlow on Dataproc, it is not the most direct or managed solution for TensorFlow Estimator models, and would likely involve more setup and management overhead compared to AI Platform Training.

C: Create a Managed Instance Group with autoscaling. A Managed Instance Group (MIG) provides managed VMs but requires manual setup of the TensorFlow environment and orchestration of distributed training. This approach would significantly increase infrastructure overhead and necessitate more custom code for distributed training, which contradicts the goal of minimizing overhead and refactoring.

D: Use Kubeflow Pipelines to train on a Google Kubernetes Engine cluster. Kubeflow Pipelines on GKE is a robust platform for MLOps workflows and model orchestration. However, setting up and managing a GKE cluster and Kubeflow introduces considerable infrastructure complexity and overhead compared to using a fully managed service like AI Platform Training, especially when the primary goal is minimizing overhead for migration.

Reference: https://cloud.google.com/vertex-ai/docs/training/create-custom-job#tf-estimator

QUESTION 38

You have trained a text classification model in TensorFlow using AI Platform. You want to use the trained model for batch predictions on text data stored in

BigQuery while minimizing computational overhead. What should you do?

  • A. Export the model to BigQuery ML.
  • B. Deploy and version the model on AI Platform.
  • C. Use Dataflow with the SavedModel to read the data from BigQuery.
  • D. Submit a batch prediction job on AI Platform that points to the model location in Cloud Storage.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation: The question asks to perform batch predictions on text data in BigQuery with a TensorFlow model trained on AI Platform, while minimizing computational overhead.

  • Option A: Export the model to BigQuery ML. BigQuery ML allows importing custom TensorFlow SavedModels. Once imported, you can use the ML.PREDICT function directly on your BigQuery tables. This approach keeps the data within BigQuery and leverages BigQuery’s optimized engine for inference, significantly minimizing data movement and the overhead of managing external compute resources or data pipelines. This is generally the most efficient method when your data is already in BigQuery.

Why the other choices are incorrect:

  • Option B: Deploy and version the model on AI Platform. This is primarily for online (real-time, low-latency) predictions, not batch predictions. While AI Platform supports both, deploying for online prediction is not the correct action for a batch scenario.
  • Option C: Use Dataflow with the SavedModel to read the data from BigQuery. Dataflow is a powerful and flexible option for large-scale data processing and batch predictions. However, it involves spinning up and managing a separate distributed processing cluster, which can introduce more computational overhead compared to performing inference directly within BigQuery using BigQuery ML, especially when the data is already in BigQuery.
  • Option D: Submit a batch prediction job on AI Platform that points to the model location in Cloud Storage. AI Platform Batch Prediction is a valid method for batch inference. However, for data residing directly in BigQuery, it might still involve some data movement or internal conversion to a format compatible with AI Platform’s batch prediction input (e.g., exporting to Cloud Storage first). While it’s a correct way to do batch predictions, BigQuery ML offers a more integrated and potentially lower-overhead solution when the data source is BigQuery itself.

Reference: https://cloud.google.com/bigquery-ml/docs/import-tensorflow-models

QUESTION 39

You work with a data engineering team that has developed a pipeline to clean your dataset and save it in a Cloud Storage bucket. You have created an ML model and want to use the data to refresh your model as soon as new data is available. As part of your CI/CD workflow, you want to automatically run a Kubeflow

Pipelines training job on Google Kubernetes Engine (GKE). How should you architect this workflow?

  • A. Configure your pipeline with Dataflow, which saves the files in Cloud Storage. After the file is saved, start the training job on a GKE cluster.
  • B. Use App Engine to create a lightweight python client that continuously polls Cloud Storage for new files. As soon as a file arrives, initiate the training job.
  • C. Configure a Cloud Storage trigger to send a message to a Pub/Sub topic when a new file is available in a storage bucket. Use a Pub/Sub-triggered Cloud Function to start the training job on a GKE cluster.
  • D. Use Cloud Scheduler to schedule jobs at a regular interval. For the first step of the job, check the timestamp of objects in your Cloud Storage bucket. If there are no new files since the last run, abort the job.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: This option describes an ideal event-driven architecture for triggering actions based on Cloud Storage events. Cloud Storage object change notifications can be configured to publish messages to a Pub/Sub topic whenever new data is available. A Pub/Sub-triggered Cloud Function can then subscribe to this topic and execute custom code, such as initiating a Kubeflow Pipelines training job on a GKE cluster, as soon as a message (indicating a new file) arrives. This approach is highly efficient, scalable, and responds in near real-time, fulfilling the requirement to refresh the model "as soon as new data is available" as part of a CI/CD workflow.

❌ Why the other choices are incorrect:

  • Option A is incorrect: While Dataflow is excellent for data processing and saving files to Cloud Storage, this option lacks a specified mechanism for automatically triggering the training job immediately after a file is saved. It doesn’t detail how the event of a new file’s arrival initiates the GKE job.
  • Option B is incorrect: Continuously polling Cloud Storage with an App Engine client is an inefficient and resource-intensive method. It consumes compute resources even when no new data is present and introduces latency between file arrival and detection, which is contrary to an event-driven "as soon as new data is available" requirement. Google Cloud offers superior event notification services.
  • Option D is incorrect: Using Cloud Scheduler to periodically check for new files is a batch-oriented approach, not an event-driven one. It will introduce delays (latency) as it only checks at predefined intervals, failing to meet the requirement to refresh the model "as soon as new data is available."

Reference: https://cloud.google.com/storage/docs/object-change-notification#pubsub; https://cloud.google.com/functions/docs/calling/pubsub; https://cloud.google.com/kubernetes-engine/docs/how-to/deploy-workloads-from-cloud-functions

QUESTION 40 (Multi-Select)

You have a functioning end-to-end ML pipeline that involves tuning the hyperparameters of your ML model using AI Platform, and then using the best-tuned parameters for training. Hypertuning is taking longer than expected and is delaying the downstream processes. You want to speed up the tuning job without significantly compromising its effectiveness. Which actions should you take? (Choose two.)

  • A. Decrease the number of parallel trials.
  • B. Decrease the range of floating-point values.
  • C. Set the early stopping parameter to TRUE.
  • D. Change the search algorithm from Bayesian search to random search.
  • E. Decrease the maximum number of trials during subsequent training phases
Click to View Verified Solution & Explanation

Correct Option: C,E

Explanation:

The question asks for two actions to speed up hyperparameter tuning on AI Platform without significantly compromising effectiveness.

  • C: Set the early stopping parameter to TRUE. Early stopping allows the hyperparameter tuning service to terminate trials that are performing poorly (e.g., their objective metric is not improving or is significantly worse than other trials) prematurely. This saves computational resources and time, speeding up the overall tuning process. By focusing resources on more promising trials, it can also maintain or even improve the effectiveness of the tuning.
  • E: Decrease the maximum number of trials during subsequent training phases. Reducing the maximum number of trials directly limits the total number of hyperparameter combinations the service will evaluate. Fewer trials mean less total computation time, thus speeding up the tuning job. While this can potentially compromise effectiveness if the optimal parameters are in the truncated search, it’s a direct and common method to control the tuning budget and duration, especially when done judiciously or in

    Reference: https://cloud.google.com/ai-platform/training/docs/hyperparameter-tuning-overview#early-stopping

QUESTION 41

Your team is building an application for a global bank that will be used by millions of customers. You built a forecasting model that predicts customers’ account balances 3 days in the future. Your team will use the results in a new feature that will notify users when their account balance is likely to drop below $25. How should you serve your predictions?

  • A. 1. Create a Pub/Sub topic for each user. 2. Deploy a Cloud Function that sends a notification when your model predicts that a user's account balance will drop below the $25 threshold.
  • B. 1. Create a Pub/Sub topic for each user. 2. Deploy an application on the App Engine standard environment that sends a notification when your model predicts that a user's account balance will drop below the $25 threshold.
  • C. 1. Build a notification system on Firebase. 2. Register each user with a user ID on the Firebase Cloud Messaging server, which sends a notification when the average of all account balance predictions drops below the $25 threshold.
  • D. 1. Build a notification system on Firebase. 2. Register each user with a user ID on the Firebase Cloud Messaging server, which sends a notification when your model predicts that a user's account balance will drop below the $25 threshold.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

✅ Option D (Correct)
Reasoning: Firebase Cloud Messaging (FCM) is specifically designed for sending targeted notifications to millions of users across various platforms (mobile, web). Registering each user with a unique ID on FCM allows the application to send personalized notifications based on individual model predictions. When the model predicts a specific user’s account balance will drop below $25, FCM can deliver a notification directly to that user, fulfilling the requirement for a scalable and personalized notification system.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Creating a Pub/Sub topic for each user is not a scalable or practical approach for millions of customers. While Cloud Functions can process events, building a custom notification system on top of per-user Pub/Sub topics is inefficient and complex compared to using FCM.
  • Option B is incorrect: Similar to Option A, creating a Pub/Sub topic for each user introduces significant scalability and management overhead. While App Engine can host scalable applications, it’s an overkill for just sending notifications when a specialized service like FCM exists.
  • Option C is incorrect: Although Firebase is the correct platform for notifications, this option incorrectly states that notifications would be sent when the average of all account balance predictions drops below the threshold. The requirement is to notify individual users based on their specific predicted balance.

Reference: https://firebase.google.com/docs/cloud-messaging

QUESTION 42

You work for an advertising company and want to understand the effectiveness of your company’s latest advertising campaign. You have streamed 500 MB of campaign data into BigQuery. You want to query the table, and then manipulate the results of that query with a pandas dataframe in an AI Platform notebook.

What should you do?

  • A. Use AI Platform Notebooks' BigQuery cell magic to query the data, and ingest the results as a pandas dataframe.
  • B. Export your table as a CSV file from BigQuery to Google Drive, and use the Google Drive API to ingest the file into your notebook instance.
  • C. Download your table from BigQuery as a local CSV file, and upload it to your AI Platform notebook instance. Use pandas.read_csv to ingest the file as a pandas dataframe.
  • D. From a bash cell in your AI Platform notebook, use the bq extract command to export the table as a CSV file to Cloud Storage, and then use gsutil cp to copy the data into the notebook. Use pandas.read_csv to ingest the file as a pandas dataframe.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: AI Platform Notebooks (now Vertex AI Workbench Notebooks) are Jupyter-based environments that offer convenient cell magics. The %%bigquery cell magic is specifically designed to execute BigQuery SQL queries directly within a notebook cell and automatically load the results into a pandas DataFrame. This method is highly efficient for transferring BigQuery query results directly into a pandas DataFrame for manipulation, especially for datasets of this size (500 MB). It provides a seamless integration between BigQuery and the notebook environment without requiring intermediate file exports or complex API calls.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Exporting data from BigQuery to Google Drive and then using the Google Drive API to ingest it into a notebook is overly complicated and inefficient. There are much more direct methods for integrating BigQuery with AI Platform Notebooks.
  • Option C is incorrect: Downloading the table as a local CSV file and then manually uploading it to the notebook instance is a manual, cumbersome, and non-scalable process. It’s not suitable for automated or production workflows and introduces unnecessary manual steps between the cloud services.
  • Option D is incorrect: While using bq extract to export to Cloud Storage and then gsutil cp to copy to the notebook instance’s file system, followed by pandas.read_csv, is technically possible, it involves multiple steps and is less efficient than the direct integration offered by BigQuery cell magic. For the stated requirement of querying and manipulating results in a pandas DataFrame directly, the cell magic is the most streamlined approach. This method is often preferred for very large exports that exceed memory limits or when persistent files in Cloud Storage are desired.

Reference: https://cloud.google.com/bigquery/docs/visualize-jupyter

QUESTION 43

You are an ML engineer at a global car manufacture. You need to build an ML model to predict car sales in different cities around the world. Which features or feature crosses should you use to train city-specific relationships between car type and number of sales?

  • A. Three individual features: binned latitude, binned longitude, and one-hot encoded car type.
  • B. One feature obtained as an element-wise product between latitude, longitude, and car type.
  • C. One feature obtained as an element-wise product between binned latitude, binned longitude, and one-hot encoded car type.
  • D. Two feature crosses as an element-wise product: the first between binned latitude and one-hot encoded car type, and the second between binned longitude and one-hot encoded car type.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Correct Answer: C — 3‑way cross (binned_lat × binned_lon × car_type)

Short, Exam‑Ready Explanation

To learn city‑specific car‑type sales patterns, the model must first be able to identify a city. Cities are not defined by latitude alone or longitude alone — those are global bands that stretch across continents.

✔ Step 1: Define a “city grid”

Binned latitude = horizontal band

Binned longitude = vertical band

Crossing them creates a 2D grid cell, which corresponds to a specific city or local region.

✔ Step 2: Learn city × car‑type interactions

Crossing this city grid with the one‑hot car type gives the model a feature that activates only for combinations like:

“Pickup truck × Dallas grid cell”

“Compact car × Tokyo grid cell”

“SUV × Munich grid cell”

This is exactly what the question asks for: city‑specific relationships between car type and sales.

✔ TensorFlow handles sparsity efficiently

Even though a 3‑way cross is large, TensorFlow uses hash buckets to keep the feature space compact and efficient. So dimensionality explosion is not a concern.

QUESTION 44

You work for a large technology company that wants to modernize their contact center. You have been asked to develop a solution to classify incoming calls by product so that requests can be more quickly routed to the correct support team. You have already transcribed the calls using the Speech-to-Text API. You want to minimize data preprocessing and development time. How should you build the model?

  • A. Use the AI Platform Training built-in algorithms to create a custom model.
  • B. Use AutoMlL Natural Language to extract custom entities for classification.
  • C. Use the Cloud Natural Language API to extract custom entities for classification.
  • D. Build a custom model to identify the product keywords from the transcribed calls, and then run the keywords through a classification algorithm.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation: The problem requires classifying transcribed calls by product with minimal data preprocessing and development time.

  • Option B: Use AutoML Natural Language to extract custom entities for classification. AutoML Natural Language is a managed service designed for training custom text classification, entity extraction, and sentiment analysis models with minimal machine learning expertise and development effort. For product classification, you would typically use its Custom Text Classification feature, where you label your transcribed calls with product categories. While the option specifically mentions “extract custom entities,” AutoML Natural Language is the most suitable tool among the choices for creating a custom NLP model to achieve classification quickly and with reduced development. It significantly reduces the burden of data preprocessing and model tuning compared to building a custom model from scratch.
  • Option A: Use the AI Platform Training built-in algorithms to create a custom model. While AI Platform Training (now part of Vertex AI Training) allows for custom model development, using built-in algorithms or custom code generally requires more hands-on ML expertise, data preprocessing, model configuration, and development time compared to AutoML services. This contradicts the requirement to minimize development time.
  • Option C: Use the Cloud Natural Language API to extract custom entities for classification. The Cloud Natural Language API provides pre-trained models for general sentiment, entity, and syntax analysis. It does not support training custom models for specific product entities or custom classification without significant additional development. This would not minimize development time, as its generic entity extraction would not inherently understand company-specific products.
  • Option D: Build a custom model to identify the product keywords from the transcribed calls, and then run the keywords through a classification algorithm. This approach explicitly involves building a custom model and a multi-step process (keyword identification then classification), which would maximize development time and data preprocessing, directly contradicting the requirement.

Therefore, AutoML Natural Language (Option B) is the most appropriate solution due to its focus on minimizing development time for custom NLP tasks.

Reference: https://cloud.google.com/automl-natural-language

QUESTION 45

You are training a TensorFlow model on a structured dataset with 100 billion records stored in several CSV files. You need to improve the input/output execution performance. What should you do?

  • A. Load the data into BigQuery, and read the data from BigQuery.
  • B. Load the data into Cloud Bigtable, and read the data from Bigtable.
  • C. Convert the CSV files into shards of TFRecords, and store the data in Cloud Storage.
  • D. Convert the CSV files into shards of TFRecords, and store the data in the Hadoop Distributed File System (HDFS).
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

Converting large CSV files into sharded TFRecords and storing them in Cloud Storage is the recommended best practice for optimizing input/output performance for TensorFlow model training on Google Cloud. TFRecords are a TensorFlow-specific binary serialization format that allows for efficient reading, parsing, and deserialization of data, which significantly reduces I/O overhead compared to text-based formats like CSV. Sharding the TFRecords enables parallel data loading and processing, further improving throughput. Cloud Storage provides highly scalable, durable, and performant object storage that integrates seamlessly with Google Cloud’s machine learning services, making it an ideal choice for storing large datasets for training.

Reference: https://www.tensorflow.org/tutorials/load_data/tfrecord

QUESTION 46

As the lead ML Engineer for your company, you are responsible for building ML models to digitize scanned customer forms. You have developed a TensorFlow model that converts the scanned images into text and stores them in Cloud Storage. You need to use your ML model on the aggregated data collected at the end of each day with minimal manual intervention. What should you do?

  • A. Use the batch prediction functionality of AI Platform.
  • B. Create a serving pipeline in Compute Engine for prediction.
  • C. Use Cloud Functions for prediction each time a new data point is ingested.
  • D. Deploy the model on AI Platform and create a version of it for online inference.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)

Reasoning: The requirement is to process aggregated data collected at the end of each day with minimal manual intervention. AI Platform’s batch prediction functionality is specifically designed for making predictions on a large number of instances asynchronously, which perfectly aligns with processing daily aggregated data. This can be automated using Cloud Scheduler to trigger a job, thus minimizing manual intervention.

❌ Why the other choices are incorrect:

  • Option B is incorrect: While technically possible, creating and managing a custom serving pipeline on Compute Engine for ML predictions involves significant operational overhead (VM management, scaling, updates, etc.) and typically requires more manual intervention compared to using a managed service like AI Platform Batch Prediction.

  • Option C is incorrect: Cloud Functions are primarily for event-driven, real-time processing of individual events or small tasks. The question specifies processing “aggregated data collected at the end of each day,” which implies a batch job, not real-time processing of individual data points. Using Cloud Functions for large daily batches might be less efficient or exceed typical function limits.

  • Option D is incorrect: Deploying a model for online inference is suitable for real-time, low-latency predictions on individual requests. The scenario describes processing a daily batch of aggregated data, which is not a use case for online inference. Online inference is designed for immediate responses, not for scheduled, bulk processing.

Reference: https://cloud.google.com/ai-platform/docs/batch-predict-overview

QUESTION 47

You recently joined an enterprise-scale company that has thousands of datasets. You know that there are accurate descriptions for each table in BigQuery, and you are searching for the proper BigQuery table to use for a model you are building on AI Platform. How should you find the data that you need?

  • A. Use Data Catalog to search the BigQuery datasets by using keywords in the table description.
  • B. Tag each of your model and version resources on AI Platform with the name of the BigQuery table that was used for training.
  • C. Maintain a lookup table in BigQuery that maps the table descriptions to the table ID. Query the lookup table to find the correct table ID for the data that you need.
  • D. Execute a query in BigQuery to retrieve all the existing table names in your project using the INFORMATION_SCHEMA metadata tables that are native to BigQuery. Use the result to find the table that you need.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: Google Cloud Data Catalog is a fully managed, scalable metadata management service that allows organizations to discover, manage, and understand all their data assets. It automatically ingests metadata from various Google Cloud sources, including BigQuery tables and their descriptions. Users can then search these assets using keywords, tags, and other metadata, making it the ideal tool for finding specific BigQuery tables based on their descriptions in an enterprise with thousands of datasets.
❌ Why the other choices are incorrect:

  • Option B is incorrect: Tagging AI Platform models helps track lineage after training but does not assist in the initial discovery of data for a new model.
  • Option C is incorrect: Maintaining a custom lookup table is a manual, unscalable, and inefficient solution for thousands of datasets. Data Catalog provides this functionality natively.
  • Option D is incorrect: Querying BigQuery’s INFORMATION_SCHEMA tables provides metadata like table names but lacks the semantic search capabilities over table descriptions that Data Catalog offers, making it cumbersome for discovery across many tables.

Reference: https://cloud.google.com/data-catalog/docs/overview

QUESTION 48

You started working on a classification problem with time series data and achieved an area under the receiver operating characteristic curve (AUC ROC) value of 99% for training data after just a few experiments. You haven’t explored using any sophisticated algorithms or spent any time on hyperparameter tuning. What should your next step be to identify and fix the problem?

  • A. Address the model overfitting by using a less complex algorithm.
  • B. Address data leakage by applying nested cross-validation during model training.
  • C. Address data leakage by removing features highly correlated with the target value.
  • D. Address the model overfitting by tuning the hyperparameters to reduce the AUC ROC value.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

Achieving a 99% AUC ROC on training data after just a few experiments, without sophisticated algorithms or hyperparameter tuning, is a strong indicator of data leakage, especially with time series data. Data leakage occurs when information that would not be available at prediction time is inadvertently used during model training, leading to an overly optimistic performance estimate.

In time series data, a common cause of leakage is improper splitting of data that does not respect temporal order. For instance, random shuffling can lead to future information being present in the training set for predicting past events. Applying nested cross-validation, particularly with a time-series-aware splitting strategy (e.g., forward chaining), is a robust method to detect and prevent such leakage. It ensures that the model is always trained on past data and evaluated on future data, providing a more realistic and unbiased estimate of performance.

  • A: Address the model overfitting by using a less complex algorithm. While 99% AUC ROC can indicate overfitting, such extreme performance with minimal effort points more strongly to data leakage. A less complex algorithm might hide the leakage but doesn’t fix the underlying problem.
  • C: Address data leakage by removing features highly correlated with the target value. Features are expected to be correlated with the target. Simply removing highly correlated features is a blunt instrument and could discard genuinely predictive information. The issue isn’t correlation itself, but how that correlation arises (legitimate prediction vs. illegitimate leakage).
  • D: Address the model overfitting by tuning the hyperparameters to reduce the AUC ROC value. The goal is not to arbitrarily reduce the AUC ROC, but to obtain a realistic performance estimate. If data leakage is present, hyperparameter tuning will not resolve the fundamental issue of the model learning from leaked information.

Reference: https://developers.google.com/machine-learning/glossary#data_leakage

QUESTION 49

You work for an online travel agency that also sells advertising placements on its website to other companies. You have been asked to predict the most relevant web banner that a user should see next. Security is important to your company. The model latency requirements are 300ms@p99, the inventory is thousands of web banners, and your exploratory analysis has shown that navigation context is a good predictor. You want to Implement the simplest solution. How should you configure the prediction pipeline?

  • A. Embed the client on the website, and then deploy the model on AI Platform Prediction.
  • B. Embed the client on the website, deploy the gateway on App Engine, and then deploy the model on AI Platform Prediction.
  • C. Embed the client on the website, deploy the gateway on App Engine, deploy the database on Cloud Bigtable for writing and for reading the user's navigation context, and then deploy the model on AI Platform Prediction.
  • D. Embed the client on the website, deploy the gateway on App Engine, deploy the database on Memorystore for writing and for reading the user's navigation context, and then deploy the model on Google Kubernetes Engine.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

Option C (Correct)

Reasoning: This option offers the simplest and most robust architecture using managed Google Cloud services. App Engine provides a secure, scalable gateway. Cloud Bigtable delivers low-latency, scalable storage for the critical “navigation context,” meeting the 300ms@p99 requirement. AI Platform Prediction is the simplest managed service for deploying and serving ML models at scale. This combination ensures security, low latency, and addresses data needs with minimal operational overhead, aligning with the “simplest solution” goal.

Why the other choices are incorrect:

  • Option A is incorrect: Lacks a secure gateway and specific solution for real-time navigation context management.
  • Option B is incorrect: Provides a gateway but omits a fast, scalable database for the essential “navigation context,” rendering it incomplete for the requirements.
  • Option D is incorrect: Deploys the model on Google Kubernetes Engine (GKE), which is more operationally complex than AI Platform Prediction, thus failing the “simplest solution” criterion for ML serving.

Reference: https://cloud.google.com/architecture/patterns/ml-serving-patterns

QUESTION 50

Your team is building a convolutional neural network (CNN)-based architecture from scratch. The preliminary experiments running on your on-premises CPU-only infrastructure were encouraging, but have slow convergence. You have been asked to speed up model training to reduce time-to-market. You want to experiment with virtual machines (VMs) on Google Cloud to leverage more powerful hardware. Your code does not include any manual device placement and has not been wrapped in Estimator model-level abstraction. Which environment should you train your model on?

  • A. AVM on Compute Engine and 1 TPU with all dependencies installed manually.
  • B. AVM on Compute Engine and 8 GPUs with all dependencies installed manually.
  • C. A Deep Learning VM with an n1-standard-2 machine and 1 GPU with all libraries pre-installed.
  • D. A Deep Learning VM with more powerful CPU e2-highcpu-16 machines with all libraries pre-installed.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

The problem states that the team is building a Convolutional Neural Network (CNN) and experiencing slow convergence on CPU-only infrastructure. The goal is to speed up training using more powerful hardware on Google Cloud VMs for experimentation, without extensive code changes (no manual device placement, no Estimator abstraction).

Option C proposes a Deep Learning VM with 1 GPU and all libraries pre-installed. This is the optimal choice because:

  • Deep Learning VM: These images come pre-configured with popular machine learning frameworks (TensorFlow, PyTorch) and necessary drivers (CUDA, cuDNN), significantly reducing setup time and effort. This aligns perfectly with the need to

    Reference: https://cloud.google.com/deep-learning-vm/docs

QUESTION 51

You work on a growing team of more than 50 data scientists who all use AI Platform. You are designing a strategy to organize your jobs, models, and versions in a clean and scalable way. Which strategy should you choose?

  • A. Set up restrictive IAM permissions on the AI Platform notebooks so that only a single user or group can access a given instance.
  • B. Separate each data scientist's work into a different project to ensure that the jobs, models, and versions created by each data scientist are accessible only to that user.
  • C. Use labels to organize resources into descriptive categories. Apply a label to each created resource so that users can filter the results by label when viewing or monitoring the resources.
  • D. Set up a BigQuery sink for Cloud Logging logs that is appropriately filtered to capture information about AI Platform resource usage. In BigQuery, create a SQL view that maps users to the resources they are using.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation: The question asks for a strategy to organize AI Platform jobs, models, and versions for a large, growing team (50+ data scientists) in a clean and scalable way. Google Cloud labels are purpose-built for this exact scenario. They allow users to attach key-value pairs to resources for granular organization, filtering, and cost management across various services, including AI Platform. This enables a flexible and scalable method to categorize resources by project, team, environment, or individual data scientist, making them easily discoverable and manageable.

  • Option A is incorrect because setting up restrictive IAM permissions on notebooks primarily addresses access control for development environments, not the organization of deployed jobs, models, and versions across the entire AI Platform service. It also creates silos that can hinder collaboration.
  • Option B is incorrect because separating each data scientist’s work into a different Google Cloud project introduces significant management overhead (50+ projects) and complexity for billing, IAM, and cross-team collaboration. It is not a scalable or clean organizational strategy for a single team.
  • Option D is incorrect because setting up a BigQuery sink for Cloud Logging and creating SQL views is a strategy for monitoring, auditing, and reporting on resource usage, not for organizing or categorizing the resources themselves within the AI Platform UI or API for easier discovery and management by data scientists.

Reference: https://cloud.google.com/resource-manager/docs/creating-managing-labels

QUESTION 52

You are training a deep learning model for semantic image segmentation with reduced training time. While using a Deep Learning VM Image, you receive the following error: The resource ‘projects/deeplearning-platforn/zones/europe-west4-c/acceleratorTypes/nvidia-tesla-k80’ was not found. What should you do?

  • A. Ensure that you have GPU quota in the selected region.
  • B. Ensure that the required GPU is available in the selected region.
  • C. Ensure that you have preemptible GPU quota in the selected region.
  • D. Ensure that the selected GPU has enough GPU memory for the workload.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation: The error message "The resource ‘projects/deeplearning-platforn/zones/europe-west4-c/acceleratorTypes/nvidia-tesla-k80’ was not found" clearly indicates that the specific GPU type, NVIDIA Tesla K80, is not available in the requested zone (europe-west4-c). Google Cloud Platform (GCP) offers various GPU models, and their availability differs across regions and zones. If a particular GPU type is not provisioned in a specific zone, attempting to create a VM instance with that accelerator type in that zone will result in a "resource not found" error. Therefore, ensuring the required GPU is available in the selected region/zone is the correct action.Quota issues (Options A and C) would typically manifest as "quota exceeded" or "resource unavailable due to quota", not "resource not found." GPU memory issues (Option D) would occur during workload execution after the VM is successfully provisioned, not during the resource allocation phase.

Reference: https://cloud.google.com/compute/docs/regions-zones/gpu-regions-zones

QUESTION 53

Your team is working on an NLP research project to predict political affiliation of authors based on articles they have written. You have a large training dataset that is structured like this:

You followed the standard 80%-10%-10% data distribution across the training, testing, and evaluation subsets. How should you distribute the training examples across the train-test-eval subsets while maintaining the 80-10-10 proportion?

  • A. Distribute texts randomly across the train-test-eval subsets: Train set: [TextA1, TextB2, …] Test set: [TextA2, TextC1, TextD2, …] Eval set: [TextB1, TextC2, TextD1, …]
  • B. Distribute authors randomly across the train-test-eval subsets: (*) Train set: [TextA1, TextA2, TextD1, TextD2, …] Test set: [TextB1, TextB2, …] Eval set: [TexC1,TextC2 …]
  • C. Distribute sentences randomly across the train-test-eval subsets: Train set: [SentenceA11, SentenceA21, SentenceB11, SentenceB21, SentenceC11, SentenceD21 …] Test set: [SentenceA12, SentenceA22, SentenceB12, SentenceC22, SentenceC12, SentenceD22 …] Eval set: [SentenceA13, SentenceA23, SentenceB13, SentenceC23, SentenceC13, SentenceD31 …]
  • D. Distribute paragraphs of texts (
  • E. , chunks of consecutive sentences) across the train-test-eval subsets: Train set: [SentenceA11, SentenceA12, SentenceD11, SentenceD12 …] Test set: [SentenceA13, SentenceB13, SentenceB21, SentenceD23, SentenceC12, SentenceD13 …] Eval set: [SentenceA11, SentenceA22, SentenceB13, SentenceD22, SentenceC23, SentenceD11 …]
Click to View Verified Solution & Explanation

Correct Option: B

Explanation: The goal is to predict the political affiliation of authors. To accurately assess the model’s ability to generalize to new, unseen authors, it is crucial to ensure that all data (texts and sentences) from a specific author resides exclusively within one subset (train, test, or evaluation). If texts or sentences from the same author are split across these subsets, the model could learn author-specific writing styles or vocabulary from the training set and be tested on other data from the same author, leading to data leakage and an over-optimistic evaluation of performance. Therefore, distributing authors randomly across the train-test-eval subsets prevents this leakage, ensuring the model is evaluated on entirely new authors.

Options A, C, and D are incorrect because they split data at a level below the author (texts, sentences, or paragraphs), which would lead to data leakage. If a model trains on one text from an author and tests on another text from the same author, it’s not truly generalizing to a new author, but rather to new content from a seen author.

Reference: https://developers.google.com/machine-learning/guides/data-validation/splitting-data

QUESTION 54

Your team has been tasked with creating an ML solution in Google Cloud to classify support requests for one of your platforms. You analyzed the requirements and decided to use TensorFlow to build the classifier so that you have full control of the model’s code, serving, and deployment. You will use Kubeflow pipelines for the ML platform. To save time, you want to build on existing resources and use managed services instead of building a completely new model. How should you build the classifier?

  • A. Use the Natural Language API to classify support requests.
  • B. Use AutoML Natural Language to build the support requests classifier.
  • C. Use an established text classification model on AI Platform to perform transfer learning.
  • D. Use an established text classification model on AI Platform as-is to classify support requests.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

To meet the requirements of using TensorFlow, having full control of the model’s code, serving, and deployment, utilizing Kubeflow pipelines, and building on existing resources and managed services to save time, transfer learning with an established text classification model on AI Platform (now Vertex AI) is the most appropriate approach. This allows the team to leverage a pre-trained model as a base (saving time and using existing resources), fine-tune it with their specific support request data using TensorFlow (maintaining full code control), and orchestrate the process via Kubeflow pipelines for training and deployment on AI Platform (a managed service).

Reference: https://cloud.google.com/vertex-ai/docs/ml-pipelines/build-pipeline

QUESTION 55

You recently joined a machine learning team that will soon release a new project. As a lead on the project, you are asked to determine the production readiness of the ML components. The team has already tested features and data, model development, and infrastructure. Which additional readiness check should you recommend to the team?

  • A. Ensure that training is reproducible.
  • B. Ensure that all hyperparameters are tuned.
  • C. Ensure that model performance is monitored.
  • D. Ensure that feature expectations are captured in the schema.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

When preparing an ML system for production release, critical aspects include not only the initial development and testing of features, data, models, and infrastructure but also ensuring the long-term health and performance of the deployed system. While options A, B, and D are important, they generally fall within the ‘features and data’ or ‘model development’ testing phases mentioned as already completed. For instance, reproducible training (A) and hyperparameter tuning (B) are core to model development, and capturing feature expectations in a schema (D) is fundamental to data quality during the ‘features and data’ phase.

However, ensuring that model performance is monitored (C) is a crucial additional production readiness check. Once a model is deployed, its performance can degrade over time due to concept drift, data drift, or changes in the operational environment. Establishing robust monitoring systems for model accuracy, latency, feature distributions, and predictions is essential to detect these issues early, trigger alerts, and enable timely intervention. This proactive monitoring is distinct from initial development testing and is vital for maintaining model effectiveness and reliability in a live production environment.

Reference: https://cloud.google.com/architecture/mle-best-practices#monitoring_and_alerting

QUESTION 56

You work for a credit card company and have been asked to create a custom fraud detection model based on historical data using AutoML Tables. You need to prioritize detection of fraudulent transactions while minimizing false positives. Which optimization objective should you use when training the model?

  • A. An optimization objective that minimizes Log loss
  • B. An optimization objective that maximizes the Precision at a Recall value of 0.50
  • C. An optimization objective that maximizes the area under the precision-recall curve (AUC PR) value
  • D. An optimization objective that maximizes the area under the receiver operating characteristic curve (AUC ROC) value
Click to View Verified Solution & Explanation

Correct Option: C

Explanation: For fraud detection, which is typically an imbalanced classification problem where the positive class (fraud) is rare, both identifying actual fraudulent transactions (high recall) and minimizing incorrect fraud predictions (high precision) are critical. The problem statement explicitly requires ‘prioritize detection of fraudulent transactions’ (high recall) while ‘minimizing false positives’ (high precision).

  • Maximizing AUC PR (Area Under the Precision-Recall Curve) is the most suitable optimization objective for such scenarios. The Precision-Recall curve focuses on the positive class performance and is highly sensitive to the trade-off between precision and recall. A high AUC PR indicates that the model performs well in both identifying positive instances and avoiding false positives across various classification thresholds.

The other options are less ideal:

  • A: Minimizing Log loss is a general objective for accurate probability predictions but doesn’t directly optimize the precision-recall trade-off for imbalanced datasets.
  • B: Maximizing Precision at a Recall value of 0.50 is too restrictive. It fixes recall at a specific value, which might not be the optimal point for the overall business goal, and the ideal recall for fraud detection is often higher.
  • D: Maximizing AUC ROC (Area Under the Receiver Operating Characteristic Curve) can be misleading for highly imbalanced datasets. The ROC curve considers the True Negative Rate, which can inflate the AUC score due to the abundance of true negatives from the majority (non-fraudulent) class, even if the model performs poorly on the rare positive class. AUC PR provides a more accurate representation of performance when the positive class is of primary interest and rare.

Reference: https://cloud.google.com/automl-tables/docs/evaluate

QUESTION 57

Your company manages a video sharing website where users can watch and upload videos. You need to create an ML model to predict which newly uploaded videos will be the most popular so that those videos can be prioritized on your company’s website. Which result should you use to determine whether the model is successful?

  • A. The model predicts videos as popular if the user who uploads them has over 10,000 likes.
  • B. The model predicts 97.5% of the most popular clickbait videos measured by number of clicks.
  • C. The model predicts 95% of the most popular videos measured by watch time within 30 days of being uploaded.
  • D. The Pearson correlation coefficient between the log-transformed number of views after 7 days and 30 days after publication is equal to 0.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)

Reasoning: The goal is to identify videos that will be ‘most popular’ for prioritization. Watch time is a highly relevant and robust metric for video popularity, indicating actual user engagement and consumption, rather than just initial clicks or uploader status. Predicting a high percentage (95%) of these truly popular videos within a reasonable timeframe (30 days) directly addresses the objective of the model. This metric effectively measures the model’s ability to identify content that users genuinely find engaging and valuable, which aligns with the business goal of prioritizing such videos.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Predicting popularity based on the uploader’s existing likes is an indirect and potentially unreliable metric. A video from a popular uploader isn’t guaranteed to be popular itself, and new creators could produce highly popular content. It uses an input feature as a success metric, which is inappropriate.
  • Option B is incorrect: While clicks are a measure of initial interest, ‘clickbait videos’ are a specific, often low-quality, category, and clicks alone do not guarantee sustained engagement or true popularity. Users might click but quickly disengage, resulting in low watch time. The goal is ‘most popular videos,’ not specifically ‘clickbait videos.’
  • Option D is incorrect: A Pearson correlation coefficient of 0 between views after 7 days and 30 days would indicate no linear relationship between early and later viewership. This would mean the model is completely unsuccessful at using early data to predict long-term popularity. A successful model would aim for a strong positive correlation, suggesting early views are predictive of future popularity.

Reference: https://cloud.google.com/solutions/recommendations/recommendations-on-gcp-architecture-and-best-practices#evaluating_the_recommender_system

QUESTION 58

You are working on a Neural Network-based project. The dataset provided to you has columns with different ranges. While preparing the data for model training, you discover that gradient optimization is having difficulty moving weights to a good solution. What should you do?

  • A. Use feature construction to combine the strongest features.
  • B. Use the representation transformation (normalization) technique.
  • C. Improve the data cleaning step by removing features with missing values.
  • D. Change the partitioning step to reduce the dimension of the test set and have a larger training set.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)Reasoning: When features in a dataset have significantly different ranges, the gradients calculated during backpropagation for neural networks can be disproportionately large for features with larger scales. This can lead to an ill-conditioned optimization landscape, causing gradient descent to oscillate, converge slowly, or get stuck, making it difficult to find an optimal solution. Normalization (a representation transformation technique) scales features to a similar range (e.g., 0-1 or mean 0, standard deviation 1), which helps to stabilize training, speed up convergence, and improve the performance of gradient-based optimizers.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Feature construction involves creating new features from existing ones. While it can improve model performance by capturing more complex relationships, it does not directly address the issue of disparate feature ranges affecting gradient optimization.
  • Option C is incorrect: Improving data cleaning by removing features with missing values is a crucial preprocessing step for data quality, but it does not resolve the problem of different feature scales impeding gradient descent.
  • Option D is incorrect: Changing the data partitioning (train/test split) affects the amount of data available for training and evaluation. While a larger training set is generally beneficial, it does not solve the fundamental problem of unscaled features causing difficulties for gradient optimization. Reducing the ‘dimension’ (number of features) of the test set while keeping them for the training set is also an unusual and generally unhelpful approach.

Reference: https://cloud.google.com/architecture/data-preprocessing-for-machine-learning

QUESTION 59

Your data science team needs to rapidly experiment with various features, model architectures, and hyperparameters. They need to track the accuracy metrics for various experiments and use an API to query the metrics over time. What should they use to track and report their experiments while minimizing manual effort?

  • A. Use Kubeflow Pipelines to execute the experiments. Export the metrics file, and query the results using the Kubeflow Pipelines API.
  • B. Use AI Platform Training to execute the experiments. Write the accuracy metrics to BigQuery, and query the results using the BigQuery API.
  • C. Use AI Platform Training to execute the experiments. Write the accuracy metrics to Cloud Monitoring, and query the results using the Monitoring API.
  • D. Use AI Platform Notebooks to execute the experiments. Collect the results in a shared Google Sheets file, and query the results using the Google Sheets API.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation: The data science team needs a solution for rapid experimentation, tracking accuracy metrics, and querying results via an API, all while minimizing manual effort. Kubeflow Pipelines is an excellent choice for this as it is designed for orchestrating and managing ML workflows and experiments. It inherently supports tracking experiment metadata, including metrics and hyperparameters, through its native components and SDK. The Kubeflow Pipelines API allows for programmatic access to experiment runs and their associated metrics, directly addressing the requirement to query results over time with an API. This integrated approach significantly minimizes manual effort compared to building a custom tracking solution.

Reference: https://www.kubeflow.org/docs/components/pipelines/sdk/pipelines-limitations/#how-to-create-a-metric

QUESTION 60

You work for a bank and are building a random forest model for fraud detection. You have a dataset that includes transactions, of which 1% are identified as fraudulent. Which data transformation strategy would likely improve the performance of your classifier?

  • A. Write your data in TFRecords.
  • B. Z-normalize all the numeric features.
  • C. Oversample the fraudulent transaction 10 times.
  • D. Use one-hot encoding on all categorical features.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

✅ Option C (Correct)
Reasoning: The question describes a highly imbalanced dataset where only 1% of transactions are fraudulent. In such scenarios, machine learning models, including random forests, tend to be biased towards the majority class (non-fraudulent transactions) and perform poorly in detecting the minority class (fraud). Oversampling the minority class (fraudulent transactions) is a widely recognized and effective strategy to mitigate class imbalance. By increasing the number of fraudulent transaction samples, the model has more opportunities to learn the patterns associated with fraud, thereby improving its ability to correctly identify them.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Writing data in TFRecords is a format optimization for TensorFlow pipelines, primarily for efficient data I/O. It does not address data imbalance or directly improve model performance related to feature distribution or class representation.
  • Option B is incorrect: Z-normalization (standardization) scales numeric features. While beneficial for many algorithms (e.g., SVMs, neural networks), tree-based models like random forests are generally not sensitive to the scale of numerical features because they make decisions based on value thresholds, not distances. It does not address class imbalance.
  • Option D is incorrect: Using one-hot encoding for categorical features is a standard and often necessary preprocessing step for many machine learning models. However, it is a general technique for handling categorical data and does not specifically tackle the problem of class imbalance, which is the dominant challenge highlighted in the question.

Reference: https://developers.google.com/machine-learning/glossary#class_imbalance

QUESTION 61

You are using transfer learning to train an image classifier based on a pre-trained EfficientNet model. Your training dataset has 20,000 images. You plan to retrain the model once per day. You need to minimize the cost of infrastructure. What platform components and configuration environment should you use?

  • A. A Deep Learning VM with 4 V100 GPUs and local storage.
  • B. A Deep Learning VM with 4 V100 GPUs and Cloud Storage.
  • C. A Google Kubernetes Engine cluster with a V100 GPU Node Pool and an NFS Server
  • D. An AI Platform Training job using a custom scale tier with 4 V100 GPUs and Cloud Storage
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

The primary requirement is to minimize the cost of infrastructure for a daily retraining task. Let’s analyze the options:

  • A and B (Deep Learning VM): While a Deep Learning VM provides a suitable environment with GPUs, keeping a VM with 4 V100 GPUs running continuously for a job that runs only once a day is very expensive. Even if the VM is stopped and started daily, it incurs operational overhead and startup time. The cost is based on sustained VM instance time.
  • C (Google Kubernetes Engine cluster with NFS Server): GKE can certainly run ML workloads, but managing a GKE cluster, especially with a V100 GPU Node Pool, and an additional NFS server for a single daily training job introduces significant operational complexity and cost. An NFS server is also an additional component to manage and pay for, when Cloud Storage is a more cost-effective and managed solution for data storage in Google Cloud.
  • D (AI Platform Training job using a custom scale tier with 4 V100 GPUs and Cloud Storage): AI Platform Training (now largely integrated into Vertex AI Training) is a managed service specifically designed for running ML training jobs. When you run a training job, the necessary compute resources (like 4 V100 GPUs in a custom scale tier) are provisioned on-demand for the duration of the training, and then de-provisioned afterward. This ‘pay-as-you-go’ model for compute resources, combined with cost-effective and scalable Cloud Storage for data, is the most cost-efficient approach for a task that runs once per day, as you only pay for the actual training time, not for idle infrastructure.

Therefore, AI Platform Training provides the best balance of performance, manageability, and cost efficiency for this scenario.

Reference: https://cloud.google.com/vertex-ai/docs/training/custom-training-overview

QUESTION 62

While conducting an exploratory analysis of a dataset, you discover that categorical feature A has substantial predictive power, but it is sometimes missing. What should you do?

  • B. Compute the mode of feature A and then use it to replace the missing values in feature
  • C. Replace the missing values with the values of the feature with the highest Pearson correlation with feature
  • D. Add an additional class to categorical feature A for missing values. Create a new binary feature that indicates whether feature A is missing.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

Adding an additional class for missing values and creating a binary indicator feature is the most robust strategy for handling missing categorical data, especially when the missingness itself might be predictive. Treating ‘missing’ as a distinct category allows the model to learn a specific relationship for instances where the feature was absent. The binary indicator feature explicitly signals whether a value was originally missing, enabling the model to discern if the act of being missing holds predictive power. This method preserves information that simple imputation techniques (like mode imputation) would discard, which is crucial for a feature with ‘substantial predictive power’.

Reference: https://developers.google.com/machine-learning/crash-course/working-with-sparse-data/feature-engineering-sparse-data

QUESTION 63

You work for a large retailer and have been asked to segment your customers by their purchasing habits. The purchase history of all customers has been uploaded to BigQuery. You suspect that there may be several distinct customer segments, however you are unsure of how many, and you don’t yet understand the commonalities in their behavior. You want to find the most efficient solution. What should you do?

  • A. Create a k-means clustering model using BigQuery ML. Allow BigQuery to automatically optimize the number of clusters.
  • B. Create a new dataset in Dataprep that references your BigQuery table. Use Dataprep to identify similarities within each column.
  • C. Use the Data Labeling Service to label each customer record in BigQuery. Train a model on your labeled data using AutoML Tables. Review the evaluation metrics to understand whether there is an underlying pattern in the data.
  • D. Get a list of the customer segments from your company’s Marketing team. Use the Data Labeling Service to label each customer record in BigQuery according to the list. Analyze the distribution of labels in your dataset using Data Studio.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

The problem describes a scenario where customer purchase history is in BigQuery, and the goal is to segment customers. Key constraints are that the number of segments is unknown, and the commonalities in behavior are not yet understood. This points to an unsupervised learning problem, specifically clustering.

  • Option A (Correct): Creating a k-means clustering model using BigQuery ML is the most appropriate and efficient solution. K-means is a fundamental unsupervised learning algorithm for grouping similar data points into clusters, which directly addresses the need for customer segmentation when labels are unknown. BigQuery ML allows models to be trained directly within BigQuery, eliminating data movement and providing an efficient workflow. While BigQuery ML doesn’t automatically determine the optimal ‘k’ (number of clusters) in a fully automated fashion for K-Means (it requires you to specify `num_clusters` or use hyperparameter tuning for it), the core approach of K-Means clustering is correct for this unsupervised task. Furthermore, BigQuery ML is designed for efficiency and scalability on BigQuery data.
  • Option B (Incorrect): Dataprep is primarily a data preparation and cleansing tool. While it can help in exploring data and identifying patterns within columns, it is not designed for building and training machine learning models for segmentation. Its focus is on data engineering rather than machine learning inference.
  • Option C (Incorrect): This option suggests using the Data Labeling Service and AutoML Tables. Both are tools primarily used for supervised learning tasks (classification or regression). The problem explicitly states that the number of segments and their commonalities are unknown, meaning there are no labels available. Using a labeling service and then a supervised learning model (AutoML Tables) would require pre-existing labels, which contradicts the problem statement.
  • Option D (Incorrect): This option assumes that a list of customer segments is already available from the Marketing team. This directly contradicts the problem’s premise that the segments are unknown and need to be discovered. The Data Labeling Service and Data Studio are useful for working with pre-defined labels, but not for *discovering* new segments.

Reference: https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-k-means

QUESTION 64

You recently designed and built a custom neural network that uses critical dependencies specific to your organization’s framework. You need to train the model using a managed training service on Google Cloud. However, the ML framework and related dependencies are not supported by AI Platform Training. Also, both your model and your data are too large to fit in memory on a single machine. Your ML framework of choice uses the scheduler, workers, and servers distribution structure. What should you do?

  • A. Use a built-in model available on AI Platform Training.
  • B. Build your custom container to run jobs on AI Platform Training.
  • C. Build your custom containers to run distributed training jobs on AI Platform Training.
  • D. Reconfigure your code to a ML framework with dependencies that are supported by AI Platform Training.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation:

The problem states that the custom neural network uses organization-specific dependencies not supported by AI Platform Training, and both the model and data are too large for a single machine, requiring a distributed training setup with scheduler, workers, and servers. Building custom containers allows encapsulating the specific ML framework and dependencies. AI Platform Training supports running distributed training jobs using these custom containers, which can be configured with roles like master, worker, and parameter server to match the required distribution structure.

Reference: https://cloud.google.com/ai-platform/training/docs/custom-containers-overview

QUESTION 65

While monitoring your model training’s GPU utilization, you discover that you have a native synchronous implementation. The training data is split into multiple files. You want to reduce the execution time of your input pipeline. What should you do?

  • A. Increase the CPU load.
  • B. Add caching to the pipeline.
  • C. Increase the network bandwidth.
  • D. Add parallel interleave to the pipeline.
Click to View Verified Solution & Explanation

Correct Option: D

Explanation:

The problem states that GPU utilization is low due to a native synchronous implementation, and the training data is split into multiple files. This indicates an I/O bottleneck where the data loading and preprocessing are not keeping pace with the GPU’s consumption rate.

Option D: Add parallel interleave to the pipeline directly addresses this issue. In data pipelines (e.g., using TensorFlow’s tf.data API), interleave allows for reading from multiple input files concurrently. When combined with parallelism (e.g., num_parallel_calls=tf.data.AUTOTUNE or similar in other frameworks), it effectively overlaps the reading and preprocessing of data from different files, thus transforming a synchronous bottleneck into an asynchronous, parallel operation. This ensures a steady supply of preprocessed data to the GPU, significantly reducing input pipeline execution time and improving GPU utilization.

Why other options are incorrect:

  • Option A: Increase the CPU load. Increasing CPU load without addressing the synchronous nature of the pipeline will likely not solve the GPU underutilization problem and might even worsen overall system performance if the CPU becomes a bottleneck. The issue isn’t a lack of CPU work, but how it’s being managed.
  • Option B: Add caching to the pipeline. While caching (e.g., .cache()) can be beneficial, it primarily helps when the same data is read multiple times or when an expensive transformation needs to be avoided on repeated passes. It does not directly solve the problem of a synchronous pipeline reading from multiple files for the first time or sequentially.
  • Option C: Increase the network bandwidth. Increased network bandwidth might help if the data transfer speed from storage is the absolute bottleneck. However, the core problem description points to a "native synchronous implementation" and processing of "multiple files," suggesting that even with higher bandwidth, the synchronous reading/processing logic would still limit throughput. Parallel interleave addresses the processing logic directly.

Reference: https://www.tensorflow.org/guide/data_performance

QUESTION 66

Your data science team is training a PyTorch model for image classification based on a pre-trained RestNet model. You need to perform hyperparameter tuning to optimize for several parameters. What should you do?

  • A. Convert the model to a Keras model, and run a Keras Tuner job.
  • B. Run a hyperparameter tuning job on AI Platform using custom containers.
  • C. Create a Kuberflow Pipelines instance, and run a hyperparameter tuning job on Katib.
  • D. Convert the model to a TensorFlow model, and run a hyperparameter tuning job on AI Platform.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

✅ Option B (Correct)Reasoning: Google Cloud’s AI Platform (now Vertex AI) provides a robust hyperparameter tuning service. For frameworks like PyTorch, which may not have direct, fully managed integration with all features using pre-built images, the recommended approach is to leverage custom containers. This allows data scientists to package their PyTorch training code, including the hyperparameter tuning logic and all necessary dependencies, into a Docker image. AI Platform then uses this custom container to run multiple trials, managing the compute resources and tracking the objective metric to find optimal hyperparameters.

❌ Why the other choices are incorrect:

  • Option A is incorrect: Converting a PyTorch model to a Keras model is a complex and often unnecessary task, equivalent to rewriting the model. Keras Tuner is designed for Keras/TensorFlow models, making this an inefficient and impractical solution for a PyTorch model.
  • Option C is incorrect: While Katib is a valid hyperparameter tuning system for Kubeflow Pipelines, setting up and managing a full Kubeflow Pipelines instance on Google Cloud for this specific task is more complex and less integrated than using the managed hyperparameter tuning service offered by AI Platform (Vertex AI). AI Platform provides a simpler, managed experience.
  • Option D is incorrect: Similar to option A, converting a PyTorch model to a TensorFlow model is a significant effort and is not required. AI Platform supports PyTorch models via custom containers or specific pre-built images, making model conversion unnecessary for hyperparameter tuning.

Reference: https://cloud.google.com/vertex-ai/docs/training/create-custom-container

QUESTION 67

You have a large corpus of written support cases that can be classified into 3 separate categories: Technical Support, Billing Support, or Other Issues. You need to quickly build, test, and deploy a service that will automatically classify future written requests into one of the categories. How should you configure the pipeline?

  • A. Use the Cloud Natural Language API to obtain metadata to classify the incoming cases.
  • B. Use AutoML Natural Language to build and test a classifier. Deploy the model as a REST API.
  • C. Use BigQuery ML to build and test a logistic regression model to classify incoming requests. Use BigQuery ML to perform inference.
  • D. Create a TensorFlow model using Google’s BERT pre-trained model. Build and test a classifier, and deploy the model using Vertex AI
Click to View Verified Solution & Explanation

Correct Option: B

Explanation:

To quickly build, test, and deploy a service for custom text classification into specific categories, AutoML Natural Language is ideal. It allows users to train high-quality custom machine learning models for text classification with minimal ML expertise using their own labeled data. The trained model can then be easily deployed as a REST API endpoint, directly addressing the need for a quick, deployable service.

  • Option A is incorrect: Cloud Natural Language API offers pre-trained models for general tasks and broad, predefined categories, not custom classification.
  • Option C is incorrect: While BigQuery ML can build models, deploying a real-time classification service for individual requests is not its primary or quickest strength.
  • Option D is incorrect: Creating and fine-tuning a custom TensorFlow BERT model requires significant ML expertise and effort, contradicting the ‘quickly build’ requirement.

Reference: https://cloud.google.com/automl-natural-language/docs

QUESTION 68

You need to quickly build and train a model to predict the sentiment of customer reviews with custom categories without writing code. You do not have enough data to train a model from scratch. The resulting model should have high predictive performance. Which service should you use?

  • A. AutoML Natural Language
  • B. Cloud Natural Language API
  • C. AI Hub pre-made Jupyter Notebooks
  • D. AI Platform Training built-in algorithms
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

✅ Option A (Correct)
Reasoning: AutoML Natural Language is ideal for training custom text classification models, such as sentiment analysis with custom categories, without writing code. It leverages transfer learning, enabling high predictive performance even with limited custom data, fulfilling all the requirements for quickly building a performant model.

❌ Why the other choices are incorrect:

  • Option B is incorrect: Cloud Natural Language API provides pre-trained models and does not allow training custom models with user-defined categories.
  • Option C is incorrect: AI Hub pre-made Jupyter Notebooks require writing and executing code, which contradicts the "without writing code" requirement.
  • Option D is incorrect: AI Platform Training built-in algorithms typically involve writing code for configuration and execution, making it unsuitable for a no-code requirement.

Reference: https://cloud.google.com/natural-language/automl/docs/train-custom-model

QUESTION 69

You need to build an ML model for a social media application to predict whether a user’s submitted profile photo meets the requirements. The application will inform the user if the picture meets the requirements. How should you build a model to ensure that the application does not falsely accept a non-compliant picture?

  • A. Use AutoML to optimize the model’s recall in order to minimize false negatives.
  • B. Use AutoML to optimize the model’s F1 score in order to balance the accuracy of false positives and false negatives.
  • C. Use Vertex AI Workbench user-managed notebooks to build a custom model that has three times as many examples of pictures that meet the profile photo requirements.
  • D. Use Vertex AI Workbench user-managed notebooks to build a custom model that has three times as many examples of pictures that do not meet the profile photo requirements.
Click to View Verified Solution & Explanation

Correct Option: A

Explanation:

The correct answer is A: Use AutoML to optimize the model’s recall in order to minimize false negatives.

Here is the machine learning logic to explain this for your Certometrics platform, specifically breaking down the “trick” hidden in the classification matrix.

The Core Concept: Defining the Confusion Matrix

In content moderation and anomaly detection, the standard ML practice is to define the “anomaly” or “violation” as the Positive class.

Positive Class (1): The photo is non-compliant (it violates the rules).

Negative Class (0): The photo is compliant (it meets the requirements).

Now, let’s map the business requirement to the confusion matrix. The prompt states you must “ensure that the application does not falsely accept a non-compliant picture.”

If a photo is actually non-compliant (Positive), but the model predicts it is compliant (Negative), the model has generated a False Negative.

Therefore, “falsely accepting a non-compliant picture” is exactly what a False Negative is in this architecture.

To minimize False Negatives, you must optimize the model for Recall. (Optimizing for Recall tells the model: “Cast a wide net—it is better to accidentally flag a few good photos than to let a bad photo slip through.”)

QUESTION 70

You lead a data science team at a large international corporation. Most of the models your team trains are large-scale models using high-level TensorFlow APIs on AI Platform with GPUs. Your team usually takes a few weeks or months to iterate on a new version of a model. You were recently asked to review your team’s spending. How should you reduce your Google Cloud compute costs without impacting the model’s performance?

  • A. Use AI Platform to run distributed training jobs with checkpoints.
  • B. Use AI Platform to run distributed training jobs without checkpoints.
  • C. Migrate to training with Kuberflow on Google Kubernetes Engine, and use preemptible VMs with checkpoints.
  • D. Migrate to training with Kuberflow on Google Kubernetes Engine, and use preemptible VMs without checkpoints.
Click to View Verified Solution & Explanation

Correct Option: C

Explanation: The most effective way to significantly reduce Google Cloud compute costs for large-scale, long-running machine learning training jobs (weeks or months) without impacting performance is to leverage preemptible VMs. Preemptible VMs are much cheaper than standard instances but can be terminated at any time. For long-running jobs, this risk of preemption is mitigated by using checkpoints. Checkpoints allow the training process to save its state periodically, so if a preemptible VM is terminated, the job can resume from the last saved checkpoint on a new instance, minimizing wasted compute time and preserving overall progress. While AI Platform Training does support preemptible workers, option C explicitly presents the core cost-saving mechanism (preemptible VMs) combined with the essential mitigation strategy (checkpoints) in the context of a platform that offers fine-grained control, like Kubeflow on GKE. This ensures cost reduction without a severe negative impact on the overall training time or model iteration.

Why other options are incorrect:

  • A: Use AI Platform to run distributed training jobs with checkpoints. This option doesn’t introduce a cost-saving mechanism like preemptible VMs. While checkpoints are good, distributed training itself doesn’t inherently reduce compute cost per hour, though it might reduce total time.
  • B: Use AI Platform to run distributed training jobs without checkpoints. Not using checkpoints for jobs that take weeks or months is extremely risky and inefficient. If a job fails or is preempted, all progress would be lost, leading to increased costs and significantly impacting performance.
  • D: Migrate to training with Kubeflow on Google Kubernetes Engine, and use preemptible VMs without checkpoints. While using preemptible VMs is good for cost reduction, doing so without checkpoints for long-running jobs is highly impractical. Any preemption would lead to a complete restart of the training, wasting significant compute resources and severely impacting performance and iteration time.

Reference: https://cloud.google.com/compute/docs/instances/preemptible

QUESTION 71

You need to train a regression model based on a dataset containing 50,000 records that is stored in BigQuery. The data includes a total of 20 categorical and numerical features with a target variable that can include negative values. You need to minimize effort and training time while maximizing model performance. What approach should you take to train this regression model?

  • A. Create a custom TensorFlow DNN model.
  • B. Use BQML XGBoost regression to train the model.
  • C. Use AutoML Tables to train the model without early stopping.
  • D. Use AutoML Tables to train the model with RMSLE as the optimization objective.
Click to View Verified Solution & Explanation

Correct Option: B

Explanation: The question requires minimizing effort and training time while maximizing model performance for a regression problem with 50,000 records, 20 features (categorical/numerical), and a target variable that can include negative values, stored in BigQuery.

  • Option A (Create a custom TensorFlow DNN model) involves significant coding, infrastructure setup, and hyperparameter tuning, which contradicts the goal of minimizing effort and training time.
  • Option B (Use BQML XGBoost regression to train the model) is an excellent choice. BQML allows training machine learning models directly within BigQuery using SQL, drastically minimizing effort. XGBoost is a highly efficient and performant algorithm for tabular data, ensuring fast training times and good performance. It naturally handles both numerical and categorical features and is suitable for target variables with negative values.
  • Option C (Use AutoML Tables to train the model without early stopping) offers minimal user effort for model selection and hyperparameter tuning, often yielding high performance. However, AutoML typically involves longer training times compared to a single, well-chosen model like XGBoost due to its extensive search space and model exploration. Furthermore, disabling early stopping is generally a poor practice for minimizing training time and preventing overfitting.
  • Option D (Use AutoML Tables to train the model with RMSLE as the optimization objective) is incorrect because the Root Mean Squared Logarithmic Error (RMSLE) is designed for non-negative target variables and would be undefined or problematic for a target variable that can include negative values. Standard regression metrics like RMSE or MAE are more appropriate.

Considering all constraints, BQML XGBoost provides the best balance of low effort, fast training, and high performance for this scenario.

Reference: https://cloud.google.com/bigquery-ml/docs/xgboost-regressor

Need the Full Exam Simulator?

Practice the complete question bank in a realistic, timed environment with advanced tracking.

Access Full CertoMetrics Engine →

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top