Have you ever gone on a road trip without having access to a map? I have, and it’s not easy. Faced with a goal of creating a conversation and a plethora of learning resources for Watson Assistant (formerly Conversation), I felt that I needed a roadmap to help me select the right document, project, or tutorial to help me reach my destination. After building a simple sales assistant chatbot a couple of months ago, I knew the basics of getting started with Watson Assistant. However, after I got past the first pass in building the conversation, I soon found out that I needed to learn intermediate and advanced skills to be able to create a conversation that flows better and is closer to a natural conversation. In this blog post, I share the learning roadmap that I used to acquire the basic, intermediate, and advanced knowledge that I needed to build the conversation chatbot.
To begin, I needed an IBM Cloud account. The IBM Cloud registration page let me create an account, and after I had the account, I created a Watson Assistant service by going to the Watson Assistant page. With the Watson Assistant service in hand, I was ready to get started with building the conversation. There are numerous resources available to help you get started. A combination of the Watson Assistant documentation and tutorials helped me get going with the conversation. This tutorial was also a good reference.
Intermediate: Intents, entities, and dialogs created, now what?
After I created the foundational elements of the conversation (intents, entities, and dialog), I found that I needed to take a step back and think about the design of the chatbot and the conversation. The “Chatbots and conversational design” blog post helped me think about the design of the conversation. I also found it useful to learn the entire process of building a chatbot. The three-part blog post series “Building Ana the insurance Chatbot” allowed me to see the entire process.
After I set up the basic structure of the conversation, I had to worry about conditional statements for the node conditions so that the right dialog nodes were triggered when the right condition or input was received. Knowing the Spring Expression Language (SpEL) helps to make sure that the dialog supports the conversation flow that you are implementing. I used the IBM Cloud docs SpEL documentation as a reference. This got me to the point where I was able to control the flow of the conversation through the nodes. I also needed to look up data from an external data source, and this was where actions came into play.
Advanced: External computing with actions and context
Adding actions to the dialog nodes allows for additional computing to be done either in an IBM Cloud function or in a client function. I used the client actions and let the Node.js client handle the additional computing. The article entitled “Making programmatic calls from a dialog node” in the IBM Cloud docs was very helpful in explaining how to use actions in dialog nodes. When using actions, it is important that context is maintained between dialog nodes and conversations. I had to learn how to use context variables to maintain the context of the conversation. For this, I referred to the watson-conversation-variables GitHub project. The project contains useful samples that illustrate how to use variables in dialog nodes. For a sample complete chatbot implementation with slots, I read through the “Assemble a pizza-ordering chatbot dialog” pattern. The use of slots in a dialog makes it easier to handle the collection of information from the user with relevant follow-up questions.
There are plenty of learning resources for Watson Assistant at various levels: basic, intermediate, and advanced. The key to flattening the learning curve is to have a learning roadmap that lays out the right resource with the right content at the right level and point of your learning journey. The learning roadmap that I took helped me to meet my learning and work objectives efficiently. I hope the roadmap that I laid out in this blog post can also help you accelerate your Watson Assistant learning experience.