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.
Copyrights © 2025