Skip to main content
The Keyword

Ask a Techspert: How do you build a chatbot?

A picture of Lee Boonstra with her book

Chatbots have become a normal part of daily life, from that helpful customer service pop-up on a website to the voice-controlled system in your home. As a conversational AI engineer at Google, Lee Boonstra knows everything about chatbots. When the pandemic started, many of the conferences she spoke at were canceled, which gave Lee the time to put her knowledge into book form. She started writing while she was pregnant, and now, along with her daughter Rebel, she has this book: The Definitive Guide to Conversational AI With Dialogflow and Google Cloud


Lee, who lives and works in Amsterdam, is donating the proceeds of her royalties to Stichting Meer dan Gewenst, a nonprofit organization that helps people in the LGBTQ+ community who want to have children. The charity is close to her heart; as an LGBTQ+ parent herself, she wants others like her to have a chance at the joy she feels with her daughter. 


The book itself is for anyone interested in using chatbots, from developers to project managers and CEOs. Here she speaks to The Keyword about the art (and science) behind building a chatbot. 


What exactly is a chatbot?

A chatbot is a piece of software designed to simulate online conversations with people. Many people know chatbots as a chat window that appears when you open a website, but there are more forms — for instance, there are chatbots that answer questions via social media, and the voice of the Google Assistant is a chatbot. Chatbots have been around since the early computing days, but computers, they’ve only recently become more mainstream. That has everything to do with machine learning and natural language understanding. 

Old-school chatbots required you to formulate your sentences carefully. If you said things differently, the chatbot wouldn't know how to answer. If you made a spelling mistake, the bot would run amok! But there are many different ways to say something. A chatbot built with natural language understanding can understand a specific piece of text and then retrieve a specific answer to your question. It doesn't matter if you spell it wrong or say things differently. 


What benefits can the use of chatbots offer companies?
A chatbot works quickly, knows (almost) everything and is available 24/7. That basically makes it the ideal customer service representative. The customer no longer has to wait, the company saves money and the employees experience less stress. As a customer, you get a chatbot on the phone that listens to your question and can answer like a human thanks to speech technology. This way, most customers already receive the answers they need. If the chatbot doesn’t know the answer, it can transfer them to an employee. The customer will not be prompted for information again, as the agent will see that the chat history and system fields are already filled.


Companies are finding more and more ways to use chatbots. For example, since the advent of artificial intelligence, KLM Royal Dutch Airlines has been handling twice as many questions from customers via social media. And technical developer Doop built a Google Assistant Action in the Netherlands in collaboration with AVROTROS, specifically for the Eurovision Song Contest. Anyone who asks for information about the Eurovision Song Contest will hear a chatbot with the voice of presenter Cornald Maas talk about the show. 


How do you build a chatbot?
You can build a chatbot using the Dialogflow tool and other services on the Google Cloud platform. Dialogflow is a tool in your web browser that allows you to build chatbots by entering examples. For example, if you already have a FAQ section on your website, that's a good start. With Dialogflow you can edit the content of that Q&A and then train the chatbot to find answers to questions that customers often ask. Dialogflow learns from all the conversation examples so that it can provide answers.


But just like building a website, you probably need more resources, such as a place to host your chatbot and a database to store your data. You may also want to use additional machine learning models so that your chatbot can do things like detect the content of a PDF or the sentiment of a text. Google Cloud has more than 200 products available for this. It's just like playing with blocks: by stacking all these resources on top of each other, you build a product and you improve the experience, for yourself and for the customer.


Do you have any tips for getting started?
First things first: Start building the chatbot as soon as possible. Many people dread this, because they think it's hugely complex, but it’s better to just get going. You will need to keep track of the conversations and keep an eye on the statistics; what do customers ask and what do they expect? Building a chatbot is an ongoing project. The longer a chatbot lasts, the more data is collected and the smarter and faster it becomes. 


In addition, don't build a chatbot just for one specific channel. What you don't want is to have to build a chatbot for another channel next year and replicate the work. In a large company, teams often want to build a chatbot, but different chat channels are important to different departments. As a company you want to be present on all of those channels, whether that’s the website, on social media, via telephone or on Whatsapp. Build an integrated bot so there’s no duplication of work and maintenance is much easier. 


How do chatbots make life easier for people?
Many of the frustrations that you experience with traditional customer services, such as limited opening hours for contact by phone, waiting times and incomprehensible menus, can be removed with chatbots. People do find it important to know whether they are interacting with a human being or a chatbot, but, interestingly, a chatbot is more likely to be forgiven for making a mistake than a human. People might also have a specific preference for human interaction or a chatbot when discussing more sensitive topics like medical or financial issues, either because they want to have personal, human contact or they would rather not discuss a topic with a human being because they don’t feel comfortable doing so. Chatbots are getting better and better at understanding and interacting, and can be very helpful for interactions about these topics as well. 

Let’s stay in touch. Get the latest news from Google in your inbox.

Subscribe