Tan Sheng Rong.

Telegram Bot

The NTU Food Bot is a telegram bot that helps NTU students decide what to eat and where to eat at. Written in Python, it is able to do so by providing information in a clear and user-friendly interface. The bot provides ratings for the canteen food in NTU and food recommendations based on a user’s location, preferences and dietary requirements.

Click here to start using the bot

Table of Contents

  1. Problem Statement
  2. Proposed Solution
    1. Determine the nearest canteen
    2. Dietary Preferences
    3. Choice of Canteen
    4. Type Preference
    5. Ratings
  3. Flowchart
  4. Afterthought

Problem Statement

With the rise of social networking platforms, the convenience of having functions in such platforms are desirable. My group decided on the issue of Food that was happening on campus.

Food is an integral part of Singaporean culture and society. It is a defining element of our national identity and is a national pastime. Hence, it is unsurprising that many Singaporeans place great importance on the food that they consume. Singaporeans are also known to be pragmatic and often want to have sufficient information to make informed decisions (Lai, 2017). Consequently, many Singaporeans often rely on recommendations (whether online or offline) to decide what food they would eat.

With the abundance of multi-national cuisines available in Singapore, we have developed sophisticated tastes and preferences, and have come to expect diversity in our diet. Furthermore, individuals have different food requirements due to religious reasons or personal preferences. Such factors have to be considered when making food choices. This adds to the complexity of deciding what to eat, especially when one is eating with several other people.

Similarly, NTU students face such issues when deciding what to eat. With many canteens in NTU and a diverse selection of food, we are spoiled for choice. It often becomes difficult to decide where and what we want to eat. Students often end up eating the same food repetitively for the sake of convenience. As a result, some do not even know of the wide variety of canteens and cuisines in NTU that they can try out, and do not make the most out of their experience in NTU.

Students are also required to work under demanding schedules. Time is limited and there is a need for quick and decisive choices. Little time can be spent pondering over the next meal.

Proposed Solution

To tackle the problems faced, we designed a telegram bot named NTU Food Bot. It serves to help users make informed yet quick food choices.

We surveyed all the canteens in NTU to compile a database of the stalls available in each one of them. This allowed us display a large variety of stalls to users and to show them a more comprehensive view of the various food available in NTU.

By taking the user’s location, food preferences and dietary requirements into consideration, NTU Food Bot is able give food recommendations based on these parameters. It is able to achieve this by accomplishing the following tasks:

Determine the nearest canteen

NTU FoodBot prompts users to provide their current location to the telegram bot. This information, in terms of latitude and longitude, will be sent to Google Maps via the API. In response, the bot will provide information on the estimated distance and walking time required to reach the nearest canteen. This allows the user to make more informed choices on which location to go for food.

Dietary Preferences

NTU FoodBot gets the user to input their dietary preferences: Halal, vegetarian or no preference. This is done through custom reply keyboards, which are used throughout the user’s communication with NTU Food Bot. The communication process is thus streamlined and the user experience simplified.

Choice of Canteen

NTU Food Bot displays a list of canteens for the user to choose from. The user can then choose a canteen near him/her, or simply explore other canteen options. This gives them a wider variety to choose from.

Type Preference

A custom keyboard is then displayed, where a user can then choose from various food types that are available in their chosen canteens. Examples of such food types include: Western, Chinese and Indian food. When they pick a food type, a list with the food stalls selling their chosen food type and from their chosen canteen will be displayed.

Ratings

For users to determine whether the stall is a good choice for their meal, they can check the average rating of the stall. They can do so by choosing the “Give / Check stall rating” option on the main keyboard (welcome keyboard). The user can then choose a canteen with the stall they want to check the rating, followed by the clicking the stall of their choice. These are done via custom keyboards for ease of inputting the information, and to reduce any errors caused by manual typing. The current rating of the stall would then be displayed in the form of number of stars. After users have patronized a stall, they can input their rating of the stall, on a scale of 1 to 5 stars. After the user has rated the stall, NTU Food Bot will calculate the new average rating of the stall and update the stall’s rating value in the list containing ratings for each respective stall. This new value will be shown the next time the stall is displayed to users. Over time, a reliable database of user ratings will be formed, and this allows users to make a more informed choices about which stalls are more popular and which stalls they want to frequent.

Flowchart

placeholder

This flowchart details the steps of bot and user interaction from start to end.

Afterthought

With limited time and many choices, students often want to be able to make quick and mindful decisions. Many factors come into the decision-making process. Often, it is easy to lose track of them. NTU Food Bot serves to simplify this process by providing users with the most relevant factors for food in NTU: location, preference and type. With an internet connection and access to Telegram, students are able to immediately find out the ratings for a food stall, regardless of the time of the day. Some key takeaways from this project would be to always be prepared to learn new things and to be cognisant that there is always room for improvement. In the near future, we intend to expand our scope of food to non-canteen food and to include menus of stalls. Additionally, backtracking may be implemented after all edge cases has been thoroughly considered.

comments powered by Disqus