Mindful Chef is a recipe box delivery company. Founded in 2015, they focus on healthy recipes and fresh, locally sourced ingredients. Every week they offer 16 new recipes, delivering between 30,000 to 40,000 boxes every month and 7 million recipe suggestions so far. Mindful Chef use an auto-allocation system that assigns customers recipes for the coming week based on only their meal plan and excluded food groups. Customers are given an opportunity to change the allocated recipes or receive the default option based on their preferences.
The Pivigo team were asked to develop a recommender system for more personalisation in recipe allocation and improve customer retention reducing the likelihood that customers are sent recipes they did not pick or even worse, dislike. Such a recommender system would also have the benefit of allowing Mindful Chef to better forecast demand, which is a crucial factor when operating with fresh ingredients.
The data set included all historic user data covering half a million customers, and when matched with possible recipe choices per week formed part of a large data set with over 7 million rows and 27 different features. The team structured the project around four, weekly sprints. The first week was dedicated to exploratory data analysis, to gain some insights into customer analytics and behaviour.
These choices between recipes were found to not be independent and the algorithm had to take account of this. To overcome the key challenge of encoding large text features as numerical values was in something the team named ‘recipe2vec’ whereby all text features (title, description, ingredient list, etc) to encode each recipe. Key ingredients and their associated adjectives are naturally repeated throughout various text features, and this formed a 20-dimensional vector space. Some interesting parameters can be cleaned from this vector space. For example, the recommendation evaluation method is demonstrated in Fig1. comparing ‘soupiness’ and ‘meatiness’.
Network with practising and aspiring data scientists at our exclusive meetup.
The goal of the project was to build a recommender system that significantly outperformed the current auto-allocation system with respect to the most appropriate metric conceivable, and to completely productionise the system for immediate use within the company. The former was assessed with the MAP@k metric; the team achieved a 30% increase in success metric (MAP@k) over Mindful Chef’s autoallocation system and a 45% increase in success metric over a baseline random recommender system.
The productionised code is ready to be used and it is envisaged that the company retrain the model with new data every three months. This is easily achieved via a simple make command. On top of this, the team were able to provide the company with some previously unknown customer analytics obtained through exploratory data analysis; insights the company have already expressed a keen interest in.
“At Mindful Chef, we were excited to introduce Data Science into our business, but uncertain as to how to do so, and what the impact might be. From the beginning, Pivigo offered their experience in defining the right project and helping us understand what to expect. The team of data scientists who worked on our bootcamp project were nothing short of brilliant."
The insight they delivered, and the way in which they brought the latest data science techniques to create a deeper understanding, not just of our customer behaviour and segments, but how they choose from our recipes was something we could not have imagined beforehand.
The result of the project has given us a greater understanding of how our customers choose from our recipes, increased our spend per customer and will help us to forecast more accurately and keep to our minimal waste promise. We’re continuing to work with Pivigo to further develop our recommender system, and some other exciting data science projects together.”
- Robert Grieg-Gran, Co-founder & COO, Mindful Chef