Skip to main content

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:

  1. Retrieves candidate items
  2. Optionally filters out unwanted items (e.g., already seen)
  3. Returns ranked results

You can personalize feeds in two ways:

  1. Known user feed, which uses a user_id to personalize based on stored user history and features.
  2. Anonymous feed, which returns popular items for users without stored history.

Known user feed

Prerequisites

  1. An engine with item data configured
  2. A user_id to 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

  1. 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
}
}