Assume I run a transit business. I need to know what sort of cars you need, when you need it, how heavy is your cargo, your destination and your start point.

A long time ago, I would print this as a form on paper and either hand it to you to fill, or fill it my self over a conversation on the phone. Then I would calculate the price and dispatch someone to take care of it.

A few years ago, I would convert it to some sort of a computer program, either web-based or local binary, and I would ask the user to fill it out or fill it myself over a conversation.

Now, with the current interest in social media and IMs, I could deploy my application on one of these and let the customer chat with it to put their orders. Let's see how that could go.

Scenario 1: State-based chatbot

A state-based chatbot is a simple one, at each point in the conversation, it expects something from the user. Consider the following dialog:



User: Hi! Bot's State: conversation_start Bot: Hi, welcome to my shop! Do you want to put an order? User: Yes Bot's State: order_weight Bot: Ok, how heavy is your cargo? User: Around 400 Kg Bot's State: order_dest Bot: And where is your destination? ...

You can imagine how that goes. That would work fine if the user complies with what the bot is asking. Now consider this:



User: Hi! I have 400Kg cargo that I want to deliver to X. Bot: Hi, welcome to my shop! Do you want to put an order? User: Ummm, yes, I have a 400kg cargo for X. Bot: Ok, how heavy is your cargo?

Ops. That didn't go too well.

Scenario 2: Slot Filling Chatbot

A slot filling chatbot is no different from a regular state-based chatbot. Perhaps the only real difference is that it uses some form of NLU to understand what the user is saying. Say, for example, the user provides her cargo weight in the first message. The slot filling chatbot would jump over that step because it already knows the weight. So the second dialog would go smoother.

In the next posts, I'll try to write a tutorial on writing a slot filling chatbot.j