Implementation of a Gemini Api-Based Chatbot Integrated with Mysql Database for Social Security Service
Article Sidebar
Abstract:
Background of study: The increasing demand for intelligent and responsive digital services in the public sector has encouraged government institutions to integrate artificial intelligence into their service systems. Social security agencies in Indonesia require an innovative solution to deliver faster, more accurate, and accessible information to citizens.
Aims and Scope of Paper: This study aims to design and implement a Gemini API-based chatbot integrated with a MySQL database to enhance social security services through natural and interactive communication. The chatbot was developed during an internship program at the Social Security Office (BPJS Ketenagakerjaan) Medan Kota branch.
Methods: The system was developed using Natural Language Processing (NLP) capabilities of the Gemini API to process user input and retrieve structured data from a MySQL database. An admin dashboard was built with the Laravel framework to manage PDF uploads, perform text extraction, and handle user queries in real time.
Result: Testing showed that the chatbot could effectively respond to general and data-driven queries, extract and analyze uploaded documents, and improve response time compared to traditional service channels. The integration of Gemini API and MySQL ensures scalability, accuracy, and secure data management.
Conclusion: The implementation of a Gemini API-based chatbot integrated with a MySQL database demonstrates how AI-driven conversational systems can modernize public services. It enhances operational efficiency, accessibility, and user satisfaction, supporting the digital transformation of social welfare institutions in Indonesia.
Keywords: Chatbot , Gemini API , MySQL Database, Social Security Services , Natural Language Processing (NLP)
Copyright (c) 2025 Nandito Ananda Ginting, Muhammad Irvi Hafizi Manullang, Yasir Riady, Habieb Pahlevi

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
Ali, A. J. K. N., & Riady, Y. (2025). Edutainment in Ruang Guru Clash of Champion : A Semiotic Perspective. Journal Corner of Education, Linguistics, and Literature, 4(4), 410–421. https://doi.org/10.54012/jcell.v4i4.438
Arisanty, M., Riady, Y., Anastassia, S., & Kharis, A. (2024). Creative Digital Literacy in Reducing War Flaming on Social Media. Communicatus: Journal of Communication Sciences, 8(2), 1–20. https://doi.org/10.15575/cjik.v8i2.
Arisanty, M., Riady, Y., Robiansyah, M. M. A., Maulidia, S., & Pangesti, N. R. (2023). Digital Flaming Phenomenon : The Flaming Reason Behind The " Freedom Of Expression " On Social Media. KOMUNIKA, 6(2), 169–184. https://doi.org/10.24042/komunika.v6i2.19645
Ausat, A. M. A., Azzaakiyyah, H. K., Permana, R. M., Riady, Y., & Suherlan. (2023). The Role of ChatGPT in Enabling MSMEs to Compete in the Digital Age. INNOVATIVE: Journal Of Social Science Research, 3(2), 622–631. https://j-innovative.org/index.php/Innovative/article/view/346
Ausat, A. M. A., Massang, B., Efendi, M., Nofirman, & Riady, Y. (2023). Can Chat GPT Replace the Role of the Teacher in the Classroom : A Fundamental Analysis. Journal on Education, 05(04), 16100–16106. https://doi.org/10.31004/joe.v5i4.2745
Brownlee, J. (2020). Deep Learning for Natural Language Processing. Machine Learning Mastery. Google Book
Habibi, A., Riady, Y., Alqahtani, T. M., Rifki, A., Albelbisi, N. A., Fauzan, M., & Habizar, H. (2022). Online Project-Based Learning for ESP: Determinants of Learning Outcomes during Covid-19. Studies in English Language and Education, 9(3), 985–1001. https://doi.org/10.24815/siele.v9i3.24928
Habibi, Akhmad, Riady, Y., Al-adwan, A. S., & Albelbisi, N. A. (2022). Beliefs and Knowledge for Pre-Service Teachers ’ Technology Integration during Teaching Practice : An Extended Theory of Planned Behavior Beliefs and Knowledge for Pre-Service Teachers ’ Technology Integration during Teaching Practice : An Extended Theory. Computers in the Schools, 0(0), 1–26. https://doi.org/10.1080/07380569.2022.2124752
Habibi, Akhmad, Riady, Y., Alqahtani, T. M., & Muhaimin, M. (2023). Drivers affecting Indonesian pre-service teachers’ intention to use m-learning: Structural equation modeling at three universities. E-Learning and Digital Media, 20(6), 519–538. https://doi.org/10.1177/20427530221118775
Harahap, M. A. K., Muna, A., Ausat, A., Rachman, A., & Riady, Y. (2023). Overview of ChatGPT Technology and its Potential in Improving Tourism Information Services. Jurnal Minfo Polgan, 12(2), 424–431. https://doi.org/10.33395/jmp.v12i2.12416
Hidayatullah, S., & Sembiring, R. (2022). Development of Chatbot-Based Service Using Artificial Intelligence at Government Agency. International Journal of Artificial Intelligence Research, 6(1), 45–52. https://doi.org/10.29099/ijair.v6i1.222
Hutabarat, Z. S., Riady, Y., Amral, S., Sumiharti, S., Susanti, H., Saputra, T., Affrian, R., & Taufan, A. (2023). Teaching Practice Program in College of Education – Creativity, Emotional Intelligence and Locus of Control. Jurnal Kependidikan : Jurnal Hasil Penelitian dan Kajian Kepustakaan di Bidang Pendidikan, Pengajaran, dan Pembelajaran, 9(1), 244–257. https://doi.org/10.33394/jk.v9i1.6416
Ibadurrahman, I., Yusuf, F., & Budianto, H. (2025). Implementasi Chatbot Berbasis Natural Language Processing (NLP) Menggunakan Model Bert Untuk Meningkatkan Pelayanan Klinik Gigi. Rabit Jurnal Teknologi dan Sistem Informasi Univrab, 10(1), 325–334. https://doi.org/10.36341/rabit.v10i2.6061
Khatib, A. J., & Riady, Y. (2023). Navigating Hybrid Language Learning Realities : Students ’ Views on Workload & Time Allocation during Covid-19. REiLA: Journal of Research and Innovation in Language, 5(2), 161–177. https://doi.org/10.31849/reila.v5i2.13538
Muhaimin, M., Habibi, A., Riady, Y., Alqahtani, T. M., & Chaerunisaa, A. Y. (2023). Covid-19 distance and online learning : a systematic literature review in pharmacy education. BMC Medical Education, 23(367), 1–10. https://doi.org/10.1186/s12909-023-04346-6
Putri, K. Y. S., Riady, Y., & Suwito, A. P. (2024). Changing Healthy Living Behavior in the Post-Pandemic Era : New Communication Culture. Jurnal Komunikasi Indonesia, 13(1), 98–107. https://doi.org/10.7454/jkmi.v13i1.1219
Riady, Y., Arisanty, M., & Kuswanti, E. (2025). The Role of Open and Distance Education in Digital Ecosystem Transformation : A Qualitative Study on Enhancing Educational Accessibility. Indonesian Journal of Elearning and Multimedia, 4(2), 81–89. https://doi.org/10.58723/ijoem.v4i2.386
Riady, Y., Habibi, A., Mailizar, M., Alqahtani, T., Riady, H., & Al-Adwan, A. (2025). TAM and IS success model on digital library use, user satisfaction and net benefits: Indonesian open university context. Library Management, 46(6), 173–188. https://doi.org/10.1108/LM-06-2024-0065
Riady, Y., Sofwan, M., Mailizar, M., Mesfer, T., Nurul, L., & Habibi, A. (2023). How can we assess the success of information technologies in digital libraries ? Empirical evidence from Indonesia. International Journal of Information Management Data Insights, 3(2), 100192. https://doi.org/10.1016/j.jjimei.2023.100192
Supriyono, Wibawa, A. P., Suyono, & Kurniawan, F. (2024). A survey of text summarization: Techniques, evaluation and challenges. Natural Language Processing Journal, 7, 100070. https://doi.org/10.1016/j.nlp.2024.100070