01 — Interaction history

Views, add-to-cart events and purchases describe past preferences.

Views, add-to-cart events and purchases are weighted by strength and recency. They are then connected with product attributes to create affinities across explored categories, brands, ranges or other available catalogue characteristics.

This representation supports score explanation and a fallback when history is insufficient. It also separates repeated preferences from isolated events without exposing identity or individual-level data in the public presentation.

02 — Learning to rank

The model learns to reorder a candidate list.

An XGBoost learning-to-rank model combines affinity features, available context and product signals to assign each candidate a score.

The search engine remains responsible for producing a relevant initial set. The reranker then operates on a bounded list, clarifying each component’s role and allowing personalization to be turned off without losing baseline results.

03 — Protocol

Hold out each user’s final interaction.

Affinities are built from history preceding each user’s final interaction. The model ranks that positive product against 20 sampled negatives, or 21 candidates. This is not full-catalog retrieval. NDCG, Hit Rate and Mean Reciprocal Rank (MRR) provide complementary measures.

The comparison isolated two hypotheses. At K = 5, the report gives approximately 0.52 / 0.61 / 0.27 for NDCG / Hit Rate / MRR, versus 0.05 / 0.21 / 0.09 for the context-only baseline. User-product affinities improved all three metrics, while a model based only on broad context remained weak. Integration experiments also exposed excessive latency for some reranking strategies, making it an architecture criterion.

04 — Limitation

The next step is an A/B test with real visitors.

Offline evaluation checks whether the model places relevant products closer to the top of the list. It does not yet measure the model’s real effect on visitor behavior.

The next step is to define eligible visitors, the ranking shown when personalization is unavailable, diversity rules and the A/B-test metrics: clicks, add-to-cart events, conversions and response time.