July 7, 2026
"What's the best smoothie recipe?" is a strange question to hand to a research process, because it isn't really answerable as asked -- "best" according to whom, on what axis? The useful version of the question is: what's the most nutritionally dense smoothie that still tastes good? That's answerable. It just needs two things turned into numbers: nutrition, and "tastes good."
Rather than guess which ingredients pair well, I pulled 37 real, individually-sourced, star-rated smoothie recipes from seven food sites (Minimalist Baker, Love and Lemons, Cookie and Kate, Ambitious Kitchen, Well Plated, EatingWell, and BBC Good Food Middle East) and recorded which of 16 candidate ingredients each one used, plus its rating.
From that I built a pairwise ingredient compatibility matrix using rating-weighted, Laplace-smoothed Pointwise Mutual Information (PMI) -- the same statistic linguists use to find word collocations (Church & Hanks, 1990), just applied to ingredients instead of words. PMI matters here because raw co-occurrence would just say "banana is compatible with everything," since banana shows up in almost every recipe. PMI corrects for base-rate popularity: it only rewards pairs that show up together more than their individual popularity would predict by chance.
I then scored the 36 multi-ingredient recipes in that dataset on the same scale, and used their median as a taste floor -- the recipe I optimize for has to taste at least as good as a typical published, well-rated smoothie.
For 16 candidate ingredients (fruits, greens, seeds, a protein source, a liquid base, a sweetener) I pulled per-100g nutrition facts directly from USDA FoodData Central: calories, protein, fiber, sugar, vitamin C, vitamin A, potassium, iron, calcium, magnesium, and omega-3 ALA.
The nutrition score is modeled on the Nutrient Rich Foods (NRF9.3) index concept (Drewnowski, 2005): percent Daily Value of each nutrient-to-encourage, capped at 100% so no single nutrient can dominate the score -- otherwise the optimizer would happily fill the cup with cocoa powder for the iron and call it a day -- averaged across all nine, minus penalties for added sugar over 25g (the American Heart Association's per-day limit for women, used here as a conservative per-serving ceiling) and calories outside a 300-450 kcal window.
The decision variable is 16 real numbers, one per ingredient, decoded through a softmax into a mass-fraction simplex -- any input is automatically a valid, non-negative recipe that sums to 100% -- then hard-projected onto realistic per-ingredient caps (no ingredient may exceed 2.5x a standard household portion of itself) and a minimum liquid-base amount so the thing actually blends. Building the caps into the decode step, instead of as a tunable penalty, meant every candidate recipe the optimizer ever looked at was something you could actually make.
scipy wasn't installed in my environment, so I implemented both Particle Swarm Optimization (Kennedy & Eberhart, 1995) and Differential Evolution (Storn & Price, 1997) from scratch in numpy, and ran both as a cross-check on each other rather than trusting a single search.
fitness.pydef fitness(theta): x = decode(theta) # softmax + realism-cap projection nutri = nutrition_score(x) # NRF9.3-style, %DV capped at 100 each taste = taste_score(x) # PMI-based synergy + popularity taste_pen = max(0.0, TAU - taste) ** 2 return nutri - LAMBDA_TASTE * taste_pen
Both optimizers landed on the same recipe -- cosine similarity of ~0.97 between their final mass-fraction vectors -- and the result was stable across five-plus random seeds. That agreement is the interesting part: it means this is a real, dominant optimum in the fitness landscape, not noise from one lucky run.
Blend the almond milk and greens first, then add everything else, and blend on high for 45-60 seconds. It comes out to about 447 kcal and 8g of sugar, with fiber, vitamin C, magnesium, and omega-3 ALA all at or above 100% of Daily Value, iron at 51%, calcium at 67%, vitamin A at 73%, and protein at 38%. Its taste score lands right at the floor set by real published recipes -- modeled to taste like a typical well-rated smoothie, while being considerably more nutrient-dense than any single one of the 37 recipes it learned from.
Five of the eight active ingredients -- spinach, kale, chia seeds, flaxseed, and cocoa powder -- are pinned exactly at their realism cap in the winning recipe. The nutrition math wants even more of each one; only the culinary-realism constraint (2.5x a normal recipe's portion) is holding it back. That's a genuinely useful thing to learn from an optimization: the ceiling on how nutrient-dense a smoothie can get isn't really the math, it's how much kale and cocoa powder a person is willing to drink.
The taste-compatibility matrix comes from only 37 recipes across 120 possible ingredient pairs, so some pairwise scores are statistically noisy despite smoothing -- treat the ranking as directional. taste_score is a text-mined proxy for palatability (what shows up together in published, rated recipes), not an actual human taste panel. And the nutrition score doesn't cover every micronutrient that matters (no B12, sodium, or zinc here). All data, code, and full optimization results are saved and reproducible.
Almond milk -- the liquid base in the recipe above -- is a tree nut product, so I re-ran the whole thing with it excluded entirely. The candidate ingredient set needs a replacement liquid base; oat milk was the natural swap, so I pulled its USDA FoodData Central entry (Foundation, FDC 2257046) with the same sourcing rigor as the other 16 ingredients.
The harder part: oat milk shows up in none of the 37 recipes behind the taste-compatibility data, so there's no empirical basis for scoring how well it pairs with anything. Rather than invent a number, I imputed its taste-compatibility profile as identical to almond milk's, since both play the same neutral-liquid-base role in a smoothie. That's a stated modeling assumption, not measured data -- flagged as such in the code and the project's data files. Everything else (nutrition scoring, the taste floor, both optimizers) is unchanged; only the ingredient set and liquid base were swapped, and the optimization was re-run from scratch.
The result (one ~500g serving):
Mango and rolled oats drop out of the recipe entirely; a little banana and strawberries take their place. Nutrition score comes out to 70.6, versus 71.0 for the tree-nut version -- about a 0.4-point cost out of ~71 for removing the allergen, mostly because oat milk is less nutrient-dense per gram than almond milk, so the recipe needs roughly 28g more of it to fill the same liquid role. Spinach, kale, chia seeds, flaxseed, and cocoa powder still hit their realism caps exactly as before -- the greens/seed/cocoa-limited finding holds regardless of the liquid base.