Your next favourite meal: Data science in personalising food delivery

Disha Mendiratta
AirAsia MOVE Tech Blog
6 min readOct 19, 2021

By Disha Mendiratta

From selling meals in-flight to delivering meals to your doorstep, food delivery is but one of the 15+ travel, e-commerce and fintech products that are now available on airasia Superapp, Asean’s lifestyle super app.

airasia Superapp has launched its food delivery service in Malaysia, Singapore, and Thailand, with plans to expand to the rest of Asean in the next year. We now have thousands of restaurants on our platform with a wide range of cuisine options.

We order food when we want to celebrate or when we are too lazy to cook or when we just want a chocolate dessert to lift up our mood. Also, with COVID lockdown restrictions we don’t wanna miss eating at our favourite restaurant, so food delivery at homes got this covered. We, at AirAsia, want to build a food platform which serves all, and provide an amazing food ordering experience through personalisation. This article focuses on how we are building the data science foundation for AirAsia’s Food Platform.

Building Taste Profiles

Food Dataset includes the details of items sold by the restaurants, and the food purchases made by users. When we started out working on the food data, we realised that the data from merchants regarding the food items is, either at a very high level like asian or western, or at a low level like pasta, noodles or seafood. Asian category includes cuisines like oriental, Thai, Japanese, etc.

Image credit: Borneo Foodie

These broad categories don’t give us a lot of information regarding the taste profile of the user or restaurant’s speciality. For example, people’s preferences vary, some prefer veg over non-veg options, whereas some non-vegetarians only eat chicken and others eat all kinds of meat.

We felt that we are missing out on these subtle preferences. To fill this gap, we introduced a cuisine mapping curated based on the menu items sold on our platform.

We classified the menu items into different 40+ cuisine categories like oriental, Japanese, Indian, desserts, healthy, non — halal, local, etc .

Like Nasi Kerabu Ayam Percik which was initially classified as Asian, we refined our labelling of the dish to include further categorisation into Chicken, Malaysian, and Rice. Another example, Japanese cream puffs are classified into Japanese and Dessert categories instead of only Dessert category.

For such classification, we researched various cuisines and food terminology amongst people in Malaysia and Singapore. We also looked into the common dish names, descriptions and other additional information to make sure that we cover the majority of the dishes offered on our platform.

Accordingly, we built a taste profile for the users and restaurants.

User Taste Profile

Based on user’s past orders, the user is tagged with different cuisine categories.

Example: Jane has in the past ordered 2 Chinese items → Char Kuey Teow & Wonton, thus her taste profile is oriental.

These are the User Embeddings which reflect the association of user with the cuisine categories.

User Embeddings

Restaurant Food Profile
Based on the available menu items, the restaurant is tagged with different cuisine categories.

Example: The Chinese restaurant sells 10 oriental dishes and 4 dessert items, which makes it more inclined towards the oriental cuisine side.

Restaurant Embeddings

Above are the Restaurant Embeddings which reflect the association of restaurants with the cuisine categories. We created the embeddings like these, as the mapping of user and restaurant with various cuisines is not one-on-one.

On some days, you are in the mood of Thai Green Curry Chicken, while on some days you might wanna have Nasi Lemak. The former is Thai, and the latter is Malaysian Food. In fact, restaurants sell food from multiple cuisines. So, we do not just tag a user or a restaurant to a single cuisine.

Finding Similarities

After creating embeddings for users and restaurants, we performed matrix factorisation at user level and restaurant level.

Finding Similarity Score using Dot Product

Using this, high user-restaurant correspondence leads to recommendation. This involves dot product of user-cuisine matrix with restaurant-cuisine matrix. The higher the score, the higher the similarity between what the user has ordered in the past and what the restaurant offers.

User-Restaurant Embeddings

In the example above, the Chinese restaurant has the highest score, thus it will be recommended to Jane.

Restaurants are further ranked for each user based on the resultant matrix. The Matrix Factorisation technique helps us unlock the latent features to give a prediction of the best suited restaurant for the user with respect to similarity in a user’s past orders and the type of food offered by restaurants. The higher the restaurant items’ similarity to the user’s past orders, the higher the score.

This is further optimised using the power function. Multi-cuisine restaurants and users ordering multiple cuisines are very common, but how do we reflect this in the algorithm? Here, the Power Function came to our rescue and helped in smoothing the data. The restaurants which had multiple cuisines received higher scores as compared to the restaurants with a single cuisine and greater item count. The similar restaurants obtained were more generalised with this approach.

No one likes to wait for very long for food, thus we have aggregated multiple other factors like distance to user with the cuisine model. We also included a factor of trending restaurants to help the user discover the old and the new. Thus this engine is an ensemble of multiple models.

Challenges we faced while working on this :

  • Malaysia and Singapore are countries with rich diversity, we have people here from different parts of the globe. From local food to oriental, from Thai to Indian, there are plenty of food options, adding complexity in discovering a user’s taste profile.
  • One of the biggest challenges is catering to user needs according to their lifestyle preferences. For example, some customers prefer only halal food, some prefer vegan or vegetarian food. These factors need to be taken into account while recommending food items or restaurants.
  • The accuracy of classifying food into different categories. For example, in the description of noodles mentioned Asian pasta which categorised the noodle dish into both oriental and continental categories which were not complementary. We are further working on improvising our cuisine mapping to avoid wrongly classifying items and to add more layers in this mapping.
  • The number of items offered by a restaurant varies a lot, some restaurants have a small menu while some have a large menu, which also needs to be differentiated.

By matching similarities between users and restaurants, we have been able to deploy personalised marketing by way of EDMs and Push Notifications. We observed that personalised push notifications perform better than generic ones.

We have just started out this amazing venture and are still learning, experimenting and improvising. We hope to help you discover your next favourite dish from your next favourite restaurant!

I guess we have discussed enough about food which might have made you a little hungry, why not turn on your airasia superapp and give AirAsia Food a try!

--

--