Ask a Techspert: How do you build a chatbot?Ask a Techspert: How do you build a chatbot?Communications Manager
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.
The Keyword speaks to conversational AI engineer, Lee Boonstra, about her book: The Definitive Guide to Conversational AI With Dialogflow and Google Cloud.
A Matter of Impact: July updates from Google.orgA Matter of Impact: July updates from Google.orgPresident, Google.org
Unlike other forms of funding, philanthropy is in a position to take risky, long-term bets on solutions to society’s biggest challenges. Government funding generally needs to show taxpayers that money is going to proven solutions, and private investors tend to operate on short timelines and have to make financial returns. That’s why some call philanthropy “society’s risk capital’; it can put impact first and be patient about the results.
Google has a big appetite for risky bets, or, as we call them, “moonshots.” This approach has led to some of our biggest successes — from search to self-driving cars to translation. And, of course, some failures along the way. We’ve tried to take the same approach at Google.org, looking for places where we can direct risk capital toward big problems, often by helping organizations capture the potential of new technologies like artificial intelligence.
Through our Google.org Impact Challenges, for example, we invite social innovators of any size to give us their best ideas for transformative impact and we make sizable contributions of time and money to help them grow. Some of these bets have gone on to become the largest and fastest-growing nonprofit organizations in the world, like Give Directly, Khan Academy, and Equal Justice Initiative. And some have even failed. But through the success and failures, we’ve learned a lot:
There’s a place for risk and a place for sure bets: In our early days nearly everything we funded was in this category of risk capital, which made it tough to have steady, reliable impact or manage multi-year programs. We’ve shifted to a portfolio approach, carving out space for true risk capital and supporting immediate needs such as housing, food, and clean water.
Bet on the team and roll with the punches:Even good ideas fail, but a strong team will roll with the punches and continue iterating to find success. By establishing shared outcome goals in partnership with amazing people, we’ve been able to achieve great results — even when the initial idea foundered.
Invest in what you know:For us, that expertise often involves technology, which is why so many of our best examples have technology at their core.
Give adequate and flexible resources:Too often projects fail because they’re under-funded or funders too constrained in their use of money to make changes when a project takes an unexpected turn. Multi-year, general operating support is generally the right move with risky bets, and we aim to be generous in our support of both time and resources.
For a perspective from the other side, read on for how some of our Google Impact Challenge grantees were able to have outsized impact after we bet on them at ‘risky’ stages of their development.
In case you missed it
Speaking of Impact Challenges, we recently unveiled the 13 grantee organizations for the Google.org Impact Challenge Central and Eastern Europe. Funding recipients include a group working to create opportunities for people who are Deaf or hearing impaired, an organization running science, technology, engineering, the arts and mathematics (STEAM) courses for children in foster care, and a team creating coding courses for LGBTQ+ people in Lithuania.
Hear from one of our grantees: TalkingPoints
Heejae Lim, Founder and CEO of TalkingPoints.
Heejae Lim is the Founder and CEO of TalkingPoints, an AI-powered multilingual platform that helps teachers and families stay connected via text message and an easy-to-use-mobile app. TalkingPoints received a $1.5 million Google AI Impact Challenge grant and support from Google.org Fellows in 2019 to help grow. The support came at just the right time. Due to COVID-19, school closures and distance learning rapidly accelerated demand for TalkingPoints. They went from serving 500,000 teachers, families and students to the more than three million people they reach today.
“As an edtech nonprofit, TalkingPoints draws on research-based practices and invests in high-impact initiatives that may require a lot of resources and time. For example, maintaining high-quality, two-way translation in 100+ languages requires a significant and sustained level of investment. With support from the Google.org Impact Challenge and a team of Google.org Fellows, TalkingPoints has made strides in our ability to leverage AI technologies to support effective communication and stronger family-school partnerships among multilingual communities across the country. Just last year, we achieved 100 million messages exchanged on TalkingPoints, and the messages translated represented 99.8% of languages other than English spoken in the U.S. Now, we’re growing to help tens of millions of teachers and families successfully eliminate common barriers to supporting children's learning including language, time and more. We would not be able to achieve this level of reach and success without partners like Google.org taking the risk to invest.”
A few words with a Google.org Fellow: Open Food Facts
Mélanie Gancel, a Google.org Fellow with Open Food Facts.
Mélanie Gancel is a product marketing manager at Google who participated in a Google.org Fellowship with Open Food Facts, a food product database that lists ingredients, allergens, nutritional composition, and all of the information on food labels.
“I was born and raised in Paris in an urban environment, but have always felt a deep attachment to nature and desire to protect the environment. I’m always on the lookout for ways to align my job as a Product Marketing Manager on the Search team to work that will help people make more sustainable choices. So when I heard about the Google.org Fellowship with Open Food Facts, a recent grantee from the Google.org Impact Challenge on Climate, I was immediately on board. During my time with Open Food Facts, I’ve learned uncertainty around food choices is one of the main barriers to living more sustainably and that food accounts for more than a quarter of global greenhouse gas emissions. We’re helping them build an app that will give consumers a simple food eco-score to understand the environmental footprint of grocery store goods and make informed choices about how purchases affect the sustainability of the world around us.”
A Matter of Impact, Google.org’s monthly digest, keeps you up-to-date on what the team, grantees and nonprofit collaborators are up to.
How Olympians at Google handle hurdles at workHow Olympians at Google handle hurdles at workKeyword Contributor
Clockwise, from top left: Kate Johnson, 2004 Olympics; Timothy Goebel, 2002 Olympics; Aleksandra Jarmolińska, 2020-2021 Olympics; Natalie Dell O’Brien, 2012 Olympics; Petri Kokko, 1994 Olympics; Matt Brittin, 1988 Olympics
Professional athletes are resilience experts. They’re constantly pushing their minds and bodies to new limits, all while staying motivated to reach their goals and tackle new challenges. If you don’t believe me, ask Matt Brittin. Matt is Google’s President of EMEA Business and Operations — as well as a former Olympian. Matt competed in the 1988 Olympics on the U.K. men’s rowing team, and he’s tapped into what got him to that stage in this last year. “We’re in a state of long term uncertainty and building resilience takes knowing yourself well and takes time,” he says. “It’s all about how you manage your energy and approach the unknown.”
As this year’s games come to a close, we asked Matt and several of other former Olympian Googlers to share how their experiences helped them in the workplace.
Petri Kokko - Country Sales Director of Brands, former Olympic figure skater
“Giving your maximum doesn't help you achieve optimal results, but working optimally will help you achieve your maximum effort,” says Petri, who represented Finland in figure skating at the 1992 and 1994 Olympics. “And often people, especially motivated people, think that the more they work the more they achieve and that's not the case. We’re not trying to achieve our best tomorrow, we’re trying to develop ourselves over the years.”
Petri falls back on his training to find a healthy work-life balance. He builds variation into his calendar, making sure some days and weeks are lighter, so he doesn’t burn out and can give his best over the long term. As an Olympic athlete, Petri learned the value of rest and recovery to avoid injuries and to deal with stress. At Google, mental health and wellbeing are highly valued, and these resources were expanded over the last year.
Aleksandra Jarmolińska - Cloud Software Engineer, former Olympic sports shooter
Calling Aleksandra a “former” Olympian is nearly a misnomer — she just competed in this year’s games in Tokyo, as well as back in 2016. “I interviewed for my role at Google during the same month that I qualified for the Tokyo Games,” she says. Fresh off her competition, she says an important lesson she’s learned in her athletic career that translates to work is to keep trying. “This may be a bit of a cliche, but I always appreciated Samuel Beckett’s philosophy of: ‘Try. Fail. Persist. Fail better.’”
In sports shooting, she explains, you can’t necessarily succeed with athleticism, you need to step back, clear your head and adapt. “This applies to lots of things — programming included,” Aleksandra says. “I cannot count the times I’ve started from scratch on some feature I worked on.”
“It’s important to adapt instead of just giving up when things are challenging,” says Timothy, who won a bronze medal in figure skating for the U.S. in 2002. “It’s about finding small wins, like effectively communicating with stakeholders and finding the humanity in each other. At the end of the day, we’re all teammates!” A strong, supportive community is just as important as the training itself, he says.
Natalie Dell O’Brien - Head of Industry for U.S. Financial Services, former Olympic rower
“We see Olympians as individuals, but you might not realize there’s a village of people they put into their orbit to support them,” says Nataile, who won the bronze medal at the 2012 Summer Olympics in the quadruple rowing event for the United States.
Like Petri, Natalie recalls her Olympic training schedule when tackling business planning, breaking things down into “digestible training blocks” and communicating smaller milestones with her team. But Natalie says her support system was equally important to her professional athletic career and she continues to build a similar network at Google.
“Some of the smartest decisions and biggest leaps in performance I made in my rowing career were made possible because I leaned on others for help,” Natalie said. “ And any time I’m up against a challenge at work, I remember that even Olympic athletes have ‘phone a friend’ moments. Vulnerability can lead to better performance.”
Kate Johnson - Marketing Director of Partnerships, Content & Sports Media, former Olympic rower
Kate, an American rower who won silver in 2004, joined Google during the pandemic, and it was challenging to virtually learn the culture and team dynamics. But she relied on the resiliency and prioritizing powers she’d honed as an athlete.
“In rowing, there’s a tipping point where the harder you try to get out of a performance slump, the worse you perform. It’s a tricky balance,” Kate says. “When I'm in a rut like this, the solution isn’t to try harder. Instead, in these moments, it's more important to go for a hike, or go for a run, clear your mind, whatever…then come back with a different mindset.”
Kate said she feels grateful to work at a company that prioritizes the overall health of its employees, which became increasingly important when Kate was diagnosed with breast cancer in May of this year. Kate makes use of Google's flexible leave offerings to manage her health, while communicating with her stakeholders to set expectations in a time when she needs to focus on her personal health and wellbeing. As Kate puts it, “remember that our personal worth is not tied to performance.”
Googlers share what they learned from competing in the Olympics and how their time as athletes help them take on challenges at work.