AI-assisted pedagogical chatbot

The traditional classroom setting features a single educator, who is tasked with educating multiple students. This paradigm is fundamentally flawed, when , considering that the number of students requiring constant attention and educational monitoring throughout their studies is quite high, when compared with the number of available educators equipped to assist them.

Taking the above premise as point of departure, this study focused specifically on the teaching of mathematics, which is especially challenging in this regard. This is primarily due to the nature of mathematics, which require the assimilation of a concept in order to grasp the next topic. Therefore, if a student were to fall short of understanding one concept, this would negatively affect the student’s ability to solve problems relating to the ensuing topic.

This project aims to help solve this issue by enabling educators to automatically generate chatbots that their students can use. The chatbot was created by obtaining basic maths lessons from the educator and then generating a chatbot that is capable of providing the required explanation when asked. Chatbot systems generally work by detecting what the user wants to, based on their input (often referred to as ‘user intent’ in modern systems) and then outputting the correct response. Since chatbots require a template of what the user might say in a conversation, possible questions were extracted from the explanations provided, through a dedicated question extraction component. Meanwhile, the list of outputs that the chatbot offered in response to the user’s request was populated by not only the given explanations but also by explanations that would have been generated by the system.

The explanations generated by the system were produced through a dedicated subcomponent capable of fine-tuning a generative model to create explanations that would be close to the explanations originally provided by the educator. Despite generative models generally creating high-quality text when properly trained and duly fine-tuned, there was an element of unpredictability, where the output might not necessarily be of suitable quality. Hence, a multinomial naive Bayes classifier was developed to filter out any low-quality explanations that would have been produced by the generative model. Once the explanations were generated, a numerical substitution system was deployed to generate a variety of explanations with different numbers, while successfully maintaining the relationship between the numbers in a given explanation.

Once the possible questions and the explanations were generated, the data was then written into a chatbot domain file. It was then used to train, and subsequently deploy, a chatbot that could be used by the student. This resulted in a chatbot that would provide the student with the required explanation, worded in a style similar to that of the student’s educator.

Figure 1. Example of student-chatbot interaction
Student: Andrew Emanuel Attard
Course: B.Sc. IT (Hons.) Artificial Intelligence
Supervisor: Prof. Alexiei Dingli