Databricks Certified Machine Learning Professional free question 5 / 10 · Domain 2: MLOps
A retailer needs low-latency lookups of product recommendations in its app. The recommendations do not depend on the current request, so they can be computed ahead of time. Which design does the Databricks MLOps workflow page describe for this case?
- Run batch inference and publish the predictions to an online key-value store.
- Serve the model on a real-time endpoint and score product page requests on demand.
- Run a streaming query that keeps the predictions in memory on the driver of the cluster.
- Write the predictions to a CSV file in the staging catalog and read it from the app.
Show the answer and explanation
Answer: A
Why this is correct
The page says batch or streaming inference is generally the most cost-effective option for higher throughput, higher latency use cases. For scenarios where low-latency predictions are required but the predictions can be computed offline, the batch predictions can be published to an online key-value store such as DynamoDB or Cosmos DB, which serves them quickly.
Why the other options are wrong
"Serve the model on a real-time endpoint and score product page requests on demand." … Scoring on demand is not needed when predictions can be computed offline. The page describes batch inference for that case.
"Run a streaming query that keeps the predictions in memory on the driver of the cluster." … Predictions held in driver memory are not a serving design in the page, and they would be lost on a restart.
"Write the predictions to a CSV file in the staging catalog and read it from the app." … The page describes a key-value store for low-latency access. A file in the staging catalog is a test location, not a serving store.
Batch plus key-value store
Offline-computable predictions can be scored in batch and then published for low-latency reads.