Skip to content

AWS Personalise Recommendation Limitations

0

Hi everyone,

I'm working on an application that uses AWS Personalize for generating personalized product recommendations. I've noticed that the recommendations returned by both the AWS SDK is limited to 500 and the OpenSearch Personalize plugin ranking is limited to ranking the first 500 products in the search. Our sales which we load for users can have upwards of 3000 products.

Context: When using the AWS SDK's getRecommendations or getPersonalizedRanking methods, the response contains a maximum of 500 recommendations, regardless of the dataset size or filtering applied. Similarly, when querying recommendations through the OpenSearch plugin, the same limit of 500 items applies to how much it re-ranks. I know there is the 'batch' job in the aws personalise but some questions I have are does it allow infinites products/item ids? How does it cope with more real time data?

Use Case: In my application, I need to retrieve more than 500 recommendations for certain scenarios, such as:

Displaying personalized catalogs for users or a sales they access Supporting batch workflows that require processing thousands of recommendations.

Questions: Is this 500-item limit a hard constraint in AWS Personalize? If yes, is there an official reason for this restriction? What are the best practices to overcome this limit? Some options I’ve considered:

Implementing multiple calls with varying inputs (e.g., using different user or context attributes). - not sure if this can 'accurately' get all products as we wish to use real-time updates etc so some products may show multiple times?

Post-processing and merging results from multiple recommendation queries. Are there any efficient ways to paginate beyond the 500-item limit, especially when using the OpenSearch plugin? We would love for it to take into account all products and re-rank them.

Does AWS offer an alternative approach for handling larger recommendation sets (e.g., using batch workflows or other services like Amazon S3)? What I’ve Tried:

Paginating through the results doesn’t seem to be supported directly. Re-querying with modified parameters leads to redundant recommendations.

Desired Outcome: A solution to fetch more than 500 items in a way that is efficient and scalable. Recommendations on alternative AWS services or workflows if AWS Personalize cannot directly support this. Has anyone encountered a similar limitation and found a way to work around it?

2 Answers
0

Hello,

I understand you are using AWS Personalize in your application, and have queries regarding the 500 items limit.

  1. The limit is indeed a hard constraint for both the getRecommendations and getPersonalizedRanking API [1]. Currently, there is no official documentation as to why this is a hard limit, it likely exists due to performance considerations, including latency, scalability, and the memory footprint of handling larger datasets during real-time recommendation queries.

  2. The batch workflow in AWS Personalize does not allow infinite item IDs. While batch inference can process a larger dataset than the 500-item limit for real time calls, it operates within AWS resource and quota constraints. It works by submitting a batch inference job with a dataset (items stores from Amazon s3), then the system returns recommendations or re-rankings for the entire dataset, which may exceed 500 items [2][3].

  3. The best way to overcome the 500 item limit on the API, is by incorporating batch workflows [4]. This can give you the most optimized results, while being able to handle slightly above the 500 limit API. For real-time scenarios, combining OpenSearch with AWS Personalize can be a powerful solution. OpenSearch allows you to retrieve and rank larger datasets, with Personalize re-ranking subsets of results. You can control the weight given to Personalize’s rankings in OpenSearch’s results [5].

  4. I also would recommend looking into optimized solutions with Personalize [6]. This could be beneficial for your use-case, as it will optimize ranking, and rank based on item importance/relevance.

If you have any difficulty or if you still run into issues, please reach out to AWS Support [7] (Personalize) along with your issue or use case in detail, and we would be happy to assist you further.

References:

[1] https://docs.aws.amazon.com/personalize/latest/dg/limits.html

[2] https://docs.aws.amazon.com/personalize/latest/dg/getting-batch-recommendations.html

[3] https://docs.aws.amazon.com/personalize/latest/dg/batch-data-upload.html

[4] https://docs.aws.amazon.com/personalize/latest/dg/creating-batch-inference-job.html

[5] https://docs.aws.amazon.com/personalize/latest/dg/personalize-opensearch.html

[6] https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html

[7] Creating support cases and case management: https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-casehttps://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case

AWS

answered 2 years ago

-1

The 500-item limit for recommendations in AWS Personalize is indeed a hard constraint that cannot be increased. This limitation applies to both the GetRecommendations API and the GetPersonalizedRanking API.

For your use case of needing more than 500 recommendations, there are a few approaches you can consider:

  1. Batch Workflows: AWS Personalize supports batch workflows that can handle larger sets of recommendations. Batch inference jobs in Personalize can process much larger datasets, potentially allowing you to work with thousands of products. These jobs are designed for offline processing and can be useful for scenarios where real-time recommendations are not required.

  2. Multiple API Calls: While not ideal, you could make multiple API calls with different parameters to get a broader set of recommendations. However, this approach may lead to redundant recommendations and doesn't guarantee coverage of all products.

  3. Combining with Other Services: For large-scale personalization, you might consider combining Personalize with other AWS services. For example, you could use Personalize to generate a subset of recommendations, then use Amazon OpenSearch Service to expand and refine these results across your full product catalog.

  4. Custom Post-Processing: After receiving the 500 recommendations from Personalize, you could implement custom logic to expand or refine these results based on your specific business rules or additional data sources.

For real-time updates and handling a large number of products, the batch inference jobs in Personalize can work with large datasets, but they are not designed for real-time processing. For more real-time scenarios with large product catalogs, you might need to implement a hybrid approach, combining Personalize recommendations with real-time filtering or ranking based on your latest data.

Regarding the OpenSearch Personalize plugin, the 500-item limit is also a constraint of the underlying Personalize service. To work around this when using OpenSearch, you might need to implement custom re-ranking logic within your application that considers all products, using the Personalize recommendations as a starting point.

While these approaches can help mitigate the 500-item limitation, they may require additional development effort and careful consideration of performance implications. It's also worth noting that as AWS services evolve, it's always a good idea to check for any updates or new features that might address these limitations in the future.
Sources
Frequently asked questions for Amazon Personalize - Amazon Personalize
Generate personalized and re-ranked recommendations using Amazon Personalize - AWS Prescriptive Guidance
How Amazon Personalize works - Amazon Personalize

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.