Recommendation System in the Form of an Ontology-Based Chatbot for Healthy Food Recommendations for Teenagers

: Adolescents need adequate nutrition to support their growth and to avoid nutritional problems, such as malnutrition or obesity. Nutritional issues during adolescence can significantly influence health problems in adulthood. Although information about nutrition science is widely available on the internet, accurate interpretation requires specialized knowledge of nutrition science. Therefore, a system is needed to provide direct recommendations for healthy food to adolescents. In this study, a recommendation system in the form of a chatbot was developed to recommend healthy food that meets the nutritional needs of adolescents. The system was constructed using Ontology supplemented with Semantic Web Rule Language (SWRL), enabling the recommendation of food according to adolescents' health conditions. From the collected sample data, 150 food menus were recommended. Validation results by nutrition experts showed a precision value of 0.75, a recall of 1, and an F1-score of 0.857. These results indicate that the system is capable of providing appropriate food recommendations for adolescents.


Introduction
Adolescence is an important transitional period in the phase of human life, involving significant biological, psychological, and social changes. This phase requires proper nutritional intake to support optimal development. However, many adolescents do not meet their nutritional needs properly, which can lead to some problems, such as malnutrition or obesity. Malnutrition can have a negative impact on the growth and development of adolescents, while obesity can lead to various serious diseases. In addition, it is such a challenge in finding accurate and easy-to-understand information about healthy food for adolescent since knowledge of nutrition is required.
In this context, this research aims to develop a chatbot-based recommendation system that can provide suggestion or recommendation about healthy food for adolescent. This system will utilize an ontology model equipped with Semantic Web Rule Language (SWRL) to process the rules based on the knowledge that has been collected. Through an ontology model, it will facilitate to organize and share knowledge, allowing knowledge from experts to be easily integrated into the system (Lertkrai, Kaewboonma, and Lertkrai 2018).

Topics and Limits
Adolescent refers to a period of human growth and development from childhood to adulthood. Changes in its development include biological, psychological, and social changes (Chiu et al., 2021;Velez, 2021). During this period, adolescents need various things to support their growth, including the need for adequate nutritional intake (Leroy et al., 2018;Soekarjo et al., 2018). Adolescents have greater nutritional needs than children phase. However, adolescents tend not to meet nutritional needs as needed or do not follow the food recommendations (Chiu et al., 2021).
Nutritional problems becomes a result of wrong eating behavior, such as malnutrition and obesity (Das et al., 2017;Oddo et al., 2019;Salam et al., 2016). Malnutrition occurs due to unbalanced nutritional 5086 intake. This can include specific nutritional deficiencies, such as iron deficiency anemia, or more general malnutrition, which can affect adolescent growth and development. The second nutritional problem refers to obesity, which is caused by excessive caloric intake compared to energy expenditure. The problem of obesity continues to increase in prevalence from year to year. According to the Basic Health Research (Riskesdas) data in 2013, the prevalence of obesity or overnutrition in adolescents aged 15-18 years continued to increase from 2013 to 2018, which was initially 26,6% to 31,0% (Kementerian Kesehatan Republik Indonesia, 2018;RI, 2018). Obese adolescents have the risk of experiencing various forms of illness Obese adolescents which can be life threatening, such as diabetes, high blood pressure, heart disease, stroke, and several types of cancers.
The rapid growth of information technology storage, such as web media, allows users to store information, and it can be accessed by other users. However, because of the large amount of information, the problem that arises is the difficulty in finding the right information, including information about healthy food for adolescents. In this current situation, there is a search system in the form of a search engine that can assists the users to get some information in a short time. However, the users still have to check the data first so that it matches with the information needed, which of course is not efficient in time (Sapitri et al., 2018). Information about healthy food for adolescent circulating on the internet requires knowledge of nutrition, because a mistake in understanding this information can have a negative effect on the body. Therefore, it is necessary to have a system with has an expert to provide healthy food recommendations for adolescent.
The constructed system in this final project is a recommendation system in the form of a chatbot that provides food recommendations. The system can only provide recommendations to youth aged 10-19 years. There are 423 food datasets used in the development of the recommendation system, taken from the Indonesian Food Composition Table (TKPI This research aims to understand the achieved results by applying an Ontology approach in developing a food recommendation system for adolescents. Evaluation of this system focused on recall, precision, and f-score as the main indicators of its success.

Writing Organization
The writing organization in this final project consists of five sections. The second chapter discusses studies related to this research, the third chapter discusses the design of the system, then the fourth chapter reports the results of system testing and analysis of these results. It provides an assessment of system performance based on the metrics used that has been determined. Last, fifth chapter discusses the conclusions of this thesis.

Method
The recommendation system has greatly assisted in a various aspects of life, including in providing food recommendations. In the last decade, several studies regarding food recommendation systems have been carried out. Study entitled "An Ontology-Based Framework for a Telehealthcare System to Foster Healthy Nutrition and Active Lifestyle in Older Adults (Spoladore et al., 2021). They developed an Ontologybased remote health care system to encourage healthy nutrition and active lifestyles in older adults. The system used Semantic Web Rule Language (SWRL) to determine a patient's daily caloric intake, concerning impairment and their daily water intake. Each patient can enter their daily diet plan by specifying the dishes they want to eat. The advantages of this system are that it can be adopted by patients as a tool to plan their daily diet, provide sensible and customized advice, and clinical personnel have the possibility to adjust the diet and check its contents. The system combines nutrition advice with recommendations for physical activity with the goal of addressing two modifiable risk factors for a range of chronic conditions. The results of this study suggest that this system can determine whether a diet plan is suitable for the patient or not. Showafah et al. (2021) in their research entitled "Ontology-based Daily Menu Recommendation System for Complementary Food According to Nutritional Needs using Naïve Bayes and TOPSIS" mentioned the development an ontology-based daily menu recommendation system for complementary foods according to nutritional needs. This system used the Naïve Bayes and TOPSIS methods. Naïve Bayes is used to prepare menu options based on user preferences obtained from user feedback on recipes that have been tried. Meanwhile, TOPSIS is used to provide optimal recommendations regarding nutrient balance and user preferences. The advantage of this system is that providing daily menu recommendations that consider the balanced composition of three essential nutrients (carbohydrates, proteins, and fats) in the diet, as well as concerning the preferences of the baby and mother. The results of this system show a good level of user satisfaction based on usability testing using SUS.
In 2018, (Agapito et al., 2018) introduced "DIETOS: a dietary recommender system for chronic diseases monitoring and management". A food recommendation system called DIETOS was then developed. The system is designed to provide user health profiles and individual nutrition recommendations based on user answers to dynamic real-time medical questionnaires. In addition, DIETOS contains a catalog of typical foods from Calabria, a region in Southern Italy. The benefit of this system is its ability to provide highly specialized nutritional advice in a wide range of health conditions, thereby improving the quality of life for both healthy subjects and patients with diet-related chronic diseases. The result obtained from this system is a highly accurate user health profile that corresponds to the diagnosis made by the doctor, as well as dietary advice appropriate to the user's health condition. In addition, the results of this study were also obtained 100% specificity and 91% recall. McKensy-Sambola et al. (2022) in their research entitled "Ontology-based Nutritional Recommender System" developed this Ontology-based nutritional recommendation system using Ontological hierarchy to define a more specific user dietary profile by considering allergens, to provide better recommendation services. The system converted the user's personal details into OWL axioms and used this information to arrange dietary recommendations. The system also considers the user's medical condition as the first factor in making suggestions. The details entered by users are used to classify their situation and recommend diets accordingly. Once the diet is established, a list of recipes can be recommended concerning the ingredients that are more appropriate for the user. The results obtained from this study are 87% accuracy, 76% precision, 95% recall, and 84% f-score. Ali et al. (2018) in his research introduced a recommendation system with type-2 fuzzy Ontology for IoT-based health care that can efficiently monitor the patient's body and can also recommend diet foods and medicines. The study used Ontology to store patient information, food consumed, and medication prescribed. Semantic Web Rule language (SWRL) and fuzzy logic are also used to automate the recommendation process. The results obtained in this research stated that the system has a precision of 100%.

BMI/A
The calculation of Body Mass Index (BMI) can be used to estimate a person's nutritional status (Notoatmodjo, 2020). BMI is a measurement used to determine nutritional status using a comparison of weight and height. The calculation of BMI in adults and adolescents is different. The BMI measurement in adolescents is closely related to their age. During adolescence a person experiences changes in body composition and body density due to changes in age. Therefore, in adolescents, the BMI indicator according to age is used which is symbolized by BMI/A or also known as BMI for age. To calculate the BMI/A value, a calculation is first performed to get the BMI value. The formula for getting the BMI value can be seen as equation 1. (1) According to the IMT value, anthropometric table for assessing children's nutritional status (Indonesia 2020) with the provisions can be seen in Table 1. -3 SD to -2 SD Normal -2 SD to + 1 SD Overweight + 1 SD to +2 SD Obesity > + 2SD

Daily Calorie Needs
To determine food recommendations for adolescents, daily calorie needs are required which are calculated according to the condition of the adolescent and the type of activity (Waspadji et al. 2007 Activity values and nutritional status of adolescents are also needed to calculate their daily caloric needs. There are 4 types of activity values, namely low, mild, moderate, and heavy (Chattopadhyay et al., 2019;Rukmana et al., 2021). The following types of activity and their values can be seen in Table 2. For the nutritional status of adolescents, it is needed an added value or minus value in daily calorie needs. For example, if an adolescent has an obese nutritional status, his calorie needs are reduced by 500. This is for the goal of losing about 0,5 kilograms per week of weight according to general dietary guidelines. For nutritional status with values can be seen in Table 3. To find out the daily calorie requirements, the values of BMR, activity, and nutritional status are added together, the data can be seen in the following formula in equation 4.

Results and Discussion
System Implementation In this section, an implementation of the system is carried out in the form of creating an Ontology and creating a chatbot system in the Telegram application. The process of developing a chatbot application system started with creating an Ontology using Protégé version 5.6.1. Ontologies are developed using a topdown methodology, where general ideas are defined first and then sub-divided into more specific subconcepts. A clear and easy-to-understand hierarchical structure can be created using this method. An overview of the Ontology developed can be seen in Figure 1.

Ontology Implementation
Ontology is equipped with Semantic Web Rule Language (SWRL) to add rules which aim to help in inference and decision making. An example of SWRL used in an ontology can be seen as follows. The writing of SWRL rules follows W3C standards (Horrocks et al. 2004). This is Rules are used to calculate the calorie distribution: swrlb:multiply (?nbc, ?c, 0.2) ^ swrlb:multiply(?nsc, ?c, 0.2) ^ food1:hasCalorie (?p, ?c) ^ swrlb:multiply(?ndc, ?c, 0.3) ^ swrlb:multiply (?nlc,?c,?nlc) ^ food1:DinnerCal(?p,?ndc) ^ food1:SnackCal(?p,?nsc) ^ food1:BFCalorie(?p,?nbc)) Rules are used to calculate the calorie distribution for each food based on the total calories. With this rule, information regarding the calorie distribution for each food based on the user's total calories can be added. This is an example of how rules are used in ontologies to perform automatic inference and support the recommendation process.
All SWRL defined rules are executed or interpreted using the inference engine. In this study, Pellets were used to be an inference engine. These are already available in Protégé, so the readers can use them easily.

Implementation of Healthy Teens Bot
Chatbot development is designed using the Python programming language. Chatbot development also involves using the Owlready2 library which functions as a link to access Ontologies. Owlready2 facilitates integration of Python and ontologies, making it easy to build and test chatbots. Meanwhile, the provided Telegram API is used to connect the program with Telegram. Furthermore, to get a list of food recommendations, SPARQL is used as the query language.
To recommend foods, Health Teens Bot needs to receive user input in the form of information regarding weight, height, age, gender, activity level, and allergies. The display for user input can be seen in Figure 2. The system will display information from the user that is considered by the system to provide food recommendations.
Then in Figure 3

Test Result
Testing the system involved nutritionists and the participation of adolescents aged 10-19 years. Through the Google form, information such as name, gender, age, weight and height, physical activity, as well as allergies were collected from 30 respondents. Each of these data is input into the chatbot to provide recommendations for three basic food menus, one snack menu, and daily water needs. From a total of 30 respondent data, 150 samples of food recommendations and daily water intake were produced. The results of the recommendations, along with the level of Body Mass Index (BMI) for each respondent, are recorded in the form of a spreadsheet. This BMI level marking aims to examine the correlation between chatbot recommendations and the user's health condition. All recommendations were validated by a nutritionist to ensure reliability and validity.
The validation results of 150 food samples and daily water requirements show that 105 menus are approved and 35 menus are not approved because there are still foods that are not allowed to be recommended to users with a certain BMI level. The results of this validation are used in calculating recall, precision, and F1-score. The calculation process can be seen in equations 5, 6 and 7.
Through Recall, it can be seen to what extent the system is able to provide relevant recommendations to users. Meanwhile, Precision is used to determine the extent to which the recommendations provided by the system are really relevant. The closer the Precision and Recall values near 1, the better the performance of the recommendation system. In addition, the F1-Score, which is the harmonic mean of Precision and Recall, is also used to measure the effectiveness of the system as a whole. An F1-Score value close to 1 indicates that the system has a good balance between Precision and Recall.

Analysis of Test Results
System testing involves nutritionists affiliated with Pratama Griya sehat clinic and participation of adolescents aged 10-19 years through Google form. As a result, adolescent information such as name, gender, age, weight and height, physical activity, and allergies can be collected from 30 respondents. Each of these data is inputted into the chatbot to provide recommendations for three staple food menus, one snack menu, and daily water needs. From a total of 30 respondents' data, 150 samples of food recommendations and daily water intake were produced. The recommendation results, along with the Body Mass Index (BMI) level of each respondent, are recorded in spreadsheet form. This BMI level marking aims to check the correlation between chatbot recommendations and user health conditions. All recommendation results are validated by a nutritionist to ensure reliability and validity. Nutritionists validate food menus based on user BMI levels by examining 150 food menu samples on a spreadsheet. Each sample is then compared to the user's BMI level. If a food menu sample matches a user's BMI level, the result is categorized as "approved", which means that the menu is suitable and healthy for consumption by the user. Conversely, if a food menu sample does not match, the result is categorized as "disapproved" or "not suitable", which means that the menu is not recommended for users.
The system generates a number of food recommendations that nutritionists don't fully agree with, suggesting that the system needs to be more adapted to recommend the right foods for each BMI level. Then testing has shown that many of the carbohydrate foods recommended by the system are not suitable for adolescents with a BMI that indicates obesity. This underscores the need for specific and appropriate food categorization according to BMI conditions. Lastly, the system currently generates food randomly as long as it meets a user's caloric needs, which can lead to an inappropriate mix of flavors in one dish. This shows the importance of categorizing food based on meal time to ensure harmonization of tastes.
Based on this analysis, significant adjustments are needed to improve the accuracy and quality of the food recommendation system. Necessary improvements include adjusting the system to synchronize food recommendations with the user's BMI level, creating special food categories for adolescents with obese BMIs, and categorizing food based on meal times aim to ensure harmony of flavors in one menu.

Conclusion
Based on the test results, the Ontology-based chatbot system provides healthy food recommendations for adolescent and shows significant effectiveness. This system demonstrates impressive performance in presenting recommendations that are relevant and in accordance with user needs, as indicated by the maximum Recall value of 1, a fairly high Precision of 0.75, and an F1-Score value close to 1, 0.857. These results confirm that the use of Ontologies and SWRLs in the recommendation system is able to produce recommendations that are more personal and in accordance with the user's conditions. Although there are some recommendations that still need more improvement, this system is successful in assisting adolescents in making healthy food choices. For future research, there are several aspects that can be improved and expanded. First, improvements can be made to system validation. Although the system has been validated by a nutritionist, validation from users is also important to ensure the system meets their needs and preferences. In this case, the test results indicate that some of the food recommendations from its system are not suitable for adolescents with obese BMI levels and the combination of food flavors in one menu that still needs to be improved. Therefore, future research can involve more users in the system validation process, and add more rules and parameters, such as concerning BMI level and food taste harmonization in recommendations to increase the relevance and user satisfaction of this food recommendation system.