For You

Personalized tile rankings per shopper. Same query, different per customer: _recommend with the household's pets, the month, the cart and the shopper's own history as context.

For You: screenshot from the E-commerce demo
🛒 E-commerce_recommend_predictE-commerce
Production anchorPicked for you in the e-commerce demo's Shop: one _recommend over impressions, goal purchased, with the shopper's pets, the month, the cart and their own history as context, and anything from their last order re-asked as just bought.

The problem

The For-You feed is the load-bearing surface in any e-commerce or content product. It is the page where personalization either obviously works or obviously doesn't. Most catalog tools default to manually curated tiles plus a generic "popular" sort; personalization gets added as a separate ranking model that has to be trained, monitored, and re-tuned. The cost of building it is what keeps For-You feeds stuck at curated-default in most products.

The signal that should drive the feed is in the data already. Every customer's purchase history, browse pattern, segment membership, and engagement signal is queryable. The feed is asking the wrong question: "what's popular?" The right question is "what is this customer likely to want?" — and that is a _recommend query against the available signals.

How it works

_recommend ranks the candidate products per customer by the probability of a purchase when shown. The query takes the shopper's context (declared pets, the month, the categories in the cart and the last order, and the customer id) and returns the ranked list with probabilities and a $why, which the Shop turns into reasons such as "Fits your pets" or "Sells in April". Anything from the shopper's last order is re-asked in one _batch as _predict with just_bought set, and falls: shoppers rarely re-buy what they just bought.

Re-ranking adapts continuously. Every impression and purchase enters the index immediately; the next refresh reflects the new signal.

{
  "from": "impressions",
  "where": {
    "context.customer.pets": {
      "$and": [
        {
          "$match": "small_animal"
        }
      ]
    },
    "context.month": "2026-04",
    "context.basket_categories": {
      "$and": [
        {
          "$match": "small_animal_accessories"
        },
        {
          "$match": "small_animal_cage"
        },
        {
          "$match": "small_animal_dryfood"
        },
        {
          "$match": "small_animal_water_bottle"
        }
      ]
    },
    "context.customer": "CUST-00922",
    "just_bought": false
  },
  "recommend": "product_sku",
  "goal": {
    "purchased": true
  },
  "select": [
    "sku",
    "name",
    "brand",
    "pet_type",
    "category",
    "price_eur",
    "avg_rating",
    "tags",
    "$p",
    "$why"
  ],
  "limit": 16
}

For the full architecture, see the technology overview. For the broader narrative across multiple use cases, read The Predictive Application.

See it live

This use case runs in the 🛒 E-commerce demo today. Click through to the live application and inspect the queries that produce the result.

Open the live demo →

Frequently asked

How does this compare to traditional recommender systems (collaborative filtering, neural CF)?

Same conceptual family; different implementation. _recommend runs the conditional probability at query time from indexed signals; collaborative filtering and neural CF build offline models. The query-time approach reflects new data immediately, with no model to retrain.

What about new visitors with no history?

A shopper with no history is ranked by what is known: the household's declared pets, the month and the cart. Each signal joins the context as it appears; there is no fixed number of impressions before the ranking turns personal.

Can the For-You feed mix content types (products, articles, categories)?

Yes. _recommend works on any column with a candidate set; mix product IDs, category IDs, and content IDs as the target attribute. The application renders the mixed result. Many deployments run separate queries per content type and merge in the UI for editorial control.

How quickly does the ranking update after new clicks?

Immediately. Click enters the index, next query reflects it. There is no batch update or retraining schedule. Seasonal patterns, trend shifts, new product launches — all visible in the ranking within seconds.

Can the feed be controlled with editorial rules (boost X, demote Y)?

Yes. Add boost/demote modifiers in the application layer; the prediction provides the baseline ranking; the editorial layer adjusts. Most deployments run a hybrid: prediction provides the personalization signal, editorial rules handle the merchandising overrides.