Personalization as a Service

Hülya Pamukçu Crowell
3 min readDec 18, 2023

Providing personalized, relevant content to the users is crucial in increasing user engagement in applications. We see recommendations in almost every app we interact with daily, using e-commerce, video streaming apps, social networks, news, and blogging feeds. Our feed is curated behind the scenes with powerful ML models that learn from our interactions. In this article, we look into Amazon Personalize as one of the “Personalization as a Service” cloud offerings that abstract the complexities of ML and MLOps and provide simple APIs for recommendations and ranking. We first outline the components of AWS Personalize and show the flow for common scenarios.

Personalize Components

Amazon Personalize has two main APIs for real-time inference: Recommendations and Ranking. For offline batch inference, it offers batch segment jobs. Recommendation and ranking need resources such as user-provided datasets, recipes, deployed campaigns, and recommenders for inference. The unified API model allows providing the campaign or recommender during the call with inputs like user ID, item ID, or list of items. Optionally, filters and context can be used to customize the results further. Recipes are tailored for a specific domain or scenario—for example, the “similar items” recipe for the e-commerce domain. The models are trained by offline datasets — items, users, and item interactions — bundled in dataset group resources. For supported recipes, the events received by the event tracker can influence recommendations as users interact with items, providing real-time personalization.

The following diagram illustrates the resources and APIs of Personalize. Next, we will look into the composition and flow for two scenarios: featured products and similar items.

Amazon Personalize Resources and APIs

Scenario 1: Featured Products

In our first scenario, we are interested in the top N recommended items for the current user to show in their feed when they load the app. We created a “Recommended For you” recommender, trained by the datasets, and “Exclude Purchases products” and “Include promoted items” filters. While calling the get_recommendations API in the backend, we include additional customization with the purchased products and promoted items filter. The effect of these filters can be “include” or “exclude,” depending on how we define them during creation.

Scenario 2: Similar Items

In the second scenario, we are retrieving Top N-related items to display in our “Similar Items” widget when the user selects to view the details of an item. Even though similar items should be the same for all users, while displaying for a specific user, we want personalized ordering of them. Therefore, we split this into two separate calls in the backend. First, we retrieve similar items with a category filter; then, we rank the list for the user. Again, the related campaigns and filters are created before the API calls.

Recap

This article explored Amazon Personalize high-level components and the flow for common use cases. There are many more details in producing the personalization experience. We recommend the demo app by AWS to explore other scenarios and dive deeper into use cases like a cold start, collecting evaluation metrics, and AB testing.

--

--