Skip to content

PredictedItem

Source code in docs_src/capo_personalize_runtime/types/predicted_item.py
class PredictedItem(TypedDict, closed=True):
    item_id: NotRequired["capo_personalize_runtime.types.item_id.ItemID"]
    """<p>The recommended item ID.</p>"""
    score: NotRequired["capo_personalize_runtime.types.score.Score"]
    """<p>A numeric representation of the model's certainty that the item will be the next user selection. For more information on scoring logic, see <a>how-scores-work</a>.</p>"""
    promotion_name: NotRequired["capo_personalize_runtime.types.name.Name"]
    """<p>The name of the promotion that included the predicted item.</p>"""
    metadata: NotRequired["capo_personalize_runtime.types.metadata.Metadata"]
    """<p>Metadata about the item from your Items dataset.</p>"""
    reason: NotRequired["capo_personalize_runtime.types.reason_list.ReasonList"]
    """<p>If you use User-Personalization-v2, a list of reasons for why the item was included in recommendations. Possible reasons include the following:</p> <ul> <li> <p>Promoted item - Indicates the item was included as part of a promotion that you applied in your recommendation request.</p> </li> <li> <p>Exploration - Indicates the item was included with exploration. With exploration, recommendations include items with less interactions data or relevance for the user. For more information about exploration, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/use-case-recipe-features.html#about-exploration">Exploration</a>.</p> </li> <li> <p> Popular item - Indicates the item was included as a placeholder popular item. If you use a filter, depending on how many recommendations the filter removes, Amazon Personalize might add placeholder items to meet the <code>numResults</code> for your recommendation request. These items are popular items, based on interactions data, that satisfy your filter criteria. They don't have a relevance score for the user. </p> </li> </ul>"""

item_id instance-attribute

item_id: NotRequired[ItemID]

The recommended item ID.

metadata instance-attribute

metadata: NotRequired[Metadata]

Metadata about the item from your Items dataset.

promotion_name instance-attribute

promotion_name: NotRequired[Name]

The name of the promotion that included the predicted item.

reason instance-attribute

reason: NotRequired[ReasonList]

If you use User-Personalization-v2, a list of reasons for why the item was included in recommendations. Possible reasons include the following:

  • Promoted item - Indicates the item was included as part of a promotion that you applied in your recommendation request.

  • Exploration - Indicates the item was included with exploration. With exploration, recommendations include items with less interactions data or relevance for the user. For more information about exploration, see Exploration.

  • Popular item - Indicates the item was included as a placeholder popular item. If you use a filter, depending on how many recommendations the filter removes, Amazon Personalize might add placeholder items to meet the numResults for your recommendation request. These items are popular items, based on interactions data, that satisfy your filter criteria. They don't have a relevance score for the user.

score instance-attribute

score: NotRequired[Score]

A numeric representation of the model's certainty that the item will be the next user selection. For more information on scoring logic, see how-scores-work.