Problem
Picnic recommends recipes to customers who plan their weekly meals. Its first system was collaborative filtering on a customer-recipe interaction matrix. It worked for customers with long histories but did not scale well, gave little for new recipes or new customers, and kept repeating the same recipes. It also could not use recipe attributes or customer preferences, so the team could not engineer features for it.
Example from the article: a customer keeps meeting a recipe with the one vegetable they would rather avoid, because personal preferences are not fully considered.
Solution in brief
Picnic rebuilt the task as a table of positive interactions, each row carrying customer, recipe and context features. It trained a two-tower retrieval model on purchases with TensorFlow Recommenders. Negatives come from other items in the same batch, with a frequency correction against popularity bias.
Questions this case answers
- How to replace a collaborative filter built on an interaction matrix with a feature-based model that still works for new users and new items when only positive implicit feedback exists
- How to train a candidate-retrieval model on positive-only interactions without letting popular items dominate the sampled negatives
- How to move recipe recommendations from an interaction-matrix collaborative filter to a model that uses customer, recipe and context features?
- How to choose between a ranking and a retrieval model when only implicit feedback such as purchases is available?
Tools and methods
- Two-tower retrieval model — encodes customer and context features in one network and recipe features in another, then returns a shortlist of likely recipes from implicit positive feedback
- In-batch negative sampling — treats non-interacted items in the batch as negatives
- TensorFlow Recommenders (TFRS) — implements the retrieval model and the batch loss
Google or a one-time email code. No password.