MLS-C01 Question 179
Single answerYou are building a machine learning solution for a retail company to provide product recommendations to users. The company wants to display personalized recommendations to users on their website as they browse through different product pages. The recommendations must be generated within milliseconds to ensure a seamless user experience. Which type of inference approach is most appropriate for this use case?
- A
Batch inference using Amazon SageMaker batch transform
- B
Real-time inference using Amazon SageMaker endpoints
- C
Batch inference using AWS Glue jobs
- D
Real-time inference using AWS Lambda and Amazon SageMaker hosting
Show answer and explanation
Correct answer: B
Explanation
For latency-sensitive use cases like providing personalized product recommendations in real time, real-time inference using Amazon SageMaker endpoints is the best choice. SageMaker endpoints are optimized for serving predictions with minimal latency, ensuring a seamless user experience. Batch inference methods like SageMaker batch transform or AWS Glue jobs are better suited for offline processing and cannot meet the millisecond-level latency requirements.
- A. Incorrect.
Batch inference using Amazon SageMaker batch transform is not suitable for latency-sensitive use cases like this one, as it processes data in bulk and is best suited for offline use cases.
- B. Correct.
Real-time inference using Amazon SageMaker endpoints is the most appropriate option, as it can serve predictions with low latency, which is crucial for providing recommendations while users browse the website.
- C. Incorrect.
Batch inference using AWS Glue jobs is not designed for real-time or low-latency use cases. It is more suitable for large-scale, periodic data processing tasks.
- D. Incorrect.
While AWS Lambda can be used for real-time inference workflows, combining it with Amazon SageMaker hosting adds unnecessary complexity and is not the most straightforward approach when SageMaker endpoints alone can meet the latency requirements.