Creating domain recommenders in Amazon Personalize
You can create recommenders with the Amazon Personalize console, Amazon Command Line Interface (Amazon CLI), or Amazon SDKs. The following includes detailed steps to create recommenders with the Amazon Personalize console and code examples that show how to create a recommender with only the required fields.
-
For code samples that show how to enable metadata in recommendations, see Enabling metadata in recommendations.
-
For code samples that show how to configure the columns used when training the models backing your recommender, see Configuring columns used when creating an Amazon Personalize domain recommender.
-
For code samples that show how to configure exploration for the
Top picks for your
orRecommended for you
use cases, see Configuring exploration for a domain recommender.
Topics
Creating recommenders (console)
Important
A high minRecommendationRequestsPerSecond
will increase your bill. We recommend starting with 1 for
minRecommendationRequestsPerSecond
(the default). Track your usage using Amazon CloudWatch metrics, and increase
the minRecommendationRequestsPerSecond
as necessary. For more information, see Minimum recommendation requests per second and
auto-scaling.
Create recommenders for each of your use cases with the Amazon Personalize console as follows. If you just created your Domain dataset group and you are already on the Overview page, skip to step 3.
To create recommenders
-
Open the Amazon Personalize console at https://console.amazonaws.cn/personalize/home
and sign in to your account. -
On the Dataset groups page, choose your Domain dataset group.
-
In Step 3, choose Use <domain name> recommenders and choose Create recommenders.
-
On the Choose use cases page, choose the use cases you want to create recommenders and give each a Recommender name. Amazon Personalize creates a recommender for each use case that you choose. The available use cases depend on your domain. For information on choosing a use case see Choosing a use case.
-
Choose Next.
-
On the Advanced configuration page, configure each recommender depending on your business needs:
-
For each dataset used by the recommender's use case, you can choose the columns Amazon Personalize considers when training the models backing your recommender. By default, Amazon Personalize uses all columns that can be used when training. For more information, see Configuring columns used when creating an Amazon Personalize domain recommender.
-
You can modify Minimum recommendation requests per second to specify a new minimum request capacity for your recommender. A high
minRecommendationRequestsPerSecond
will increase your bill. We recommend starting with 1 (the default). Track your usage using Amazon CloudWatch metrics, and increase theminRecommendationRequestsPerSecond
as necessary. For more information see Minimum recommendation requests per second and auto-scaling. -
If you want the ability to include Items dataset metadata with recommendations, choose Return items metadata in recommendation results. If enabled, you can specify the columns from your Items dataset in your request for recommendations or personalized ranking. Amazon Personalize returns this data for each item in the recommendation response.
To enable metadata, you must have an Items dataset with a column of metadata.
-
For
Top picks for your
orRecommended for you
use cases, optionally make changes to exploration configuration. Exploration involves testing different item recommendations to learn how users respond to items with very little interaction data. Use the following fields to configure exploration:-
Emphasis on exploring less relevant items (exploration weight) – Configure how much to explore. Specify a decimal value between 0 to 1. The default is 0.3. The closer the value is to 1, the more exploration. With more exploration, recommendations include more items with less item interactions data or relevance based on previous behavior. At zero, no exploration occurs and recommendations are based on current data (relevance).
-
Exploration item age cutoff – Specify the maximum item age in days since the latest interaction across all items in the Item interactions dataset. This defines the scope of item exploration based on item age. Amazon Personalize determines item age based on its creation timestamp or, if creation timestamp data is missing, item interactions data. For more information how Amazon Personalize determines item age, see Creation timestamp data.
To increase the items Amazon Personalize considers during exploration, enter a greater value. The minimum is 1 day and the default is 30 days. Recommendations might include items that are older than the item age cut off you specify. This is because these items are relevant to the user and exploration didn't identify them.
-
For Tags, optionally add any tags. For more information about tagging Amazon Personalize resources, see Tagging Amazon Personalize resources.
-
-
To create recommenders for each of your use cases, choose Create recommenders.
You can monitor the status of each recommender on the Recommenders page. When your recommender status is Active, you can use it in your application to get recommendations.
Creating a recommender (Amazon CLI)
Use the following Amazon CLI code to create a recommender for a domain use case. Run this code for each of your domain use
cases. For recipeArn
, provide the Amazon Resource Name (ARN) for your use case. The available use cases
depend on your domain. For a list of use cases and their ARNs see Choosing a use case.
aws personalize create-recommender \ --name
recommender name
\ --dataset-group-arndataset group ARN
\ --recipe-arnrecipe ARN
Creating a recommender (Amazon SDKs)
Create a recommender for a domain use case with the following code. Give your recommender a name and provide your
Domain dataset group's Amazon Resource Name (ARN). For recipeArn
, provide the ARN for your use case. Run
this code for each of your domain use cases. The available use cases depend on your domain. For a list of use cases, their
ARNs, and their requirements, see Choosing a use case.