The Only Domain AI Can’t Crack

Recipes can’t be made by an AI: the data is all wrong!

Every AI expert has, soon or late, thought of developing a perfect formula for making cookies, brownies, or any other kind of dessert.

Photo by Melanie Kreutz on Unsplash

Let me guide you to the technical problems that a developer will encounter in the task. First of all, the data would be hard to collect and preprocess.

Issues with Standardization

The volume does not only depend on the kind of ingredient but the indications for using ingredients, sometimes, live too much space for interpretation. Sometimes you find written in a recipe to use a stick of butter; this would be equivalent to 115g in the US, only 100g in Europe. You will likely encounter the same problem using tablespoons and cups.

Collecting data

What AI algorithm could we apply?

We can encompass each recipe in a collection of Features (the ingredients), using the class of the brownies as Labels. We can then graph the data on a multidimensional cartesian field, and then estimate the size of the clusters. For each cluster, every recipe within a defined space can be classified as a defined class of brownies.

Disclaimer: clusters are not based on real data, retrieved from MathWorks

What you are seeing in the image above are three spaces that englobe all the possible collection of recipes. Each recipe in this math space is a single point. Thousands of them make a giant cluster that you can see as a sphere.

If you are wondering what happens if you choose a combination of ingredients that places your recipe out of the clusters, it is very simple, the recipe won’t work. Perhaps it will turn too liquid or too solid, or maybe too sugary. Only those defined domains are able to represent functioning recipes.

My balancing formulas for making brownies, obtained by using clustering on recipes of Patry Chefs

So far, it may seem like a very standard way to solve a clustering problem, but this is where things get messy.

The fundamental flaw in the data

The reason for this harsh statement is based on the existing gap between the systems used by the experienced pastry makers and regular people who both decide to publish recipes.

There is no data!

How to create a recipe: the professional way

One example: the Genoise Cake

Photo by Deva Williamson on Unsplash

One of the bases of pastries is called Genoise. This cake was discovered accidentally by a pastry chef from Genova during a visit to the court of a famous Spanish marquise. Unfortunately, in a hurry, he panicked and he overwhipped the eggs, discovering what is known as Genoise.

Leonardo di Carlo, an Italian Pastry chef, functions to create Genoise Cake

Pastry chefs, as much as they enjoy claiming to possess inhuman creativity, use those numbers as a base (with their own system of equations to determine the boundaries of each cluster). The numbers above represent specific clusters in an R⁴ Cartesian Field. Each cluster is representative of a class of cakes. However, if we set a range of degrees of freedom, we are can have a variance of cakes belonging to the same cluster.

Ligh_Cake_1: 100g Eggs, 45g Sugar, 55g Flour
Ligh_Cake_2: 90g Eggs, 45g Sugar, 65g Flour
Ligh_Cake_3: 85g Eggs, 55g Sugar, 60g Flour, 5g Butter
Ligh_Cake_4: ...

Recipes with no variance

Macaron Recipe

The gap between clustering approximation and the real recipe would be maximized, with terrible results.