
Ultimate access to all questions.
Your company manages an ecommerce website where users can add items to their cart and receive recommendations for additional products they might be interested in. You developed a machine learning model that provides these recommendations in near real time. The current workflow is designed as follows: 1. The website will send a message with relevant user and cart data to Pub/Sub and then awaits a message back from Pub/Sub containing the prediction. 2. The predictions are stored in BigQuery for analytics and reporting purposes. 3. The machine learning model itself is stored in a Cloud Storage bucket, where it will be updated frequently to ensure accuracy and relevance. Considering the goal to minimize prediction latency and reduce the effort required to frequently update the model, how should you reconfigure the architecture?
A
Write a Cloud Function that loads the model into memory for prediction. Configure the function to be triggered when messages are sent to Pub/Sub.
B
Create a pipeline in Vertex AI Pipelines that performs preprocessing, prediction, and postprocessing. Configure the pipeline to be triggered by a Cloud Function when messages are sent to Pub/Sub.
C
Expose the model as a Vertex AI endpoint. Write a custom DoFn in a Dataflow job that calls the endpoint for prediction.
D
Use the RunInference API with WatchFilePattern in a Dataflow job that wraps around the model and serves predictions.