Recently I received an SMS from a leading financial institution summarizing a loan process, which prompted me to click on a chat link, for more information. When I clicked on the link a chat window opened and I was really fascinated by the response to my queries, and to my surprise it was a chatbot, which triggered my interest to explore and develop one.
Conversational chatbots are part of modern life
It would be pretty difficult to not encounter a conversational chatbot in our daily interactions. Apple’s Siri, Amazon’s Alexa and Microsoft’s Cortana are a few bots that are famous and well known. You might have also came across text-based chatbots while renewing your insurance, buying something online, or speaking to a chatty assistant even without knowing!
Chatbots are mainly used to provide customer support. Once you make them intelligent by training, they will communicate fluently with your target audience in their language. A chatbot is an artificial intelligence (AI) software that can simulate a conversation (or a chat) with a user in natural language through messaging applications, websites, mobile apps or through the telephone.
A Conversational chatbot understands the context of the conversation and can handle any user goal gracefully. This doesn’t always mean that the bot will be able to answer all questions, but it can handle the conversation well and help the user accomplish their goal as well as possible.
An ideal Bot platform offers:
- NLP service— that you can train
- SDKto support & handle conversations (and their meta-data)
- Platform to host the bot code
- Platform to connect the bot logic with multiple channels (Integration)
The following chatbot frameworks are available in the market that are intuitive and easy to implement:
- ai from Facebook
- DialogFlow from Google
- ai from Microsoft
- Conversational AI from SAP (formerly known as Recast.AI)
But is there any significant chatbot framework in open source? The answer is yes, Rasa.AI. Advantages with Rasa over the enterprise driven frameworks:
- No vendor lock-in
- No “AI fairy dust”
- No State machines, Learn from real conversations
- Run on your favourite infrastructure (On premise / cloud)
- Get full control over training data and build up IP
- Leverage backend systems, APIs and Robotic Process Automation to fully automate processes
Rasa is an open source machine learning framework for building contextual AI assistants and chatbots, and consists of two main modules:
- NLU (Natural Language Understanding) for understanding user messages. NLU is a library for natural language understanding with intent classification and entity extraction. This helps the chatbot to understand what the user is saying.
- Core for holding conversations and deciding what to do next. Core is a chatbot framework with machine learning-based dialogue management that predicts the next best action based on the input from NLU, the conversation history, and the training data.
Some keywords you will find repeatedly used w.r.t NLP:
Simply, intents are the intentions of the end-user, which are conveyed by the user to the bot. They can be as casual as hoa, cya or professionally “when is the last flight today to Hyderabad”?
Business intents have metadata about the intent called “Entities”. Let’s see an example for an Intent: “GetReleaseYearByTitle” — Sample Utterance “When was Bahubali released ?” Here “Bahubali” is the title of the movie for which user “intends” to find out the year of release.
As the name suggests, it’s an operation which can be performed by the bot. It could be replying something in return, querying a DB or any other thing possible by the code.
Want to quickly build a chat bot ?
Well, for RASA there is a learning curve. But don’t be disappointed, luckily we have “articulate” which was built on top of RASA and most of the boiler plating will be taken care. Yes, it is open source too. This helps as a gateway to enter the NLP world.
- https://spg.ai/projects/articulate/ Articulate is a complete infrastructure for intelligent agents. It uses Rasa for NLU, Redis for quick look-ups, Elastic Search for logging and analytics that won’t miss a thing, and Duckling for enhanced date and time parsing.
Get your hands dirty by following the instructions :
localhost:8080, Create an agent with Name and description, and Save.
Under categories, create a category or import an existing category like weather. Click on Train.
Post training, Click on review tab and start chatting with your agent
Analytics section will give you insights on Actions, requests over time etc.
Once the agent / model is ready, Click on Connections to create an integration with FB, Slack, Rocket chat etc.
Click on save to get a shareable link like this: http://localhost:8080/demo/6f8da580-ca27-11e9-8666-39699ef60e5c
As you have seen, you can easily create your own bot with keywords, actions and categories and solve real business problems. Once you feel the agent / model is up to the mark, integrate with external platforms like Slack, facebook etc.