Published 22-10-2025
Keywords
- Gastric disease, Healthy diet, Chatbot, Natural Language processing, K-Nearest Neighbor
Copyright (c) 2025 Hendrawaty, Azhar, Rafli Abdul Aziz

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Abstract
Gastric disease is one of the most common health problems and requires special treatment, including proper dietary arrangements. This research aims to design and build a healthy diet recommendation system using chatbots that utilize Natural Language Processing (NLP) and K-Nearest Neighbor (KNN) methods This system is designed to help people with gastric diseases by providing appropriate dietary recommendations based on the symptoms they are experiencing. In the design stage, the system identifies the symptoms mentioned by the user through a conversation with the chatbot. NLP is used to extract relevant information from the user's input text, while KNN is used to classify symptoms and provide appropriate dietary recommendations. The system was tested using a dataset that had been adjusted to cases of gastric diseases. The test results show that this chatbot system has a classification accuracy of 96.36%, with a confusion matrix that shows good performance in identifying symptoms and providing recommendations. The system is able to understand the context of the conversation well through NLP, while KNN provides accurate classification based on the available datasets. With these results, this system is expected to be an effective tool for gastric disease sufferers in managing their diet better and appropriately.
Downloads
References
- S. M. Rachma, M. Nishom, and S. F. Handayai, “Gastric Disease Diagnostic Expert System Application Using the Fuzzy Mamdani Method,” J. Informatics Inf. Syst. Softw. Eng. Appl., vol. 5, no. 2, pp. 104–114, 2023, doi: 10.20895/inista.v5i2.1057.
- H. Sampul, P. Studi, T. Informatika, F. Teknik, D. A. N. Komputer, and U. P. Batam, “Penerapan Algoritma Naive Bayes Dalam Memprediksi Penyakit Lambung,” vol. 12, no. 2, pp. 10–15, 2022.
- D. Parbagasan, K. Uluan, A. Martiasari, and S. M. Lisca, “Hubungan Pola Makan , Pola Istirahat Dan Pola Kebersihan Pada Anak Pra Sekolah Terhadap Perilaku Hidup Bersih Dan Sehat Di TK Santo Asih,” vol. 00, 2023.
- A. Trilaksmi, D. Nazma, L. Panduwaty, and N. Prasetyaningsih, “Penyuluhan Pola Makan Yang Sehat Pada Pengemudi Ojek Online Untuk Mencegah Gastritis,” vol. 2, no. 7, pp. 805–812, 2023.
- I. Ibrahim and A. Abdulazeez, “The Role of Machine Learning Algorithms for Diagnosing Diseases,” J. Appl. Sci. Technol. Trends, vol. 2, no. 01, pp. 10–19, 2021, doi: 10.38094/jastt20179.
- P. Kandpal, K. Jasnani, R. Raut, and S. Bhorge, “Contextual chatbot for healthcare purposes (using deep learning),” Proc. World Conf. Smart Trends Syst. Secur. Sustain. WS4 2020, pp. 625–634, 2020, doi: 10.1109/WorldS450073.2020.9210351
- C. Pathak et al., “Chatbot based Disease Prediction and Treatment Recommendation using AI”. 2021, doi http://dx.doi.org/10.2139/ssrn.3869072
- L. Xu, L. Sanders, K. Li, and J. C. L. Chow, “Chatbot for Health Care and Oncology Applications Using Artificial Intelligence and Machine Learning: Systematic Review,” JMIR Cancer, vol. 7, no. 4, 2021, doi: 10.2196/27850.
- A. Rahmatulloh, A. Ginanjar, I. Darmawan, N. I. Kurniati, and E. Haerani, “Chatbot for Diagnosis of Pregnancy Disorders using Artificial Intelligence Markup Language (AIML),” Int. J. Informatics Vis., vol. 7, no. 1, pp. 77–83, 2023, doi: 10.30630/joiv.7.1.1595.
- A. J. T, D. Yanosma, and K. Anggriani, “Implementasi Metode K-Nearest Neighbor (Knn) Dan Simple Additive Weighting (Saw) Dalam Pengambilan Keputusan Seleksi Penerimaan Anggota Paskibraka,” Pseudocode, vol. 3, no. 2, pp. 98–112, 2017, doi: 10.33369/pseudocode.3.2.98-112.