CC-8 

My Virtual Assistant

I’m somewhat of a geek and in my spare time I’ve been tinkering with AI. At the moment I only know the basics to AI however, I have built a few simple things to test out my new found skills. Some of the things I have created include building a machine learning classification model that predicts the likelihood of someone having diabetes by analysing and finding patterns in biometrics. I’ve also created a Surveillance system that uses cognitive services such as facial recognition and text analytics which I’ll post on this portfolio site soon. One Friday night I built my own personal virtual assistant using IBM Watson. I’ve called the chatbot CC-8, which took me approximately 3 hours to design, build and test. 3 hours is not a long time hence, just a heads up CC-8 is a very basic bot. Although, I do plan on continuously testing and teaching him new things but at the moment CC-8 just provides professional information about me such as contact details, qualifications, experience and information on job opportunities. CC-8 is powered by IBM Watson so he understands natural-language and can respond in human-like conversation.

CC8_IBM_WatsonCC8_IBM_Watson
CC8_Google_PixelsCC8_Google_Pixels
CC8_Macbook_ProCC8_Macbook_Pro

How I built CC-8

- the nitty gritty stuff

I built CC-8 using IBM Watson Assistant a platform on the IBM Cloud that enables people to create their own intelligent conversational virtual assistants. In really rudimentary terms the way that I approached designing the chatbot I initially defined the purpose, the goals and functions, the users, the bot’s persona, the tonality of language, intents, entities and the dialog. Throughout the process of design I tested the intents, entities and dialog within Watson Assistant. I then deployed it on my wordpress site by simply installing the Watson Assistant plugin and calling the assistant URL and API key. From there I continued to test it on my site on different platforms.

Defining Intents

Intents is basically the goal or purpose of the user’s input. The way I defined my intents was hypothesising what my users would most likely do and want to know. Most common users that would be visiting my portfolio site and possibly using the chatbot would be recruiters, people or organisations in need of a designer. Funnily enough the types of queries I included in my chatbot were common queries I get asked by recruiters on my LinkedIn or via email. So I included intents and phrases that were associated with job opportunities, professional experience, resume details and means of contact. Also, I just asked friends what they thought they would ask the chatbot. Although, once I get more people using it I can refine these intentions and I can teach and train CC-8 how to respond to new intents.

CC8_RecruitersCC8_Recruiters
CC8_Intents_01CC8_Intents_01
CC8_Intents_new_01CC8_Intents_new_01
CC8_Intents_new_02CC8_Intents_new_02

Defining Entities

Entities enable Watson to identify details and the user’s input, which we can then use to provide different responses to the user. Entities have a name in a series of values, these values in turn have associated synonyms. I’ve added a couple of synonyms as you can see below and this is so if the user might enter the same concept using a different word. Extracting both intent and entity from the user’s question enables us to provide a very specific and precise response to the user. In the case of my chatbot, CC-8 has very specific dialog for certain entity values related to ‘contact’. You’ll find that if you ask a query related to email you’ll get a very different response than if you asked a query related to phone number despite both email and phone number are related to contact. I also included the system entity ‘@sys-person’ to be able to detect when a user provides their name. If CC-8 detects a common name it will then embed their name in future dialog. This is just to give the dialog a more human and personal touch. I’ve also enabled Fuzzy Matching so CC-8 can recognise misspellings of entity values and synonyms.

CC8_Entities_01CC8_Entities_01
CC8_Entities_02CC8_Entities_02

Defining the Dialog

After defining the intents and entities, I then focused on designing the dialog. Creating the dialog really defines how your bot will respond to what the user is asking. I visually defined the dialog on Watson and structured the dialogue using nodes. Each node has a name, a condition and one or more responses. The dialogue starts executing on the first node at the top. If the condition is met, it will reply to the user with a response specified in that node and stop the execution until the user has entered some new input. If the condition is not met, it will skip the response and proceed to consider the next node below. If this second node's condition is met by the user's input, the node's response will be sent to the user. If the condition is not met, we continue to the next node and so on.

For node conditions, I used intents, entities, specific entity values, and a few reserved conditions, like welcome, anything else, true and false. Typically, you'd want to greet the user as they arrive. The response, I configured in the first node, is the initial prompt that greets the user, inviting them to chat with CC-8 and provide a name. If the user input doesn't match any of the node's conditions, by default, no response will be provided to the user. This is a bad user experience as nobody likes to be ignored, so I’ve included a node at the very bottom of the dialogue which is always executed if the user input failed to satisfy the conditions of any of the other nodes involved. The failover condition for this node is called anything_else. I configured this node so it has multiple appropriate responses that invites the user to rephrase, or maybe suggest some queries that we know that bot can handle. Most nodes I’ve included offer multiple responses with some variation which I’ve set to randomise.

CC8_Dialog_01_Flow_02CC8_Dialog_01_Flow_02
CC8_Dialog_02CC8_Dialog_02
CC8_Dialog_03CC8_Dialog_03
CC8_Dialog_04CC8_Dialog_04
CC8_Dialog_05CC8_Dialog_05
CC8_Dialog_06CC8_Dialog_06

Testing

I continuously tested throughout the design phase. As I was defining the intents, entities and the dialogue I simultaneously tested it on Watson. After deploying the chatbot I tested it on different platforms to make sure it was performing alright. There’s a few kinks that need to be ironed out but it’s a good little project to exercise my chatbot designing and building skills. 

 

CC8_Testing_01CC8_Testing_01
CC8_Testing_02CC8_Testing_02