Google Professional Machine Learning Engineer Question 137
Select 3Google Cloud PlatformYou are working on a machine learning project where you need to ingest unstructured text documents from multiple sources, preprocess them, and send them to Vertex AI for real-time inference. The text documents are stored in a Cloud Storage bucket. Which steps should you implement to achieve this?
- A
Use a Cloud Function to trigger preprocessing when a new file is uploaded to the Cloud Storage bucket.
- B
Write a Dataflow pipeline to preprocess the text documents and push the preprocessed data to Vertex AI for inference.
- C
Directly upload the raw text documents from Cloud Storage to Vertex AI without preprocessing.
- D
Use the Vertex AI Prediction service to deploy a trained model and send preprocessed text data for inference.
- E
Leverage BigQuery to preprocess the text documents and export the results to Vertex AI.
Show answer and explanation
Correct answers: A, B, D
Explanation
To successfully ingest and process unstructured text documents for inference in Vertex AI, you need to automate data ingestion (e.g., with Cloud Functions), preprocess the data (e.g., with Dataflow), and use the Vertex AI Prediction service for inference. Directly sending raw text or relying on BigQuery for preprocessing is not appropriate for this use case.
- A. Correct.
Correct. Using a Cloud Function to trigger preprocessing ensures automation and real-time handling of new files in Cloud Storage.
- B. Correct.
Correct. Dataflow is a managed stream and batch processing service that can handle large-scale preprocessing before sending data to Vertex AI.
- C. Incorrect.
Incorrect. Raw text data is generally not suitable for direct inference, as it usually requires preprocessing (e.g., tokenization, encoding) to match the model's expected input format.
- D. Correct.
Correct. The Vertex AI Prediction service is designed to handle inference requests once data is preprocessed and ready for prediction.
- E. Incorrect.
Incorrect. While BigQuery is a powerful tool for analyzing structured data, it is not typically used for preprocessing unstructured text documents like those in this scenario.