Development of a Deployment System Architecture for a Flask-Based Chatbot Using an LSTM NLP Model for Customer Service Question & Answer
DOI:
https://doi.org/10.30871/jaic.v9i3.9305Keywords:
E-commerce, Chatbot, Natural Language Processing (NLP), Deep Learning (DL), Generative Text Processing, Customer ServiceAbstract
In the past two decades, the rapid growth of e-commerce has significantly transformed global business practices. E-commerce has not only revolutionized the retail industry but also positively impacted businesses and consumer experiences. The ease of online shopping enables users to select products at more competitive prices. Amidst these changes, human-computer interactions have increasingly evolved toward natural conversations through Natural Language Processing (NLP). This study aims to develop a chatbot utilizing Long Short-Term Memory (LSTM) technology as a medium for e-commerce customer service. The dataset used for chatbot development is in JSON format and consists of 580 entries spanning 38 categories or classes. Data processing involves several preprocessing stages, including case folding, lemmatization, tokenization, and padding. The model is developed using a bidirectional LSTM and GRU architecture, followed by regularization techniques to enhance performance. Evaluation results show the model achieves 90% training accuracy and 63% validation accuracy with an F1-score of 62%. While there are indications of overfitting, the observed differences are not statistically significant, indicating the model remains capable of providing reliable responses. Additionally, the model is integrated into a Flask-based web application with an interactive interface to facilitate user access. This study demonstrates that LSTM is effective in addressing vanishing gradient problems.
Downloads
References
[1] M. M. Khan, “Development of An e-commerce Sales Chatbot,” in HONET 2020 - IEEE 17th International Conference on Smart Communities: Improving Quality of Life using ICT, IoT and AI, Institute of Electrical and Electronics Engineers Inc., Dec. 2020, pp. 173–176. doi: 10.1109/HONET50430.2020.9322667.
[2] S. Oktriwina, ““NLP: Kecerdasan Buatan yang Bantu Komputer Pahami Bahasa Manusia.,” 2021.
[3] S. Patil, V. M. Mudaliar, P. Kamat, and S. Gite, “LSTM based Ensemble Network to enhance the learning of long-term dependencies in chatbot,” International Journal for Simulation and Multidisciplinary Design Optimization, vol. 11, p. 25, Dec. 2020, doi: 10.1051/smdo/2020019.
[4] P. B. Wintoro, H. Hermawan, M. A. Muda, and Y. Mulyani, “Implementasi Long Short-Term Memory pada Chatbot Informasi Akademik Teknik Informatika Unila,” EXPERT: Jurnal Manajemen Sistem Informasi dan Teknologi, vol. 12, no. 1, p. 68, Jun. 2022, doi: 10.36448/expert.v12i1.2593.
[5] “Implementasi NLP Pada Chatbot Layanan Akademik Dengan Algoritma Bert Implementation Of NLP On Academic Service Chatbot With Bertalgorithm.”
[6] G. A. Santos, G. G. de Andrade, G. R. S. Silva, F. C. M. Duarte, J. P. J. Da Costa, and R. T. de Sousa, “A Conversation-Driven Approach for Chatbot Management,” IEEE Access, vol. 10, pp. 8474–8486, 2022, doi: 10.1109/ACCESS.2022.3143323.
[7] L. Sanny, A. C. Susastra, C. Roberts, and R. Yusramdaleni, “The analysis of customer satisfaction factors which influence chatbot acceptance in Indonesia,” Management Science Letters, pp. 1225–1232, 2020, doi: 10.5267/j.msl.2019.11.036.
[8] P. Rajendra Kumar and E. B. K. Manash, “Deep learning: A branch of machine learning,” in Journal of Physics: Conference Series, Institute of Physics Publishing, Jun. 2019. doi: 10.1088/1742-6596/1228/1/012045.
[9] L. Cuno Klopfenstein, S. Delpriori, and A. Ricci, “Adapting a conversational text generator for online chatbot messaging,” 2019. [Online]. Available: https://www.ibm.com/watson/services/conversation/
[10] M. Fachrul, “E-Commerce : Pengembangan Model Perniagaan Menggunakan Internet.”
[11] G. F. Avisyah, I. J. Putra, and S. S. Hidayat, “Open Artificial Intelligence Analysis using ChatGPT Integrated with Telegram Bot,” Jurnal ELTIKOM, vol. 7, no. 1, pp. 60–66, Jun. 2023, doi: 10.31961/eltikom.v7i1.724.
[12] A. Silvanie and R. Subekti, “Aplikasi Chatbot Untuk Faq Akademik Di Ibi-K57 Dengan LSTM Dan Penyematan Kata,” JIKO (Jurnal Informatika dan Komputer), vol. 5, no. 1, pp. 19–27, Apr. 2022, doi: 10.33387/jiko.v5i1.3703.
[13] H. & V. L. Muhyidin, “Pengembangan Chatbot untuk Meningkatkan Pengetahuan dan Kesadaran Keamanan Siber Menggunakan Long Short-Term Memory. Jurnal Informatika dan Rekayasa Perangkat Lunak. ,” 2023.
[14] H. Wang, S. Chen, and L. Luo, “A diffusion algorithm based on P systems for continuous global optimization,” J Comput Sci, vol. 44, p. 101112, Jul. 2020, doi: 10.1016/j.jocs.2020.101112.
[15] P. Choudhary and S. Chauhan, “An intelligent chatbot design and implementation model using long short-term memory with recurrent neural networks and attention mechanism,” Decision Analytics Journal, vol. 9, p. 100359, Dec. 2023, doi: 10.1016/j.dajour.2023.100359.
[16] R. Luthfiansyah and B. Wasito, “Penerapan Teknik Deep Learning (Long Short Term Memory) dan Pendekatan Klasik (Regresi Linier) dalam Prediksi Pergerakan Saham BRI,” Jurnal Informatika dan Bisnis, vol. 12, no. 2, pp. 42–54, Dec. 2023, doi: 10.46806/jib.v12i2.1059.
[17] M. N. A. Putera Khano, D. R. S. Saputro, S. Sutanto, and A. Wibowo, “Sentiment Analysis With Long-Short Term Memory (Lstm) And Gated Recurrent Unit (Gru) Algorithms,” BAREKENG: Jurnal Ilmu Matematika dan Terapan, vol. 17, no. 4, pp. 2235–2242, Dec. 2023, doi: 10.30598/barekengvol17iss4pp2235-2242.
[18] R. I. Borman and Y. Purwanto, “Impelementasi Multimedia Development Life Cycle pada Pengembangan Game Edukasi Pengenalan Bahaya Sampah pada Anak,” Jurnal Edukasi dan Penelitian Informatika (JEPIN), vol. 5, no. 2, p. 119, Aug. 2019, doi: 10.26418/jp.v5i2.25997.
[19] G. Yanto, S. Puspita, and Z. Efendy, “Inovasi E-Commerce Berbasis Chatbot AI Pada Deta Rancak dan Tingkuluak Kreasi Sanggar Seni Permata Hati,” JISTech (Journal of Islamic Science and Technology) JISTech, vol. 9, no. 2, pp. 233–239, doi: 10.30829/jistech.v9i2.22768.
[20] P. Sihite, A. Simorangkir, N. N. K. Sari, and V. Handrianus Pranatawijaya, “Integrasi Chatbot Custom Chatgpt Dengan Chatbase Dalam Meningkatkan Pengalaman Pengguna Dan Efisiensi Layanan Dalam Website E-Commerce,” JATI (Jurnal Mahasiswa Teknik Informatika), vol. 8, no. 3, pp. 3532–3536, May 2024, doi: 10.36040/jati.v8i3.9733.
[21] A. P. J. Dwitama and S. Hidayat, “Identifikasi Ujaran Kebencian Multilabel Pada Teks Twitter Berbahasa Indonesia Menggunakan Convolution Neural Network,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 3, no. 2, p. 117, Dec. 2021, doi: 10.30865/json.v3i2.3610.
[22] I. D. Raharjo and Egia Rosi Subhiyakto, “Implementing Long Short Term Memory (LSTM) in Chatbots for Multi Usaha Raya,” Advance Sustainable Science Engineering and Technology, vol. 6, no. 4, p. 02404018, Oct. 2024, doi: 10.26877/asset.v6i4.934.
[23] Khalis Sofi, Aswan Supriyadi Sunge, Sasmitoh Rahmad Riady, and Antika Zahrotul Kamalia, “Perbandingan Algoritma Linear Regression, LSTM, Dan GRU Dalam Memprediksi Harga Saham Dengan Model Time Series,” Seminastika, vol. 3, no. 1, pp. 39–46, Nov. 2021, doi: 10.47002/seminastika.v3i1.275.
[24] Z. Yang, Z. Dai, Y. Yang, J. Carbonell, R. Salakhutdinov, and Q. V Le, “XLNet: Generalized Autoregressive Pretraining for Language Understanding.” [Online]. Available: https://github.com/zihangdai/xlnet
[25] L. Anindyati, “Analisis dan Perancangan Aplikasi Chatbot Menggunakan Framework Rasa dan Sistem Informasi Pemeliharaan Aplikasi (Studi Kasus: Chatbot Penerimaan Mahasiswa Baru Politeknik Astra),” Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 10, no. 2, pp. 291–300, Apr. 2023, doi: 10.25126/jtiik.20231026409.
[26] X. Tan et al., “Biogeography of intestinal mucus-associated microbiome: Depletion of genus Pseudomonas is associated with depressive-like behaviors in female cynomolgus macaques,” J Adv Res, May 2024, doi: 10.1016/j.jare.2024.05.013.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 David Ramantya Mukti, Abu Salam

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).