What is a chatbot?
A chatbot is a computer program that interacts in natural language with humans through either speech or text communication. It uses a machine learning technique called natural language processing (NLP) to understand the user’s intent and respond based on a set of business rules and data related to its core function.
The first chatbot, called Eliza, was built in 1966 at the MIT Artificial Intelligence Laboratory and with only 200 lines of code, it was designed to operate as a psychotherapist.
Chatbots are still not perfect, but the current state of the art with chatbots allows them to improve human/computer interaction by making information available through natural language without requiring lines programming.
As AI/ML evolves chatbots will become increasingly useful.
There are two types of chatbots: Rule-based and self-learning. Rule based chatbots basically follow decision trees to respond to user inputs, while self-learning chatbots learn from interactions and increased data.
Amazon has developed a managed service called Lex Bot that is trained on the mountains of data collected by Amazon. Lex uses deep learning to improve its capabilities with algorithms including ASR (Automatic Speech Recognition) and NLU (Natural Language Understanding). These two methodologies enable Lex-powered chatbots to convert speech to text and to recognize the intent of the text, respectively.
Amazon offers Lex for free to users. Lex is integrated with the AWS suite of services and can be implemented through a simple-to-use drag-and-drop interface. Lex chatbots can be deployed in just a few short minutes.
The following case study was designed for corporate finance professionals to show how easy it would be to create a chatbot to answer regular finance and accounting questions. But it is easy to see how this same approach could be used to build a chatbot for any industry or domain.
So let’s dive in …
Build your own chatbot in minutes
If you have never used AWS before, set Up an AWS Account at https://aws.amazon.com/
Click on “Create AWS Account”
After setting up your AWS account, search for Lex in your AWS Management Console or navigate directly to the Amazon Lex page at https://console.aws.amazon.com/lex/
Click “Get Started”
You can use one of the AWS templates or create your own “Custom Bot”
Let’s create a custom bot.
We’ll make one called SalesNumbers that reports our sales from previous periods.
For COPPA, choose No.
Choose Create.
You can choose a voice for speech if you want to talk to your bot. (For this first test, we’ll choose text only. But feel free to experiment with speech later.)
Next you will be directed to the BotService page. From here we will create our intents.
Create Intent & name it
Let’s create some sample intents for a couple of months with a couple of different ways users can ask the question:
Here’s our intent called “March”
We’ve added three ways users can ask the question. You can add more or less.
Enter the response:
Press the + to add your message.
Save Intent.
Add for a couple of other months if you want.
Build your bot by clicking the Build button at the top right of your screen.
Wait for it to finish
Test the bot
This little case study wasn’t meant to show how you could replace your finance team with talking finance robots; it was meant to show you that you don’t need a master’s in computer science or ML to start diving into some of the concepts we’ve discussed.
You don’t need to be a software developer to build an interactive chatbot. You, reading this article, can go out into the real world and use your knowledge of finance or accounting to create this chatbot for your organization. How cool is that?