Artificial intelligence in retail: how it predicts your next purchase in the app

Mikhail Nadezhdin, Vadim Sorokin, Andrey Polushkin, Alexander Sakhnov24 Feb 2025

Problem

Customers of an online grocery app search the catalog by hand and often notice a forgotten item only after checkout. A recommender on the basket page can save search time, remind about needed items and suggest new ones. The company gains a higher average order value and loyalty, which can raise Lifetime Value (LTV). The task is hard because standard sequence models treat items one by one, while a basket is an unordered set and many of its items repeat earlier baskets.

Example from the article: a user orders delivery for cheese and forgets it until after checkout.

Solution in brief

Treat the history as a time-ordered sequence of item sets and predict the next set. The authors compare frequency methods, TIFU-KNN, TAIW and deep-learning models, and conclude that simple frequency methods and their refinements are the best-suited choice today. Check candidates offline with Recall@K and NDCG@K, then confirm in an A/B test.

Questions this case answers
  • How to recommend the next set of items from a time-ordered history of item sets where repeat consumption dominates
  • How to evaluate a set-prediction recommender offline when the number of recommendation slots is fixed
  • How to predict which items a customer will add to their next basket in a grocery app?
  • How to evaluate a next-basket recommender offline before running an A/B test?

Tools and methods

  • TopFreq and PersonalTopFreq — global and per-user frequency baselines
  • TIFU-KNN — time-weighted user vectors plus nearest-neighbor users
  • TAIW — adds per-item repurchase-interval patterns to the relevance score
  • DNNTSP — graph convolution plus attention for sequences of sets
  • Recall@K, NDCG@K, Novelty@K — offline metrics
Continue reading — it's free

Google or a one-time email code. No password.