Personalized feeds
A personalized feed query returns a ranked list of recommended items tailored to a specific user. Common applications include homepages, "For You" carousels, and discovery experiences.
Personalized feeds use a rank pipeline that:
- Retrieves candidate items
- Optionally filters out unwanted items (e.g., already seen)
- Returns ranked results
You can personalize feeds in two ways:
- Known user feed, which uses a
user_idto personalize based on stored user history and features. - Anonymous feed, which returns popular items for users without stored history.
Known user feed
Prerequisites
- An engine with item data configured
- A
user_idto personalize for
Query example
This example retrieves items ordered by a ranking column:
{
"query": {
"type": "rank",
"from": "item",
"retrieve": [
{
"type": "column_order",
"columns": [{ "name": "popularity_score", "ascending": false }],
"limit": 100
}
],
"limit": 20
},
"parameters": {
"user_id": "user123"
}
}
Anonymous feed
Prerequisites
- An engine with item data configured
Query example
For users without stored history, you can return popular items. This is useful for new users or anonymous visitors:
{
"query": {
"type": "rank",
"from": "item",
"retrieve": [
{
"type": "column_order",
"columns": [{ "name": "popularity_score", "ascending": false }],
"limit": 100
}
],
"limit": 20
}
}