-
Notifications
You must be signed in to change notification settings - Fork 218
Home
Use Watson Conversation Slots to create a Chatbot Dialog that fills out entries in a pizza order.
The new Watson Conversation Slots feature allows the developer to create a complex dialog with a reduced number of nodes. Previously, adding entries for fields, such as the components of a pizza order, would require complex logic and a large number of nodes, depending on the number of fields. With slots we can define the fields in one dialog node and handle all of the logic in this single node.
Cognitive
For those already familiar with the Watson Conversation service, you can create complex dialogs with branching logic in order to guide the user through a conversation. One use case it to gather information to fill out a form, create a profile, or create an order. This process used to be a bit cumbersome, as the number of fields that are required increases, the number of dialog nodes increases, with branching, resets, and short- circuits adding to the complexity. The new Conversation Slots feature makes reduces this complexity, and speeds up developer time. The number of dialog nodes required to fill out a form, profile, or order can often be reduced to a single node. In this journey we use the example of ordering a pizza with a chatbot. The single node required for the order demonstrates both required and optional slots, as well as handlers for input that is not designated with a slot. Have a look at this helpful feature and discover ways to improve your Watson Conversation dialogs.
by Scott D'Angelo
https://github.com/IBM/watson-conversation-slots-intro
N/A
In this developer journey, we'll create a simple chatbot with node.js and Watson conversation. There will be only a thin application layer which provides the bare bones of a basic chatbot, with all of the logic pushed into Watson Conversation thanks to the new Slots feature. The chatbot will take a pizza order, filling in Slots for the various information required. A similar approach could be used for a user profile or other online form.
When the reader has completed this journey, they will understand how to:
- Create a simple chatbot using node.js and Watson Conversation
- Use Watson Conversation Slots to fill out required data
- Use Conversation Slots handlers to take care of conversation flow that does not fit into slots
- User Sends dialog to Cloud based node.js application
- Application interacts with Watson Conversation and uses Slots
- Replies from Watson Conversation are returned to user via Application.
- Watson Conversation: Create a chatbot with a program that conducts a conversation via auditory or textual methods.
- Cloud Foundry: Build, deploy, and run applications on an open source cloud platform.
- Cognitive Watson is a cognitive technology that can think like a human.
- Node.js An asynchronous event driven JavaScript runtime, designed to build scalable applications.
- Platform as a Service: A platform for Cloud services making it easy to develop, deploy, and manage applications by abstracting the complexity of maintaining the infrastructure required to carry out these activities.
- Building a Dialog with Watson Conversation Documentation detailing how to build a conversation dialog, including the use of Slots.
- Make a Sophisticated Chatbot with slots Video showing another take on building a chatbot with slots.
- Using Slots Blog post about slots.
When I built my first Watson Conversation Dialog for the Watson Online Storewatson-online-store, I had two strong impressions. One was, “Wow, this is pretty cool!” and the other was “Seems like a lot of work to fill out a basic user profile.” The process of gathering data for a user involved multiple nodes, validating the input required more nodes, and adding logic to reset or return to one of the many starting points multiplied the nodes further. Surely, I thought, there must be a better way.
Well, the better way has arrived: Watson Conversation Slots is This a new feature that enables a developers to gather multiple pieces of information in a single dialog node. The slot is named, a context variable created, and, for required slots, a prompt is created. The dialog will stay on this node until all the mandatory slots are filled out. Handlers can be added for input that does not fit into a slot, so things like ‘help’ and ‘reset’ can be reused for all the input.
Here’s what my dialog might look like without slots:
And here’s the same logic with slots:
Yes, that’s right. It can all be done in a single node!. Visit the github repo for watson-conversation-slots-intro for some code and discussion of this nifty new feature.