In my 1st year at Télécom Paris, we did a project in groups of 8. Our project was called "Supplies 2 Recipe", and the concept was as follows:
"As students, we want to eat healthy, but are limited by a small budget and no car to shop for groceries. Therefore, most of the time, we lack an ingredient for a given recipe, have leftovers to finish, or cannot buy an ingredient which is too expensive.
What if we could swap the missing ingredient for another one? And find a recipe that uses only the ingredients we have?"
The app uses AI to do what professional chefs do all the time: improvise with what they have and find subtitutes for what they haven't. But here, as we are not chefs, AI does it for us.
I was in charge of the whole AI part of the project, and half of the Database aspect, because the two were closely entangled. Other members of the team did the app, the website, the backend server, the marketing and communication parts etc.
AI Algorithm
My idea was to exploit a (quite counter-intuitive) analogy between cooking and language: "words are to sentences what ingredients are to recipes". This enabled me to use NLP techniques (AI for language processing) to automatically decide if an ingredient was swappable for another one, whether they were "playing the same role" in the recipe. Namely, I used Word Embeddings techniques such as FastText to generate ingredients embeddings.
Database
The database aspect was not boring for this project, I promise. The goal was to search a database of recipes for recipes that uses ONLY ingredients that the user had, or recipes with close matched (only a few ingredients missing). (And of course other classical search params, like cooking time, type of meal, ...).
I tried several things (among them brute forcing search for all recipes in the database) but finally went for the graph database system Neo4j. The final queries were really efficients (<100ms).
Putting things all together
The app was first returning to users the "perfect match" recipes (all ingredients available). But if there were not, or if the user was wanting for more recipes ideas, the AI was trying to subtitute missing ingredients from partial match recipes with the ones available. The "similarity" between ingredients measured by the AI NLP algorithm was used to determine valid subtitutes.
The project was quite a success as of the underlying algorithm and concept. With a rework of the UI/UX (adding products by scanning/entering them one by one is a nightmare), it would probably be great. I was personnaly advocating for directly scanning grocery tickets, but we lacked time to implement this. It's one of the project ideas that I still have in mind, and I will surely rework on it one day.