Adding slot changing the intent

288 Views Asked by At

I have created a dialog which checks for some Intent and entity to trigger the response, I have also added slots to capture the missing entities. But when user enter the slot value it changes the intent thus causing change in final response. I have tried adding context variable also and deleting it after response but it gets deleted before response and I am getting empty context variable in response. Like I have added a slot for capturing missing color values in an Intent say 'looking' and color values are like 'I, G, H' and there's also an Intent let's say Goodbye which is also trained for values like 'G or H'. So, when a user fills the slot value with 'G or H' it also overrides the previous intent 'looking' to 'Goodbye' and my final response value changes. What is the best way to handle this kind of flow?

1

There are 1 best solutions below

0
On

The current intent is based on the latest utterance by the end user. So when someone types in a follow up to a slot, the intent will change and this is intended.

A common confusion is that this impacts the dialog tree. Because when you test it in "Try it out" you see the intent change. Unless your dialog tree is explicitly looking for it after the slot, then it has no impact what-so-ever.

If you do need it to stay the same, then you can send back the intent object in your context. This will disable Watson Assistant from trying to guess the intent.

The danger here is you need to be mindful that what you send back might not reflect what the user has entered. For example, they may ask something that has to trigger the handler of a slot. Doing this will disable that ability.