REST API
Webhooks
Slot filling
Context Lifespan
Conversation Design
Bot frameworks
Mobile
Debugging
Tools
Machine Learning

Do you actually need slot filling (required parameters) for your bot?

The only thing worse than using slot filling is to use it for a use case where it doesn’t even make sense.

Motivation for slot filling

The real reason you want to use slot filling is because the user’s question/message is posed in a specific format.

First, let us look at an example of a user wanting to book a flight.

They might say any of the following:

I would like to book a flight

I would like to book a flight from Seattle to New York

I would like to book a flight for 4

I would like to book a flight leaving from Seattle tomorrow

Notice that the intent is specified in bold text, and the entities are specified in italics.

Now imagine a conversation like this where the user starts by providing the number of people travelling:

User: I would like to book a flight for 4 people

Bot: OK, for how many people?

Now, that would make your chatbot look really stupid because the user is thinking “What? I just said it is for 4 people”.

Slot filling is very handy in such circumstances, because it infers that the user has already provided one of the pieces of information (slot) needed to book the flight and only prompts for the rest.

In addition, slot filling is smart enough to handle multiple slots provided in the same sentence, and also smart enough to understand that the user could specify the first slot(s) in any order. (Like the example above).

So let us first start with some terminology:

Opening sentence – the first message that the user says to your chatbot

Slot – one of the pieces of information you need to collect for completing the task

Entity – Dialogflow’s terminology for the name of the slot

Intent – The task at hand (again, in Dialogflow terminology. In this case it would be “booking a flight”)

A checklist to decide for yourself

I have put together a small checklist you can use to decide for yourself whether what you are doing is actually slot filling.

1 Could the opening sentence include ANY of the slots?

Take an example of flight booking. It is quite natural to say:

“I would like to book a flight for 4” or “I would like to book a flight leaving tomorrow”.

In other words, it is natural to use any of the slots in the opening sentence.

What about your contact form?

“I would like to know more about your marketing services and my budget is $50000”

How about

“I would like to know more about your marketing services and my Twitter handle is @examplecom”

Almost no one talks like that!

2 Could the opening sentence include ALL of the slots?

Now with the flight booking example, someone might include all the slots in their opening sentence:

“I would like to book a flight from Seattle to New York for 4 people leaving tomorrow and returning next Monday”.

It is quite a lot to say, but it isn’t unnatural.

Imagine if your prospect said the following:

“I would like to know more about your marketing services and my website is at http://www.example.com and my Twitter handle is @examplecom and my Facebook page is at facebook.com/example and my company name is Example and the budget is $50000”.

Unlikely.

3 Could the slots be specified in any order?

In the flight booking example, it is quite possible that the slots are specified in any order (maybe not quite all combinations, but there are many possible combinations):

“I would like to book a flight from Seattle to New York for 4 people leaving tomorrow and returning next Monday”

could just as well be:

“I would like to book a flight for 4 people from Seattle to New York leaving tomorrow and returning next Monday”

I leave it as an exercise for you to imagine if this would work for your specific use case.

4 Are all the slots ACTUALLY required?

Does your prospect actually need to provide you with all this information before you can accept them as clients? Probably not. You could probably get just their contact info (e.g. email address) and ask the rest later.

In theory, you could also do the same with the flight booking (i.e. have a travel agent call the customer later), but that would defeat the purpose of having the chatbot in the first place.

5 Is it possible a slot may not exist?

Is it possible your prospect doesn’t have a website?

While it is unlikely, it is possible.

Can you still have them as a client even if they don’t have a website? For sure, in fact you could be the one who actually sets up their website for the first time!

Is it possible to book a flight without knowing the destination?

6 Do the slots change dynamically?

Here is a comment someone left me recently:

In case you are wondering why my answer seems so blunt, it is because the user left this comment under one of my original articles explaining why I avoid using slot filling.

But it perfectly illustrates the overall point of my article. If all you know is slot filling, everything looks like a required parameter 🙂


Generic filters
>