Google

Professional Machine Learning Engineer Free Practice Questions — Page 9

Question 39

You work as an ML researcher at an investment bank, and you are experimenting with the Gemma large language model (LLM). You plan to deploy the model for an internal use case. You need to have full control of the mode's underlying infrastructure and minimize the model's inference time. Which serving configuration should you use for this task?

A. Deploy the model on a Vertex AI endpoint manually by creating a custom inference container.
B. Deploy the model on a Google Kubernetes Engine (GKE) cluster by using the deployment options in Model Garden.
C. Deploy the model on a Vertex AI endpoint by using one-click deployment in Model Garden.
D. Deploy the model on a Google Kubernetes Engine (GKE) cluster manually by cresting a custom yaml manifest.
Show Answer
Correct Answer: B
Explanation:
Deploying Gemma on GKE using Model Garden provides control over the underlying cluster and hardware while using a deployment path designed for efficient model serving. Vertex AI endpoints abstract more of the infrastructure, while a fully manual GKE deployment does not provide Model Garden’s optimized deployment configuration out of the box.

Question 40

You are building an application that extracts information from invoices and receipts. You want to implement this application with minimal custom code and training. What should you do?

A. Use the Cloud Vision API with TEXT_DETECTION type to extract text from the invoices and receipts, and use a pre-built natural language processing (NLP) model to parse the extracted text.
B. Use the Cloud Document AI API to extract information from the invoices and receipts.
C. Use Vertex AI Agent Builder with the pre-built Layout Parser model to extract information from the invoices and receipts.
D. Train an AutoML Natural Language model to classify and extract information from the invoices and receipts.
Show Answer
Correct Answer: B
Explanation:
Cloud Document AI provides pre-trained processors specifically for invoices and receipts, extracting structured fields such as vendor, invoice number, dates, totals, line items, and taxes with minimal custom code and no custom model training. Cloud Vision OCR only extracts text, Layout Parser is not the purpose-built solution for invoice field extraction, and AutoML Natural Language would require training and is not intended for document form parsing.

Question 40

You lead a data science team that is working on a computationally intensive project involving running several experiments. Your team is geographically distributed and requires a platform that provides the most effective real-time collaboration and rapid experimentation. You plan to add GPUs to speed up your experimentation cycle, and you want to avoid having to manually set up the infrastructure. You want to use the Google-recommended approach. What should you do?

A. Configure a managed Dataproc cluster for large-scale data processing. Configure individual Jupyter notebooks on VMs that each team member uses for experimentation and model development.
B. Use Colab Enterprise with Cloud Storage for data management. Use a Git repository for version control.
C. Use Vertex AI Workbench and Cloud Storage for data management. Use a Git repository for version control.
D. Configure a distributed JupyterLab instance that each team member can access on a Compute Engine VM. Use a shared code repository for version control.
Show Answer
Correct Answer: B
Explanation:
Colab Enterprise is Google’s managed, collaborative notebook environment, making it the best fit for a geographically distributed team that needs real-time collaboration and rapid experimentation without manually setting up infrastructure. It supports GPU-enabled runtimes and can use Cloud Storage for data and Git for version control.

Question 41

You work for a large social network service provider whose users post articles and discuss news. Millions of comments are posted online each day, and more than 200 human moderators constantly review comments and flag those that are inappropriate. Your team is building an ML model to help human moderators check content on the platform. The model scores each comment and flags suspicious comments to be reviewed by a human. Which metric(s) should you use to monitor the model’s performance?

A. Number of messages flagged by the model per minute
B. Number of messages flagged by the model per minute confirmed as being inappropriate by humans.
C. Precision and recall estimates based on a random sample of 0.1% of raw messages each minute sent to a human for review
D. Precision and recall estimates based on a sample of messages flagged by the model as potentially inappropriate each minute
Show Answer
Correct Answer: C
Explanation:
A random sample of raw messages includes both flagged and unflagged comments, so human review can identify false positives and false negatives and estimate both precision and recall. Sampling only flagged messages can estimate precision, but not recall. Because a 0.1% sample may be small in any given minute, aggregate the estimates over longer periods for more reliable monitoring. Sources: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/gemini-for-filtering-and-moderation

Question 41

You work for a bank. You need to train a model by using unstructured data stored in Cloud Storage that predicts whether credit card transactions are fraudulent. The data needs to be converted to a structured format to facilitate analysis in BigQuery. Company policy requires that data containing personally identifiable information (PII) remain in Cloud Storage. You need to implement a scalable solution that preserves the data’s value for analysis. What should you do?

A. Use BigQuery’s authorized views and column-level access controls to restrict access to PII within the dataset.
B. Use the DLP API to de-identify the sensitive data before loading it into BigQuery.
C. Store the unstructured data in a separate PII-compliant BigQuery database.
D. Remove the sensitive data from the files manually before loading them into BigQuery.
Show Answer
Correct Answer: B
Explanation:
The requirement is to convert unstructured Cloud Storage data into a structured format for BigQuery while ensuring that PII remains protected and preserving analytical value. Using the Cloud DLP API to de-identify sensitive fields before loading the structured data into BigQuery is the scalable approach. Authorized views and column-level security protect access after data is already in BigQuery and do not satisfy the policy intent. Storing raw PII in BigQuery contradicts the requirement, and manual removal is not scalable.

Question 42

Your team is developing a customer support chatbot for a healthcare company that processes sensitive patient information. You need to ensure that all personally identifiable information (PII) captured during customer conversations is protected prior to storing or analyzing the data. What should you do?

A. Use the Cloud Natural Language API to identify and redact PII in chatbot conversations.
B. Use the Cloud Natural Language API to classify and categorize all data, including PII, in chatbot conversations.
C. Use the DLP API to encrypt PII in chatbot conversations before storing the data.
D. Use the DLP API to scan and de-identify PII in chatbot conversations before storing the data.
Show Answer
Correct Answer: D
Explanation:
The Google Cloud Sensitive Data Protection (formerly DLP) API is designed to discover, inspect, and de-identify sensitive information such as PII. For healthcare chatbot conversations, scanning and de-identifying PII before storage protects patient data while preserving the usefulness of the remaining text. Cloud Natural Language API is for language analysis, not PII protection, and encrypting with DLP is not its primary function.

Question 43

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?

A. Drop feature A if more than 15% of values are missing. Otherwise, use feature A as-is.
B. Compute the mode of feature A and then use it to replace the missing values in feature A.
C. Replace the missing values with the values of the feature with the highest Pearson correlation with feature A.
D. Add an additional class to categorical feature A for missing values. Create a new binary feature that indicates whether feature A is missing.
Show Answer
Correct Answer: D
Explanation:
Keep the predictive feature rather than dropping it. Represent missing values as a distinct category and add a missingness indicator so the model can learn whether the absence of feature A carries predictive information. Mode imputation is possible in some settings, but it can obscure that signal.

Question 43

You work for an ecommerce company that wants to automatically classify products in images to improve user experience. You have a substantial dataset of labeled images depicting various unique products. You need to implement a solution for identifying custom products that is scalable, effective, and can be rapidly deployed. What should you do?

A. Develop a rule-based system to categorize the images.
B. Use a TensorFlow deep learning model that is trained on the image dataset.
C. Use a pre-trained object detection model from Model Garden.
D. Use AutoML Vision to train a model using the image dataset.
Show Answer
Correct Answer: D
Explanation:
AutoML Vision is designed for training custom image classification models from labeled image datasets with minimal ML expertise. It is scalable, effective, and enables rapid deployment compared with building and training a custom TensorFlow model or using a generic pre-trained object detection model. Rule-based systems are not suitable for complex image classification tasks.

Question 44

You work at a retail company, and are tasked with developing an ML model to predict product sales. Your company’s historical sales data is stored in BigQuery and includes features such as date, store location, product category, and promotion details. You need to choose the most effective combination of a BigQuery ML model and feature engineering to maximize prediction accuracy. What should you do?

A. Use a linear regression model. Perform one-hot encoding on categorical features, and create additional features based on the date, such as day of the week or month.
B. Use a boosted tree model. Perform label encoding on categorical features, and transform the date column into numeric values.
C. Use an autoencoder model. Perform label encoding on categorical features, and normalize the date column.
D. Use a matrix factorization model. Perform one-hot encoding on categorical features, and create interaction features between the store location and product category variables.
Show Answer
Correct Answer: A
Explanation:
A linear regression model is an appropriate BigQuery ML model for predicting a continuous target such as sales, and the proposed feature engineering is stronger. One-hot encoding is the standard approach for nominal categorical variables in linear models, and deriving calendar features (such as day of week and month) captures seasonality much better than simply converting a date to a numeric value. Option B pairs boosted trees with label encoding and a simplistic numeric date transformation, which is less suitable as described. Autoencoders and matrix factorization are not appropriate for this supervised sales forecasting task.

Question 44

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.
Show Answer
Correct Answer: A
Explanation:
Import the trained TensorFlow model into BigQuery ML, then run predictions directly against the text data in BigQuery. Keeping inference alongside the data avoids moving records to a separate prediction service, minimizing data-transfer and processing overhead.

$19

Get all 367 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.