0

We have a Reddit style app where users browse an endless feed of images. In each session, users can view anywhere from 500-1000 images.

We're using Personalize and we need to filter out any items that have been viewed by users previously. Unfortunately Personalize only uses the last 100 user interactions, so after a while the same items will be recommended over and over again. Especially if a user is having a longer session where they browse 500+ images in one go, most of the recommended items will be the same.

From the docs:

Amazon Personalize considers up to 100 of the most recent interactions per user per event type. This is an adjustable quota.

What's the best way to handle this type of use case? Is there some architecture pattern we can follow for this scenario? Seems like a common social media scenario, but the current restriction on 100 events per filter is pretty limiting.

Should we ask for a quota increase? Not sure how much more expensive this will be plus the docs are not clear on what the max number of interactions we could request is. Is it 500, 5,000, 50,000+ or even more? Does the aws bill increase exponentially the more historical interactions filters can use?

Any guidance here would be super helpful! Thanks!

We've tried using just regular filters but it breaks down after 100+ viewed items per session.

We've also thought about bucketing view events, ex view_1-100, view_100-200, view_200-300 and being clever about how we store events in each bucket, but this seems hacky and inefficient.

1 Answers1

0

Requesting a quota increase is the easiest and cleanest solution. You should be able to accommodate the 500-1000 image scenario within the upper limit with a single view event type. There is not any additional cost for filtering so that should not be a consideration.

Bucketing view events by event type will only get you so far as the hard limit on event types is 10 (assuming you don't have any interaction metadata fields). Albeit a bit hacky, it could be used to increase your effective maximum. Assuming view was your only event type, your filter could use a wildcard.

EXCLUDE ItemID WHERE Interactions.EVENT_TYPE IN (*)

Either way, requesting a quota increase will give you more interactions to filter.

James J
  • 621
  • 3
  • 6
  • thanks James, we have many interaction events, so seems like the quote increase is the way to go. Follow on question, how can I paginate through recommendations and ensure all my items are indexable (ie "potentially recommendable")? we have ~700 items, but recommendations get stuck at 530 unique items recommended. I want to debug if the issue is my putItem events. Assuming we get a higher quota, I could use the filters to verify, but wondering if there's some pagination option to ensure all potential items will eventually be recommended. Thanks! – Henry S. May 18 '23 at 00:02
  • The inference methods do not support pagination and the max # of items that can be retrieved with a single call is 500. Personalize is not an index so it's best not think of it like you would a database or search engine. Items are recommended based on relevance to a user or item. Relevance is determined primarily based on behavioral data in the interactions dataset but item & user metadata can also influence ranking. I'm not sure what you mean by recommendations getting "stuck". – James J May 18 '23 at 23:30