 Hello, everyone. Good morning. I'm Farhan Karamali. And today we will be seeing a presentation on a chatbot in Moodle. I have divided the presentation into three parts. First, to establish the need for a chatbot, then how we implemented it. And next, we'll see the roadmap or the future for it. So chatbots have become a trend almost everywhere that you go on apps on mobile websites, irrespective of the industry that it is, real estate, automobile, name the industry and there is a chatbot associated with it. So it's high time that EdTech also catches up and there's a chatbot with it. So I'm from a university, Islamic Online University. And for those of you who are associated with universities know that we are constantly bombarded with students being frustrated with their questions. When are the exams? When will the results be declared? Or there could be some personalized questions like how did I do in my exams? What are my scores? And stuff like that. So because of that, we sought there is a need for chatbots, especially to automate the mundane task of answering repeated questions, which we call FAQs. And as Moodle is one of the aims and objectives for Moodle is to facilitate computer aided learning and teaching. So it's definitely chatbot can help with that. So the role of the chatbot that we are looking at is one as the most interesting one, which is to be as an academic counselor, wherein it is not just answering static questions, static questions. It is in fact using the analytics within Moodle, the data within Moodle, and it recommends new courses. It recommends what the students should be studying on, which areas is he weak in, and he can answer that. Then there's a basic use of the help desk as a personal assistant. So you can probably ask the chatbot to set up reminders for you to study so and so, and then there's an alarm or something like that. Also as a friend and a peer, which I feel is something lacking in the online universities, because I personally being a student in many of the online institutes, I feel a disconnect between when we study in a physical university, we've got friends whom we can stay in touch with, though there is a replication of that in terms of forums and chats, but yet it is not as close as we can get with a friend on chat when we are messaging on WhatsApp, you know, when are the exams or something like that. So the bot can fill in, try to fill in that gap. These are some chatbot concepts. I'm sure we've all gone through the chatbot and we know what a chatbot is. So we skip that, but that's what I got from Wikipedia. Some of the other concepts that we wanted to get you familiarized with is machine learning. So the chatbot will has data, okay, and this is not just related to chatbot, but machine learning in general is that you have the data and the system can learn and evolve on its own from that data. Then there's artificial intelligence. When there is something like a system that does something that normally requires human intelligence. So in our case, it will be predicting the next course, recommending the next module that you have to study, et cetera. And the process of transforming the user text or the user speech into actionable data is called natural language understanding, NLU. So there are multiple platforms. As I said, chatbot has become a major trend now. So there are multiple platforms where you can, which make it easy for you to build your chatbot. These are some of the services, Dialogflow, which was previously known as api.ai, and then there are many open source platforms which you can install locally on your system and get it started. In our case, in our university, we used Dialogflow. It was bought by Google, and yeah, it provides what all we need. So that's what we used to make this. So the features that we've, as I said, this is a very early prototype, and I had to just get something together before the moot. So right now it's in a prototype stage, but it can handle FAQs. So common questions like how do exams take place when dates and stuff. The static information, it can handle that. And the beauty of this is that there is no involvement from the IT required constantly. The administrators, the teachers, they are empowered. They've got a different console. They can just go there and increase the question bank. They can increase the answer, the sponsors, et cetera. So once the chatbot is set up, then you do not need it, the IT person. User data. So this is the interesting part where the dynamic data gets. So it fetches the data with webhooks, and we'll see some of that. Students can ask relevant questions like which courses am I enrolled in? What are my grades? So these are all related to the student himself. So we've got a short demo there. We'll get the video played from there. So what do we expect in the demo is the bot to answer some of these questions? Like show me my courses, show me my grades. What should I study? Now that's the most interesting part where it will dynamically use the analytics and the data in Moodle, and we'll let you know what you should study. So upcoming events, deadlines, how many courses have I completed, and then any other FAQs that it can build. Let's just wait for the demo. Hello, everyone. This is a demonstration of the chatbot within Moodle. So as you can see that the bot has been deployed to a page in the Moodle. Okay, and you can see that I've logged in to the Moodle site, and this is how it will look on a mobile screen. And I can start chatting with the bot over here. So I say hi, and then the bot will respond. Hey, each time it will vary its response. So there is some, you know, it doesn't get very boring, you know, with standard replies. So I first it said, hey, then it said good day. And I can say how are you and it will give a response. So the bot can already do such kind of small talk like I am bored, and we'll say something to if you have a piano plate with mittens on. Okay, it keeps saying random things over here. So this is what dialogue flow can handle out of the box. There's just once switch that you have to enable. And the bot will be capable enough to do such kind of small talk. Now coming to the actual working of the bot. So as I said, there were two major aspects of the bot. One is how it can answer FAQ type questions frequently asked questions. So I can ask it something that I've trained, like how do I enroll in courses? And it will give me an answer. Okay, I can also ask it something like how how, how do I give exams? Now, I have taught it that when someone asked, how do I give exams, you should be answering this. Okay, but what I've not taught is if someone asked how are exams conducted? So I've not taught it the answer. But it is smart enough to match. Okay, and because I taught it how are exams conducted? How do I give exams? So it knows that if someone also asked how our exams conducted, they are seeking the same information. So it can answer that smartly. Okay, so this much more friendly or intuitive for the user then browsing through a list of FAQs, which can get very confusing. The user can get lost in that. So that was the first aspect of the bot. This is still just static content. Okay, now for the dynamic content, where it's reading data from moodle, okay, depending on the user that is logged in, you can ask questions like what are my or show me my courses, okay, show me my courses, and you can make feel free to make spelling mistakes and everything it can just understand it as a natural language understanding. Okay, so yeah, it replied. Okay, and it's given me my courses in which I'm enrolled, this particular student is enrolled in. Okay, and yeah, so I can just click on this and I can go to the course. Yeah, and I can also ask show me my grades and it will give me the grades of these courses. So yeah, that's information at your fingertips. You just ask it question. You do not even have to click somewhere and do something. Okay, something that I enjoyed developing a lot was what should I which course should I study? So which course should I study? Now depending on your upcoming events, depending on your percentage and the exams that are coming. So all of these three, the bot has through an algorithm has suggested that I should study programming fundamentals. Okay, not because my programming is weak, but because of my marks being less and the exams nearing, okay, you can ask it what are my deadlines, etc. Also, you can ask it show me my next audio. Okay, and it will show you the next audio that you're supposed to listen to. You can also ask it show me my next quiz, and it will give you the link of the quiz. So directly, the you can hide all of your interfaces. You can just start and if your audio or videos are embedded, you you're using some like, you know, Vimeo or YouTube or something. These are just htm what you can send back is html code. So you can basically send back any kind of information. So yeah, this was a brief demonstration of the board. It's we are gradually building it and adding more functionality. Thank you very much. So that was the demo and we saw the questions that it can answer. Now, as I said, moodle is in itself very rich with the data that it has. And it's got a lot of data about the student. And these are some of the tables that we use. So events, quiz attempts, grades, course last access logs, roles, assignments, context. So these are where it gets all the analytics, all the information for it to predict whatever it whatever the user asks. So very briefly, I wanted to just explain on how it was done. So there are something in dialogue flow. There are something called as intent. So whatever the user sends to dialogue flow, whatever the user checks is mapped to an intent. So what is the user intending to do? Okay. And then according to that, there's an associated action with it. There are something known as entity. So entity is what elements. So in our case, it was audio, video quiz, and these different types of plugins that we use within the moodle course, they are mapped as entities. Then we've got webhooks, which dialogue flow will call on and we'll get the information from our database from our moodle in our case. And then the response and the context in which the question was asked. So we've got this diagram also where the user will ask the bot and then the bot goes to the api.ai platform or dialogue flow. And then that in turn will go to the fulfillment service, which is moodle, the webhook, and then the response is sent back. So these are some of the intents that I made. So show me my grades, what are my courses, what does the enrollment process entail, where do I give my exams and stuff. So whatever you've got your questions, you can write them as intents. And this is the detailed screen. I'm not sure. It's quite visible. So the user says, so the user, you can give a couple of options that the user can say show me my grades, he can show what courses am I enrolled in. So you can give it a couple of options. And then because of NLU, natural language understanding, it can understand if the user type something similar to what it is trying to say. What we need here is the action. So each intent we map to an action and that will be used in our webhook. And then we say that in the fulfillment, we use the webhook. So the webhook is just basically, you just have to give a URL, it can be any URL there. And this is the kind of request that is sent to the webhook. We want the query. So this is, sorry, this is the request that is sent to api.ai. And after that, we'll get a response from api.ai. Now this response is quite big, but it's got the action. And it's got some parameters. So because of that, and then the session id, or you can pass your custom parameters over there. So what I've done is passed the user id and the seskey and then used that data. These are some of the tables, again, that we've used. So that's how we very briefly have implemented the bot. We've also, this is the road map for the future. We want to integrate the chatbot as a Moodle plugin. Right now it's just a page in Moodle and implementing more features. We want to make it available on common platforms, like Google Assistant, Alexa, Facebook. And with Dialogflow, that's very easy. That's just a click of a button, and you can deploy it on Telegram, Alexa, Facebook, et cetera. Read and use data from Moodle Project Inspire. 3.4 in Project Inspire, which has got a lot of analytics, has been integrated, and we intend to use that. Help pull out data for teachers as well, so the teachers can ask which students are at the risk of dropping out, and the chatbot will tell that or whatever like that. Chat with the user proactively. So now the user has to invoke the bot, but what if the bot can also invoke the user and say, hey, you've got an upcoming assignment. Better start studying something like that. We've got a couple of implementation options, and this is just on top of my mind. So it could be included as a part of the theme in the footer, and then as normal websites have it, it just pops out. As a block on the side of all pages. As an activity module, like a quiz. So one use case of the bot can also be where people in the sales industry or somewhere where you want to check with the student or the user. How does he interact with people? So then you can let him interact with the bot, and then evaluate or assess him on the basis of his skills. Or as a mobile app, as a standalone mobile app, or as a messaging plug-in, output plug-in. So there are a couple of options that we could go ahead with, and since this is just a prototype right now, so, yeah. Some other bots that are already there in Moodle. So there's a Moodle bot on Telegram. There's a Tracker CI bot. So Moodle has always been into bot. Martin had mentioned in one of the keynotes about Alexa and Google Moodle Cloud, so where you can ask how many users are there in my Moodle Cloud. Then there was one Moodle sidebot presented in Australia also in the Australia Moodle Moodle. Yeah, so that's the end of the presentation. Thank you very much. Is there any questions? So depending on the person whom you're logged in, so I've got your, since the bot is on the Moodle page, so I can check all your privileges. I can check all your data, session data on Moodle. And based on that, I can then forward the information. Yeah. So the user knows, the chatbot basically knows, and because of the webhook also, the chatbot knows what role you are and what information you've got. Okay. It's a very interesting feature. Yeah, thanks. Yeah. Just wanted to check if there is any relation between, let's say, my concerns for security of data versus chatbot. Yeah. So I'm still working on that. So right now it's, it uses some parameters and it's still in the beta state. So we have to build on that. Yeah. Hi. Fantastic stuff. Thank you. I was just asking, can the bot ask you questions back? Yeah. So that's one of the roadmap features where the bot will proactively do that. But as a, as a part of the response, it can definitely ask questions back right now. So, so you have to specify how, how does it work? Yeah. So in the response, you can mention if the chatbot also has to give a question back as a part of the response. Right. Yeah. Thank you. Thank you very much.