Develop a chatbot with Google Chat – Part 1
How many times did you already land on a web page of some service provider where you have been invited to get more information through a chat? The first interaction is usually not with a human being, but with a virtual assistant. It is called Chatbot: a robot software that interacts through a chat channel.
Machine learning and artificial intelligence tools make possibile to create interfaces that use the natural language and are able to search the right information based on the users needs.
The understanding and processing of natural language makes it possible to get answers to our questions by simply asking it as we would do to a human being.
In this way, websites and webapps could be enriched with a completely natural interface, enabling to interact with them as you would do with a colleague:
“Could you send me the invoice 2019.22 by email?”, “Can you send me the link to order A22.2018?”, “What is the total turnover of March 2015?” are examples of questions you could ask to your corporate ChatBot, making your work even more efficient and dynamic than it is today.
But how complex is it to create a corporate ChatBot, what tools are available today and is it really affordable for micro and small companies to develop such tools?
Simone Bracaloni, Senior Software Engineer @ Wondersys will give us some hints on how to develop your personal Chatbot.
The Chatbot – first part
A chatbot exists and operates thanks to a communication channel: the chat. The concept of chatbot, at least in an elementary version, is not new and many chat services have supported elementary chatbots since a long time.
Starting in 1988 when the IRC protocol was standardized, IRC channels were the major chat implementation and the first bots borned immediately in this ecosystem, offering diverse functions. For example these Bots could take care of welcoming new users to the channel, describing their operation and rules and also recording messages and creating sorted and indexed archives. The wikipedia reads: “An IRC bot is a set of scripts or an independent program that connects to Internet Relay Chat as a client, and so appears to other IRC users as another user. An IRC bot differs from a regular client in that instead of providing interactive access to IRC for a human user, it performs automated functions.”
So the ingredients to create a bot are simple, a chat channel and software that can join the channel as if it were a user.
However, two important things have changed since 1988:
– today chats are an important business communication tool and are no longer used just for fun
– software such as bots gained superpowers with the improvement and diffusion of artificial intelligence algorithms and tools, especially for the use and recognition of natural languages.
Let’s see a concrete example of what it means to create a Bot in 2020. We need a chat service, which is safe and private, because we want to use it to communicate instantly with our work colleagues around the world. We want this service to be managed, because we don’t want to reinvent the wheel and waste too much time setting up the service, and maybe we don’t have the time or the skills to launch and manage IRC services on our own.
Finally, we need this chat service to support Bots (perhaps natively), to be able to interact with them in the best way and to allow us to integrate a simple and effective Bot design system.
Our suggestion is to choose Google Chat, the brand new instant messaging service present in the Google Workspace suite.
Let’s have a simple goal: a bot that we can ask for the weather forecast directly in our corporate recreation room.
When it comes to natural language there are very few simple things. But we will discover that thanks to tools like Google Dialogflow we have everything we need for much more complex challenges.
Well, let’s go!
If we don’t already have one, let’s create the room where we want to install our Bot.
Let’s go to https://chat.google.com/ and click on the + button on the top left
We choose the people we want to include in our room and click on “Create”
We note that some bots are already available and we could therefore “invite them to our chat” so that they can participate in our discussions. This is the case, for example, of Google Drive bots that allow us, for example, to assign permissions on a document without leaving the chat.
Now that we have our room we want to develop our WeatherBot. We will see this in detail in the second part of this article next week in which we will illustrate how to develop the bot with Google and Dialogflow and we will get to work with writing the code.
Have a nice day and see you soon!
Senior Software Engineer @ Wondersys