Ingredient and cooking methods change according to diets.
The Client turned to the InData Labs team for custom AI software development. They needed to develop tools to generate various recipes, change cooking methods, and replace ingredients according to types of diets.
The challenge was for our team to consider the peculiarities of different diets and the special features of ingredient replacements. These special features include changes in proportions and cooking time, compatibility of products, adequacy of substitutions for special categories of dishes, etc.
Our team of AI developers and data scientists have created a web interface for AI recipe generation, ingredient substitution, and change in the cooking process itself.
We developed an ontology-like database, where all the ingredient substitutions for different diets are stored, and the replacement properties are described. These properties include changes of proportion (for example, if sugar is replaced with maple syrup, we should take 0.77 g instead of 100 g), changes in cooking time (vegan substitutions for meat require less time to be prepared), rules of compatibility (birch sugar cannot be combined with yeast), etc.
We developed a set of rules to replace ingredients in the texts of recipes according to the chosen diet, which applied all corresponding changes in terms of compatibility, proportions, etc. We used neural networks and artificial intelligence to generate recipes.
We added the grammar-check module to make the newly generated texts look natural and grammatically correct.
We also added a flow graph to each recipe as a schematic representation of the cooking process.
Now our AI recipe generator can substitute recipe ingredients in these types of diets:
To enable AI-generated ingredient and cooking method change, we first took the original recipe and modified it according to the diet.
For example, you can cook the traditional spaghetti bolognese. But if you’re on a vegetarian diet, you ask our AI machine learning recipe generator to suggest the modified recipe according to the vegetarian diet. This way, the generator substitutes ground beef with lentils, and bacon – with smoked tofu, and suggests adjusting the pasta sauce, too.
You can also apply several diets to one recipe; for example, make Spaghetti Bolognese both vegetarian and lactose-free. The machine learning recipe generator does all the thinking for you, you don’t spend time surfing the net and looking for a good recipe. All you do is choose the diet type and recipe to cook.
Our web interface is powered by AI and NLP technology. It generates the text in recipes and analyzes and makes recipe suggestions.
To get acquainted with our other projects, click here.
As a result, we’ve developed a web interface for smart recipe generation for the client. We’ve developed a custom set of rules and ontology trained to modify recipes according to the type of diets and user’s preferences.
Key benefits of the AI recipe app: