651.288.7000 info@intertech.com

Introduction

Like many people, I’m spending more time inside these days due to COVID-19. Recently, I decided to put my self-isolation to good use by building a virtual assistant (also known as a chatbot). The chatbot enables Saint Paul, MN residents to get answers to questions related to the coronavirus, using the FAQ page the City of St. Paul posted here. I wanted to build this for two reasons. First, I thought it would be a helpful way for my community to get answers without having to skim through an entire web page. Second, I was getting tired of feeling like there was little I could do to help my community. While this post isn’t an extensive walk-through, I hope to show building a chatbot doesn’t have to be intimidating.

Building the Chatbot

To build the chatbot, I used IBM’s cloud-based solution Watson Assistant. IBM’s Watson is most famous for its 2011 appearance on the TV show Jeopardy when it defeated champions Brad Rutter and Ken Jennings. IBM’s Watson Assistant makes that same artificial intelligence available in a way that a developer like me can easily use. I used Watson Assistant to build my chatbot because:

  • It’s a technology I knew,
  • It’s a powerful low-code option that can be built quickly,
  • It has a generous free plan, and
  • It can be integrated with Facebook Messenger and Slack.

There are two important concepts to keep in mind when building a chatbot: intent and dialog.

I think of an intent as a container that holds a particular subject a user might want to converse about, and that the chatbot should be able to recognize. For instance, an intent called ‘#General_Greetings’ recognizes when a user is trying to greet the chatbot. This intent consists of several examples of text the user might input that the Watson AI should recognize as a greeting. These examples are used to train Watson so it can recognize greetings it may have never seen before and respond, as shown in the screenshot below, where “Howdy, partner!” was the input the chatbot hadn’t seen before:

A dialog is the conversational path the chatbot takes once an intent is recognized. For instance, this chatbot can respond to a greeting in one of three ways, depending on the time of time of day, as shown below:

In building this chatbot (which I named Beckett after one of my cats), I gave each of the FAQs on the City’s webpage an intent with examples of user input. I also created a corresponding dialog node where the chatbot responds with an answer from the City’s webpage. If you’d like to take it for a spin, feel free to visit the preview link here.

 

 

Conclusion

All told, I spent a little over five hours building the first version of the chatbot. Much of that time consisted of coming up with unusual ways users might pose questions so the chatbot would perform better. Stay tuned for my next blog post on retraining my chatbot using anonymous conversations from actual users. 

If you’re interested in building a chatbot for your organization, please reach out to us at Intertech. We’d be happy to help!

 

About Intertech

Founded in 1991, Intertech delivers software development consulting and IT training to Fortune 500, Government and Leading Technology institutions. Learn more about us. Whether you are a developer interested in working for a company that invests in its employees or a company looking to partner with a team of technology leaders who provide solutions, mentor staff and add true business value, we’d like to meet you.