Implementation Of A Web-Based Chatbot Using Machine Learning For Question And Answer Services In Universities

. Advances in communication technology in line with information technology, Chatbot is an innovation that combines communication technology and information technology, is an application that can communicate with humans like a virtual assistant who can respond and answer every question asked. A university must already have a website that can be accessed by the general public so that information about the college can be accessed by everyone anywhere and anytime. To make it easier to get information on the website, chatbots can be the solution because most prospective students and students who are on the campus feel reluctant to browse further into the website that has been provided and usually only open the main homepage page of the website. Parents of students also find it difficult to find out what is on campus if a lot of information is provided in certain tabs of the website. In this study, I utilized Chatbot technology which is a Machine Learning that can process every text that inputted then analyze it and conduct machine training using the Neural Network algorithms that have been provided. This research uses a case study methodology, with Yogyakarta University of Technology as the subject, to develop a chatbot website that incorporates machine learning to facilitate the processing of user input questions.


Introduction
Educational institutions have an important role in the development of the nation's children, especially in terms of science and personality, especially in a lecture institution which requires students (students) to be active, creative, and have critical thinking.A university must already have a website that can be accessed by the public so that information about the university can be accessed by everyone anywhere and anytime.To support these things, the institution also needs to have an adequate system in terms of services, especially the availability of information services that can be accessed easily anytime anywhere such as Chatbot.Chatbot is a simple system to facilitate conversations by using "pattern matching rules" to have conversations with users, but chatbots have limited language understanding capabilities [1].In its application, chatbots can be built independently or use chat applications that provide services to 0240106-02 develop chatbots [2].Chatbot in conducting conversations (understanding and answering chat) requires certain methods commonly referred to as applying natural language processing methods.
For several journal reviews related to the creation of chatbots which are the basis for this research, there is a research study by Agung [3].This research uses the AutoResponder Application for WhatsApp and WhatAuto -Reply App to create its chatbot and uses Google Sheets for its database so that the chatbot can only be used for the WhatsApp application.The next research is by Teddy Wijaya [4] .The research discusses creating a Chatbot on a web platform using the PHP programming language and using the MySQL database to create it, in the database there are several keywords and bot replays that the system uses to automatically reply to chats to users.The next research is by Ahmad Cucus [5].This research uses NLP (Natural Language Processing) for text processing and also uses a database to store data, the implementation of the program is carried out on the Android Platform.From several journals mentioned, chatbots that are made vary in type, some of which use the WhatsApp platform, Website, and Android, the features provided are also different, such as those using WhatsApp can only be used by users who are only registered in the WhatsApp application and only provide a choice of questions that have been provided, they cannot type their imputed questions.
This research implements the Python programming language is used by novice programmers as well as by highly skilled professional developers.It is being used in academia, at web companies, in large corporations, and in financial institutions [6].The Chatbot that will be created has several features such as machine learning to process the questions that have been given and the user does not need to register to be able to access the chatbot created because the chatbot will be on the UTY website that is already operating which can be accessed by everyone.There are many methodologies related to the generation of chatbots ranging from simple pattern matching to complex neural networks and other heuristic solutions [7], And Machine learning can substantially reduce the computational costs and shorten the development cycle [8].Based on these problems, the authors are interested in taking the title "Implementation of Web-Based Chatbot Using Machine Learning for Question and Answer Services in Higher Education".The application of this Chatbot system uses Yogyakarta University of Technology for a case study [9] which is expected to be able to overcome the problems that occur by utilizing machine learning that has been made.

Methods
The methodology of this research is shown in Figure 1, which describes the flow of the research.It starts with the identification of Problem, Data Collection, Designing System, Implementation System, Testing System, and conclusion.

Identification of Problem
The analysis of the system that runs at the University of Technology Yogyakarta can be seen in Figure 2. From Figure 2 it can be concluded that when students or parents of students have questions about anything related to UTY there are 2 ways.The first way is that parents or students can enter the UTY SIA web and search through all the tabs to get the information they want.The second way is to contact the UTY admin and ask questions about the desired information but have to wait for the admin to answer first to get the information.The analysis of the proposed system in the study can be seen in Figure 3 which can be concluded when parents or students want to find out the desired information about UTY, they only need to enter the UTY website after that ask questions with the chatbot that has been provided in real-time and get answers to the questions asked so that parents or students do not need to search thoroughly on the UTY website or wait for the admin to answer the question.This research also has problem limitations that include the following:

0240106-03
1. Making this Chatbot uses data available on the UTY website [10] page and the UTY PMB website [11] provided by the University of Technology Yogyakarta. 2. The data that has been obtained is entered into a JSON format file.3. System design is done using the Python programming language.4. Using the Neural Network Algorithm to process incoming conversations and send answers that match the User's questions.

Data Collection
This stage involves collecting the data needed to create a Chatbot for prospective new students, parents or guardians, and students of Yogyakarta University of Technology.At this stage, problems related to the registration of prospective new students are sought and solutions are formulated to overcome them.This research collected data directly through interviews with students to obtain data relevant to the purpose of this research.In addition, we also developed a questionnaire that will be distributed to each respondent to record their responses, which will be the main source of data in this study.
The data used in this study was also sourced from the official website of Yogyakarta University of Technology, which can be accessed through the URLs UTY website [10] and UTY registration website [11].The accuracy of this data was also ensured by consulting with staff and lecturers working at the Yogyakarta Technological University.The data collection process is carried out on an ongoing basis starting from November 2022 to June 2023.Data was collected by accessing and recording information from the websites into a Word document.The data was then used to formulate questions and corresponding answers.Furthermore, this question-and-answer data is compiled in JSON format [12].The detailed design stage is used to determine the system to be built including making use case diagrams, activity diagrams, and flowcharts.Figure 4 shows the use case diagram [13] of this system.Activity Diagram [14] describes the workflow or activity of a system business process or menu in the software.Figure 5 shows the machine learning activity diagram implemented on the website.The system flowchart [15] is built to be able to provide a complete picture of the existing data requirements.The flowchart of how machine learning is implemented on the website is shown in Figure 6.

.4 Implementation Phase
The development of this website [16] adopts Python programming language for machine learning with neural network algorithm [17] and combines HTML [18], CSS, and JavaScript [19] to connect machine learning with the website being created.It also uses several libraries available in Python, such as Sastrawi [20], Flask [21], NumPy, etc.The detailed implementation of Chatbot can be divided into several stages, namely the preprocessing stage, the transformation of existing data into data.JSON, the data training stage, the "bag of words" model building stage, and the final stage of full connection.

Text preprocessing
The stage of text preprocessing [22] is the stage where the system selects the data that is processed in
2. Transformation of existing data into data.JSON Data transformation into data.JSON is needed for the system to be able to read each question pattern that appears along with the target answer.The way to transform data into data.JSON is by separating each word in the data into several parts, namely: a. Tags (category) is a knowledge or category that becomes a reference for the system in determining the response.b.A Pattern is a series of letters that are expected to match or match one or even more with user input.c.Responses (output) are the results of answers that will be issued based on index tags and patterns determined by the system.

Data training stage
After the data is collected, the system tests the data to get a good and satisfactory level of output accuracy.The data training [23] steps are as follows: a. Transform the pattern form in the data.JSON into matrix form [24]. b.Flattering or inserting each row of the matrix into the input layer nodes will signal to the hidden layer.c.Assessing the output after completing the calculation from the input layer to the hidden layer which will be given each weight by the system.

"bag of words" model building stage
At this stage, the bag of words value is transformed by transforming the input text from the user into a binary number [25].

Full connection
After getting a binary value from the input text, the binary value is entered into the input layer which will signal the hidden layer of the neural network architecture.

Testing phase
The performance measurement of the Chatbot application made in this study is based on the results of the confusion matrix by calculating the accuracy, precision, and recall levels.

Accuracy
Accuracy [26] is the ratio of correct predictions (positive and negative) to the overall data.Calculation of accuracy using Equation.

Precision
Precision [27] is the ratio of positive correct predictions compared to the overall results that are predicted to be positive.Calculation of precision using Equation.

Recall
Recall [27] is the ratio of true positive predictions compared to the overall true positive data.Recall is calculated using Equation .

Results
The results of the implementation of the design of the Chatbot website for questions and answers about the Yogyakarta University of Technology are the main page for conducting these question-and-0240106-06 answer activities.By using machine learning to answer questions inputted by users, the answers given will be given automatically and output that matches the question if the question is in the existing system, otherwise the default answer will be provided.The chat page has an initial appearance that can be seen in Figure 7 it shows if the chatbot button is clicked it will display a conversation window that will be used to conduct questions and answers.

Figure 7 Chatbot Window
In the text preprocessing stage, the first step is to perform case folding.In this research, case folding is used to convert letters in the document into lowercase letters.The next step is tokenizing, which is the process of separating the input string based on the words that make it up.An example of the tokenizing result can be seen in Figure 8.
The next stage in text preprocessing is filtering.At this stage, a stop list is used to remove less important words or a wordlist to keep relevant words.An example of filtering can be seen in Figure 9. Stemming is another important stage needed to reduce the number of different indices in a document, as well as to group words that have similar roots and meanings, despite having different forms.Figure 10 shows an example of the stemming result.After data collection is complete, the system performs data testing to achieve an optimal and satisfactory level of output accuracy.Table 1 is an example of the training data used in this study.1 is an example of data in JSON format that will be used in the data training process.This data training is done so that the machine can recognize patterns or patterns of user input text, which will later be used to help answer questions from users in the Chatbot system.The steps in data training are as follows: 1. Converting data patterns in JSON format into matrix form, as shown in Figure 11.
2. Perform flattening or take each row of the matrix and put it into the input layer which will send signals to the hidden layer.An example of the flattening result can be seen in Figure 12.
3. The output value of the training data can be seen in Figure 14.The values in the hidden layer cannot be entered directly by the user as they are automatically determined by the system and used as the accuracy level based on existing patterns.The next step is the transformation of the "bag of words" value.An example of the results of the "bag of words" value transformation can be seen in Figure 14.After obtaining the binary value of the input text, the next stage is the fully connected stage, where this binary value is input into the input layer which will then send signals to the hidden layer in the neural network architecture as seen in Figure 15.The output value is determined by the system after performing calculations from the input layer to the hidden layer so that the Chatbot system can determine the right answer.After getting the output values of the various patterns, the next step is to take the highest value to respond to the question, as shown in Figure 16.

Testing
The test will perform a series of inputting questions that follow different patterns, writing with typos, and asking questions that do not have available data.The purpose of this test is to examine the chatbot's capabilities in the face of diverse input variations.This test aims to evaluate the extent to which the chatbot can provide relevant and useful responses to the user, regardless of constraints such as typos and questions without available data.From Figure 18, the chatbot can provide answers that match the question about campus address 1, even though there are several different question patterns.This shows that the chatbot has the flexibility to understand variations of questions related to campus address 1, so that users can receive relevant answers to the questions asked.From Figure 19, it can be concluded that even though there are several words with typos, the chatbot is still able to provide answers to user expectations.This shows that the chatbot can recognize and understand the intent of the message received, even when there are writing errors.From Figure 20, when there is a question, whose pattern does not exist in the data prepared, the chatbot will answer I don't understand.Meanwhile, if the question deviates but there is a slight allusion to the pattern chatbot gives a random or inappropriate answer.From the tests that ware carried out with the patterns described above, this study conducted 50 trials to calculate the accuracy, precision, and recall of the chatbot that has been made.After conducting the test, the results can be seen in Table 2.

Table 2 Confusion matrix value
Performance measurement based on confusion matrix results in Table 2 by calculating the level of accuracy, precision, and recall as follows: Based on the results of the chatbot performance calculation, it has an accuracy of 88%, precision of 95%, and recall of 91%.This test will perform a series of inputting questions that follow different patterns, writing with typos, and asking questions that do not have available data.The purpose of this test is to examine the chatbot's capabilities in dealing with a wide variety of inputs.This test aims to evaluate the extent to which the chatbot can provide relevant and useful responses to the user, regardless of constraints such as typos and questions without available data.

Conclusions
Based on the results of testing the system that has been implemented in the research on Web-Based Chatbot with Machine Learning Utilization for Question-and-Answer Services in Higher Education, the author concludes several important points.
First, the developed system can effectively overcome the problems faced, where this system successfully responds to chats from users automatically.In other words, Chatbot can provide satisfactory responses to users.Secondly, the system has also proven to be able to provide correct and accurate answers when faced with questions that match the patterns that have been documented in the data, without experiencing errors.This shows the system's ability to understand and respond appropriately to user questions.In addition, the of this study also indicate great potential in the development of machine learning based Chatbot to improve question and answer services in higher education, especially at Yogyakarta University of Technology.
As a student and lecturer, the author has great hopes for the future, which is that the implementation of the Chatbot website that has been developed can be officially integrated into the website of Universitas Technology Yogyakarta (UTY).The authors believes that this will bring many significant benefits, especially for new students and parents, to provide easier and faster access to the various information available on the UTY website.
With this Chatbot, it is hoped that prospective students and parents will feel more comfortable and efficient in finding the information they need, and this will enhance their experience in undergoing education at UTY.

Figure 2
Figure 2 Current System Figure 3 Proposed System

Figure 5
Figure 4 Use Case Diagram.Figure 5 Activity Diagram

Figure 11
Figure 11 Converting data into a matrix Figure 12 Filtering result

Figure 14
Figure 14 Transformation result of "Bag of Words" value.

Figure 15
Figure 15 Full connected phase Figure 16 Example of response determination