Reduction, Recursion and Maurice – the 3EX Bot
I have been an avid user and happy customer of a particular cinema chain for many years. Never needing to use their customer service team before, until recently, when I had a relatively straight forward question that I wanted an answer for. No stranger to searching websites for information, I had a good look on the cinema website and then generally around the internet, sadly there was no sign of any information. I emailed their customer service team and the reply was at best frustrating.
It was clearly a template reply, containing answers for various questions I did not ask, a link to the cinema website so I could search for any questions that the email did not cover, and signing off by informing me to not reply to the email. What a load of garbage, I thought I could build something that would do a better job than that!
Not really wanting to write an Artificial Intelligence bot for a cinema, I started thinking how I could build one for 3ex. I had done a couple of modules on AI at university and started Googling to jog my memory. I didn’t want to build my bot using Java, so a lot of the university work went out the window, but I did remember some of the concepts that were carried over into Artificial Intelligence Mark-up Language (AIML).
AIML, or Artificial Intelligence Markup Language, is an XML dialect for creating natural language software agents.
After a handful of hours I had a basic bot, called 3ex Bot, that would say Hi if you said Hi, and had an answer if you typed ‘What is related data?’ exactly that way – enough for human trials I thought!
Okay, I might have been optimistic to think that someone would type the exact text needed to get a response, but I was amazed at having explained to a colleague the situation, emphasising the bot was only basic, the first thing they type is:
‘Hey dude, how r u?’.
The bot crumbled, it was clear that I had to go back to the drawing board, but I learned the lesson that people would not just want their 3ex question answered, they would want a more rounded conversation and not just launch into their 3ex question.
I had to think about the bigger picture. Firstly, 3ex Bot was a terrible name, a quick rebrand later and 3ex Bot was now Maurice! Not only that, but if you asked what his name was he would be happy to tell you. Now to tackle the larger issues, I needed more content for the bot to talk about and also a better understanding of AIML to make Maurice more flexible to the different ways questions can be phrased.
Realistically, a large amount of support jobs will either be specific to the customer’s unique build of 3ex.Net or require actual intervention by a human member of the support team, not things that an AI bots would handle well. There was still plenty of room to help with general queries and training needs, for example being able to give advice on how to setup 3ex.Net on a new PC, or point users in the direction of tutorials. I got to work, after a few cycles of learning, changing and testing, Maurice wasn’t just able to give useful information to quite a few queries, he was also able to follow up with his own questions in context with the user’s queries:
Able to entertain some off topic conversation, but gently guide the conversation back to query answering:
No matter how much content I gave Maurice to talk about, there would always be questions that he could not answer, rather than give up he at least guides you towards safe hands:
My experiment with AI as a support bot is coming to an end, but I am not stopping developing with AI. When I build a new SQL Report or Integration package that is a good example of a particular technique, or if I find myself needing the same piece of code, but not frequently enough to remember it, I build the knowledge in to Maurice so I can ask for it later. Recently I started to experiment with a new set of AIML techniques, which will allow me to teach Maurice directly through the chat interface directly, rather than scripting his AIML brain files. With any luck this will speed up the teaching process, potentially opening him up to helping/learning with other people in the office. What is the worst that can happen!
For anyone keen to learn about AIML, it is open source and documentation is freely available.