The Bitter Lesson, Sweet Results
July 23, 2026. Written with Thijs Sluijter, published on Picnic Engineering.
This page summarises the work. The full article is on Picnic Engineering ↗.
Watch the talk
Thijs and I presented this work at PyData Amsterdam 2026 on September 11, 2026. Thijs talks about the modelling, and in the second half I talk about the engineering and scaling challenges that made it happen:
- Data pipeline. We thinned out the data warehouse layer: we do the bare minimum in Snowflake and load the data as raw as possible into Python. There we decide what to materialise and when, and the purchase history features are only materialised at batch time. With Polars, Arrow, Parquet and PyTorch, our end-to-end pipeline now takes half an hour instead of 5 hours, with four times less memory.
- Autoresearch. We put an agent in a loop on a big AWS instance with a good GPU. It can change the config and even the code base itself, including the DCN architecture. In the Netherlands, we started from a model with a 15% hit ratio and ended up at 30%. In two months, we ran 99 experiments and launched three successful A/B tests in three markets.
- API. The API contract is a customer and a bunch of recipes, and we simply sort them. We built it for one section of the Meals tab, but other teams started using it too.
New UI, new recommendation paradigm
We redesigned our Meals Page from the Meal Planner, focused on the “Weekly Menu”, to Meals 2.0, a more inspirational page with many sections for different needs. Previously, the goal was to filter our assortment of thousands of recipes down to three recommendations for each day of the week. The new page needed recommendations for many sections, each containing just a small set of candidates. This changed our recommendation problem from retrieval to ranking: with fewer items to score in each set, we can apply a more powerful model that requires more computation per item.
Before building a new model, we ran an A/B test of our Two-Tower model against a simple popularity baseline. In the Netherlands they performed on par, and in Germany and France the baseline even outperformed the Two-Tower model.
What we changed
- Two-Tower to DCN. We replaced the Two-Tower retrieval model with a Deep & Cross Network (DCN) ranking architecture. In a DCN, customer and recipe features are concatenated from the beginning, so the model can directly model customer-recipe interactions. We implemented it fully custom in PyTorch, with a net code addition of only a few hundred lines.
- Training data and objective. The DCN optimises binary cross-entropy, so every example needs a label. An ordered recipe is positive. A viewed-but-not-ordered recipe is negative only on a day when the same customer ordered at least one other recipe.
- Representation learning. We replaced all previous hand-engineered customer features with just two embedding features: recipe purchase history and article purchase history. Each purchase is embedded and mean-pooled into one history vector. This reduced the feature engineering effort and produced much better model performance.
- Autoresearch. An agent runs the whole training pipeline with hyperparameters it decides on, observes the results, logs the experiment and adds ideas for the next iteration. It could change hyperparameters such as learning rate, hidden sizes and embedding dimensions, but not the objective, data split, evaluation protocol or production constraints. This let us tune the model for each market quickly, and it also helped us find better regularisation when purchase history was overfitting.
Results
Offline, the DCN model outperformed the popularity baseline by as much as 3x on hitrate@15. After a two-week A/B test, customer conversion improved by more than 8% (relative) and recipe buying share, our north star KPI, by 1.5% (absolute). The DCN is especially effective for new and onboarding customers, because article purchase history lets the model recommend recipes to customers who have never bought recipes with us before. The A/B tests in Germany and France showed similar results.
The bitter lesson
Richard Sutton’s essay The Bitter Lesson states that scaling up the data and model size can outperform expert knowledge in a field of expertise. Instead of precomputing features like “number of meat products bought in the last 8 weeks”, we fed sequences of historical purchases to the model and let it learn the customer representation.