Solving the weekly menu puzzle: recommendations at Picnic

Giorga Tandoi15 Jan 2024

Problem

Picnic, a supermarket with an app, shows recipes so customers can build a weekly menu with a click. All customers saw the same manually curated list, so the app could greet someone with a recipe built around an ingredient they avoid. Picnic wanted personalized suggestions without rating data. The only signal available was how many times each customer ordered each recipe.

Example from the article: one customer bought a gnocchi recipe 58 times and an Indian curry only a couple of times, so the model called the curry similar to the gnocchi.

Solution in brief

Build a customer-by-recipe matrix of order counts and fit an item-based nearest-neighbour model with cosine similarity from the implicit package. Reweight the matrix with BM25 first, which damps outlier customers and the extra exposure of curated recipes. Check the result in an 8-week A/B test against the curated list.

Questions this case answers
  • How to build a first personalized recommender from purchase counts alone, without ratings or item features
  • How to correct item similarities for outlier users and for exposure bias created by manual curation
  • How to recommend recipes to grocery customers when the only signal is how often they ordered each recipe?
  • How to stop one heavy buyer from creating false similarities between recipes in an item-based collaborative filter?

Tools and methods

  • implicit (CosineRecommender) — item-based nearest-neighbour recommender on implicit feedback
  • Collaborative filtering — scores a recipe by summing a customer's past orders, weighted by recipe similarity
  • BM25 weighting — rescales the interaction matrix to cut outlier and popularity noise
  • A/B test — recommended content versus the curated list
Continue reading — it's free

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