Internship report: Education Recommender Bot

As part of the internship for his 3rd year Applied Computer Science (Specialization A.I.), Brecht Noyens (Thomas More Hogeschool Geel) developed a chatbot that can help future-students select the most appropriate field of study, most in line with their interests. Read all about the process, development and his experience at Arinti in the following blogpost.

The kick-off

My internship started on the 1/03/2021 with a kick-off meeting with the Managing Partners and the team. I had a briefing about how the internship would be like with them in Corona and about some of the technologies I would be using. I also received some usefull links and documentation I could use for developing the project. We discussed in depth some of the most critical parts like the bot framework composer, Bot framework SDK and Microsoft QnA maker. I received my credentials for the Azure I would start working in and we planned a weekly meeting to discuss each weeks process. The structure was in place for me to start my internship.

Getting started with bot framework composer

After the first meeting I dug into the documentation and Youtube tutorials I received from Sammy. I learned about some of the main principles for developing a chatbot and started experimenting with the bot framework composer. The result was a very simple bot I created from a tutorial which I managed to publish on Azure. I didn’t have any prior experience with the bot framework composer, I was used to a more ‘classic’ style of coding and found the bot framework composer a bit weird to code with.

Since I had some difficulty’s working with the bot framework composer I asked one of Arinti’s chatbot developers for help. He then explained the working of some of their own bots and in the samples that were on the Github repo. Now I had a better idea of how my bot could be programmed.

Collecting data for the recommender

The ultimate goal for the chatbot was to feed information to a recommender system. This meant my first step was to start programming the questions the bot should ask. But to do so, I needed some data to ask questions about. In the kick-off meeting Wouter advised me to look at onderwijskiezer.be. This is a website from the CLB (the Flemish centre for student counselling) where almost all (if not all) Belgium fields of study are listed. I copied all the different fields and saved them in an excel file, that would eventually become the source for my recommendations.

Project scope

This project scope contained several must haves. I had to create a dataset with the different fields of study / educations, a chatbot interface in visual studio that is published on azure, and finally a recommendation system that will recommend an education based on the input given to the chatbot.

We also defined some possible extensions to work on, if and once I was finished with the mandatory requirements for the project scope. More on that later!

I had a good view on how to develop the chatbot and I started thinking of the recommendation system afterwards. It quickly came to mind that my chatbot would be needing an Api to integrate the recommendation system in it.

The chat bot & recommendation system development

With my research done, data and questions defined I began coding the questions into my chatbot. When I finished coding this, my interface was finished. At this point, you could interact with the bot, but it had only little validation on your input and only gave a summary of your answers to the questions asked to determine your ideal field of study. With this being done I could start again with the recommendation system, since I now had a way of feeding it input. To start with that I had a meeting with someone of the data science team of Arinti. He suggested me to change my data and apply some scores to aspects of it. The subjects of the chat bot are these aspects, for example science, politics, mathematics, statistics… so each education (field of study) has scores on these aspects. The higher the association between the education and the subject, the higher the score. After this was done I changed the code and flows of my chat bot again.

After these adjustments, a summary of the answers was no longer the only reply to the user at the end of the conversation but everything was also exported to an excel file. With this excel file (that contained my data with scores) and test data I started programming in Python on a Jupyter notebook to get the result I wanted for the recommender. Later I published a Python Azure function that would run the Python script and could be called as an Api. Since this didn’t work anymore with the excel files, I created a database on azure to store and retrieve data from. Now the basic version of my bot was finished and I could start looking at the extensions.

Extensions

Since some people in Belgium speak foreign languages the chatbot must have the ability to communicate in English. Therefore I made the bot speak both English and Dutch. What also was a great addition to my chatbot was the implementation of a QnA service. I first planned to create a separate bot that you could pose questions and it would answer to you based on the knowledge base I created (questions and answers). It was very easy to do so, you could just create the questions and answers and train it without implementing an NLP model yourself. I created both a Dutch and an English version of the QnA bot. Before I began on coding the second bot however, we decided it would be better for the user experience to implement the QnA bot with the “study-selecter” chatbot so you would just need 1 interface to chat with. To do so I added more validation on the input the bot receives of the user, and when the input doesn’t match with the input expected by the bot, the bot sends an Api call to the QnA service which responds with an answer and reprompts the question.

Lastly, I also extended the chatbot with a voice implementation. I created a speech service on azure to handle speech to text. To implement this voice extension Sammy had given me some links to projects he had created before to help me out. For the implementation I had to create 2 more Api’s to retrieve the direct line and speech tokens I needed for the embedding of the chat bot. I then changed all of my javascript code for the embedding and made a simple website with bootstrap to have a homepage for the bot.

Conclusion

In general I can say that my internship with Arinti was very fun and educational. I learned a lot about the Microsoft bot framework, recommender engines and the possibilities of Azure AI.

Chatbots are very useful applications which provide a more fun and interesting way of digital interaction. Instead of looking through a website’s pages for the information you want you can just pose a simple question to a bot. And instead of filling in an entire form to get a recommendation you can just have a conversation with a chatbot that feels more personal. With modern chatbots like my study-choice-bot, you can even use adaptive questions and dialogs, so you don’t need to bother your user with irrelevant questions. For example, if someone indicates he’s not interested in computer science, we don’t continue asking detailed questions about topics linked to that field of study. Integrate this with a solid recommender engine, and we have a very powerful and user-friendly tool that can help future students pick the best matching field of study for them!

I’m glad I chose this internship and want to thank Arinti for giving me the opportunity to work with their team.

Brecht Noyens, Thomas More Geel

Blog

Stay tuned.