Slots is a feature of Watson Conversation that reduces the amount of work needed to collect information from a chatbot user.

In this video:

  • Oscar Kafati, Product Manager, IBM Watson Conversation
  • Shantenu Agarwal, Product Manager, IBM Watson Conversation

One of the jobs when building a Watson chatbot with the Conversation service is determining how to gather input from the user. Slots is one of the easiest ways because it takes a task that usually comprises several dialog nodes and consolidates it into a single node. You basically collect answers from users and store them in context.

IBM Watson Conversation Product Managers Oscar Kafati and Shantenu Agarwal show you how slots can reduce development time when building a chatbot dialog.

A good use case example is making a dinner reservation. You’ll need to know several pieces of information – date, time, and number of people. Slots allows you to set up your chatbot to collect all of this data as a collection instead of as individual pieces that require individual dialogs. Slots enables the dialog node to understand all of the data pieces as a whole conversation or separately. That means if a user calls and asks for a table at 8pm on the 21st, the node will recognize that one piece of data is missing and ask specifically “and how many people with be in your party?”.

Slots adds another level of conversational sophistication to your chatbot.

The following video will show you how to work with slots in a little more detail.

Have fun building your chatbot with Conversation slots.

Resources for you

Cognitive Computing

Create apps that accelerate, enhance, and scale the human experience.


A transformative way to let users interact with your organization.

6 comments on"Make a more sophisticated Watson chatbot with slots"

  1. Hi,
    Love the new functionality. But is there a more sophisticated way to handle other intents inside that node? Imagine if you have a bigger dialog tree and you have more intents. How can you easily jump out of the slot without getting stuck in the prompting questions?

    An example could be in this case food order on top of reservation.

    If you first ask for reservation, and then realizes you want to order food first you will get stuck in prompted question from the bot about opening hours etc because the entity values haven’t been provided with. What you want is a way to jump out of that dialog node to another one anytime. Please let me know if this was confusing 🙂

    • Hello Bennyhoang
      Check out the digressions functionality in Watson Assistant (formerly Watson Conversation). You can do just that: Set up a root node to handle requests for Food orders: In that node’s customize option you will see an option to allow users to digress into that node. From your reservation slots node, you customize to allow digressions away from that node.

  2. thanks for the valuable information. i have 2 specific questions.
    1. I created a slot that prompts the user to enter a number. so i used @sys-number and created a context variable $number to capture it. However i want to also check that the number enter by user is exactly 5 digits. is there a way to perform this validation?

    2. in another scenario i have to prompt the user to provide 2 numbers – customer id and order id. both are numbers. so i again created 2 slots with @sys-number and created 2 context variables to capture customerId and orderId. now my problem is how to figure out order of these numbers in the user input. so let’s say that if the users writes “please give me status of my order with id 100”, how can i ensure that 100 is interpreted as the orderId and not customerId. At present because my first slot is customerId, watson assumes that the number provided is customerId and not orderId and it again prompts the user to provide customerId. is there a way to design it in a better way. i was hoping that if i can get answer to Point 1, may be i can put some check on number of digits and do something.

    Looking forward for some tips here. thanks !

  3. Hello Learner

    1. I would recommend using a pattern entity rather than @sys-number. You can create a pattern entity by changing the type from synonym to pattern for an entity’s value and add a regex pattern to represent 5 numbers. The use that in your slot.

    2. You have a few options:
    a) You could use two different pattern entities if your customer and order id’s follow different patterns.
    b) If they look the same, whether using @sys-number or @new_entity_pattern, you can force each prompt by using the slot_in_focus operator in order to make sure the user is asked for each similar value. This operator makes the entity detection only appear for that entity when that particular slot is in focus. This is the syntax to add in the Check for field of the slot: @entity && slot_in_focus. The documentation for this is the usage tips section here:
    c) Use Watson Knowledge Studio in conjunction with Watson Assistant to further customize entity detection

  4. Abden Nasir April 19, 2018


    Thanks for the information, but i have few issues and i dont know how get come over with it may be you can help.
    I have 2 scenarios like
    1st i want to register the customer with name, email and phone number once they have done i would like to ask them to enter short description of the case as it is insurance claim app so here i cannot capture the short description how can i do that?
    2nd i identify intent of the user where i have categories of claim which is Vehicle Accident and Personal Injury.. you know some times they can have both same intent.
    How to solve these 2 scenarios.
    Thanks for your support and information

    • Helo Abden
      For the follow up question, you could use a child node after the Slots node. Your slots node would gather the short input from the user: name, email, phone. Your response on that node might be: “OK, thanks. Now please describe the claim”. Set your slot node to wait for user input after the response, then create children nodes under your slots node that are each conditioned on the intents you have created to understand claims descriptions. You can also test if your user’s utterance matches more than one intent by accessing the confidence score associated with each intent returned and program your response accordingly. You can learn more about accessing intents and confidence score here:

Join The Discussion

Your email address will not be published. Required fields are marked *