Professional Machine Learning Engineer Free Practice Questions — Page 5
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
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 45
Your organization’s employee onboarding team wants you to build an interactive self-help tool for new employees. The tool needs to receive queries from users and provide answers from the organization’s internal documentation. This documentation is spread across standalone documents such as PDF files. You want to build a solution quickly while minimizing maintenance overhead. What should you do?
A. Create a custom chatbot user interface hosted on App Engine. Use Vertex AI to fine-tune a Gemini model on the organization’s internal documentation. Send users’ queries to the fine-tuned model by using the custom chatbot and return the model’s responses to the users.
B. Deploy an internal website to a Google Kubernetes Engine (GKE) cluster. Build a search index by ingesting all of the organization’s internal documentation. Use Vertex AI Vector Search to implement a semantic search that retrieves results from the search index based on the query entered into the search box.
C. Use Vertex AI Agent Builder to create an agent. Securely index the organization’s internal documentation to the agent’s datastore. Send users’ queries to the agent and return the agent’s grounded responses to the users.
D. Deploy an internal website to a Google Kubernetes Engine (GKE) cluster. Organize the relevant internal documentation into sections. Collect user feedback on website content and store it in BigQuery. Request that the onboarding team regularly update the links based on user feedback.
Show Answer
Correct Answer: C
Explanation: Vertex AI Agent Builder is designed for rapidly building grounded conversational agents over enterprise documents, including PDFs and other unstructured content. It securely indexes the organization's documentation and uses retrieval-augmented generation (RAG) to provide answers with minimal development and maintenance. Fine-tuning a model on documents is unnecessary and less suitable for frequently changing documentation, while building custom search or websites requires more engineering effort.
Question 46
You work for a company that sells corporate electronic products to thousands of businesses worldwide. Your company stores historical customer data in BigQuery. You need to build a model that predicts customer lifetime value over the next three years. You want to use the simplest approach to build the model. What should you do?
A. Create a Vertex AI Workbench notebook. Use IPython magic to run the CREATE MODEL statement to create an ARIMA model.
B. Access BigQuery Studio in the Google Cloud console. Run the CREATE MODEL statement in the SQL editor to create an AutoML regression model.
C. Create a Vertex AI Workbench notebook. Use IPython magic to run the CREATE MODEL statement to create an AutoML regression model.
D. Access BigQuery Studio in the Google Cloud console. Run the CREATE MODEL statement in the SQL editor to create an ARIMA model.
Show Answer
Correct Answer: B
Explanation: Customer lifetime value prediction is a supervised regression problem, not a univariate time-series forecasting task. BigQuery ML supports creating an AutoML regression model directly with a CREATE MODEL statement in BigQuery Studio, which is the simplest approach because it avoids setting up a Vertex AI Workbench notebook. ARIMA is intended for forecasting time series and is not the appropriate choice for customer-level lifetime value prediction based on historical customer features.
Question 47
You are developing a batch process that will train a custom model and perform predictions. You need to be able to show lineage for both your model and the batch predictions. What should you do?
A. 1. Upload your dataset to BigQuery. 2. Use a Vertex AI custom training job to train your model. 3. Generate predictions by using Vertex AI SDK custom prediction routines.
B. 1. Use Vertex AI Experiments to evaluate model performance during training. 2. Register your model in Vertex AI Model Registry. 3. Generate batch predictions in Vertex AI.
C. 1. Create a Vertex AI managed dataset. 2. Use a Vertex AI training pipeline to train your model. 3. Generate batch predictions in Vertex AI.
D. 1. Use a Vertex AI Pipelines custom training job component to train your model. 2. Generate predictions by using a Vertex AI Pipelines model batch predict component.
Show Answer
Correct Answer: D
Explanation: Vertex AI Pipelines automatically captures ML Metadata (lineage) across pipeline components, including custom training jobs and batch prediction components. Using a custom training component followed by the model batch predict component provides end-to-end lineage linking datasets, training, model artifacts, and batch prediction outputs. The other options include useful Vertex AI features but do not provide the same built-in workflow lineage across both training and batch prediction.
Question 48
You are developing a TensorFlow Extended (TFX) pipeline with standard TFX components. The pipeline includes data preprocessing steps. After the pipeline is deployed to production, it will process up to 100 TB of data stored in BigQuery. You need the data preprocessing steps to scale efficiently, publish metrics and parameters to Vertex AI Experiments, and track artifacts by using Vertex ML Metadata. How should you configure the pipeline run?
A. Run the TFX pipeline in Vertex AI Pipelines. Configure the pipeline to use Vertex AI Training jobs with distributed processing.
B. Run the TFX pipeline in Vertex AI Pipelines. Set the appropriate Apache Beam parameters in the pipeline to run the data preprocessing steps in Dataflow.
C. Run the TFX pipeline in Dataproc by using the Apache Beam TFX orchestrator. Set the appropriate Vertex AI permissions in the job to publish metadata in Vertex AI.
D. Run the TFX pipeline in Dataflow by using the Apache Beam TFX orchestrator. Set the appropriate Vertex AI permissions in the job to publish metadata in Vertex AI.
Show Answer
Correct Answer: B
Explanation: TFX standard components that perform data preprocessing (such as ExampleGen, StatisticsGen, Transform) use Apache Beam. For very large datasets (100 TB in BigQuery), the scalable runner is Dataflow, configured through Apache Beam pipeline arguments. Running the pipeline in Vertex AI Pipelines provides native integration with Vertex ML Metadata and Vertex AI Experiments for artifact tracking, metrics, and parameters. Vertex AI Training jobs are intended for model training rather than Beam-based preprocessing, and using Beam orchestrators directly on Dataproc or Dataflow does not provide the same managed Vertex AI Pipelines integration.
Question 49
You work for a company that builds bridges for cities around the world. To track the progress of projects at the construction sites, your company has set up cameras at each location. Each hour, the cameras take a picture that is sent to a Cloud Storage bucket. A team of specialists reviews the images, filters important ones, and then annotates specific objects in them. You want to propose using an ML solution that will help the company scale and reduce costs. You need the solution to have minimal up-front cost. What method should you propose?
A. Train an AutoML object detection model to annotate the objects in the images to help specialists with the annotation task.
B. Use the Cloud Vision API to automatically annotate objects in the images to help specialists with the annotation task.
C. Create a BigQuery ML classification model to classify important images. Use the model to predict which new images are important to help specialists with the filtering task.
D. Use Vertex AI to train an open source object detection to annotate the objects in the images to help specialists with the annotation task.
Show Answer
Correct Answer: B
Explanation: The requirement emphasizes an ML solution with minimal up-front cost that helps scale the image review process. Cloud Vision API provides pre-trained object detection and labeling with a pay-per-use model, so there is no need to collect labeled training data or pay for model training. AutoML and custom Vertex AI object detection require training data and training jobs, increasing up-front cost. BigQuery ML is not the appropriate choice for image classification in this scenario.
Question 50
You are tasked with building an MLOps pipeline to retrain tree-based models in production. The pipeline will include components related to data ingestion, data processing, model training, model evaluation, and model deployment. Your organization primarily uses PySpark-based workloads for data preprocessing. You want to minimize infrastructure management effort. How should you set up the pipeline?
A. Set up a TensorFlow Extended (TFX) pipeline on Vertex AI Pipelines to orchestrate the MLOps pipeline. Write a custom component for the PySpark-based workloads on Dataproc.
B. Set up a Vertex AI Pipelines to orchestrate the MLOps pipeline. Use the predefined Dataproc component for the PySpark-based workloads.
C. Set up Kubeflow Pipelines on Google Kubernetes Engine to orchestrate the MLOps pipeline. Write a custom component for the PySparkbased workloads on Dataproc.
D. Set up Cloud Composer to orchestrate the MLOps pipeline. Use Dataproc workflow templates for the PySpark-based workloads in Cloud Composer.
Show Answer
Correct Answer: B
Explanation: Vertex AI Pipelines is the managed orchestration service for ML workflows and minimizes infrastructure management. It provides predefined Dataproc pipeline components for running PySpark jobs, making it a good fit for existing PySpark preprocessing. TFX is primarily oriented toward TensorFlow workflows and would require custom components for PySpark. Kubeflow on GKE requires managing Kubernetes infrastructure, and Cloud Composer is a general workflow orchestrator rather than the recommended managed ML pipeline service for this use case.
Question 51
You have developed an AutoML tabular classification model that identifies high-value customers who interact with your organization's website. You plan to deploy the model to a new Vertex AI endpoint that will integrate with your website application. You expect higher traffic to the website during nights and weekends. You need to configure the model endpoint's deployment settings to minimize latency and cost. What should you do?
A. Configure the model deployment settings to use an n1-standard-32 machine type.
B. Configure the model deployment settings to use an n1-standard-4 machine type. Set the minReplicaCount value to 1 and the maxReplicaCount value to 8.
C. Configure the model deployment settings to use an n1-standard-4 machine type and a GPU accelerator. Set the minReplicaCount value to 1 and the maxReplicaCount value to 4.
D. Configure the model deployment settings to use an n1-standard-8 machine type and a GPU accelerator.
Show Answer
Correct Answer: B
Explanation: For an AutoML tabular classification model, CPU-based serving is typically sufficient; GPUs add cost without meaningful benefit for this workload. To handle higher traffic during nights and weekends while minimizing both latency and cost, deploy on a modest machine type with autoscaling enabled. Setting minReplicaCount to 1 keeps baseline cost low, and maxReplicaCount to 8 allows the endpoint to scale out under increased load.
$19
Get all 332 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.