slot filling triggers different intent in dialogflow

两盒软妹~` 提交于 2020-06-29 04:09:06

问题


I have two intents pizzaSelected and burgerSelected in both intents I am asking for required parameters

I have below entities

@pizza [pepperoni, farmhouse, country special, cheese]
@pizzaSize [small, medium, large]
@burger [veg, beef, ham]
@burgerToppings [onion, tomato, lettuce, pepper]

expected conversation

user: order 2 burgers
bot: which burger?
user: cheese
bot: sorry but we have veg, beef and ham burgers. please select one from this.
user: veg
bot: toppings?
user: tomato and lettuce
bot: you order for 2 veg burgers with tomato and lettuce toppings is placed.

actual conversation

user: order 2 burgers
bot: which burger?
user: cheese
bot: what size of pizza you want

as in actual conv when user says cheese which belongs to @pizza entity then it triggers the pizzaSelected intent instead of re-prompting the user for entering correct value.

Is there a way to handle this.


回答1:


If you are not using custom fulfilment based logic for slot filing then your burger_type entity (or whichever name you might have used for entity) must have cheese as a valid value.

I would recommend to go to entities and check the values of entity which you are using to store type of burger. Even if you have only the correct values there try reordering them and then save. This will force the bot to retrain as this is a machine learning model sometimes it might get optimized for the wrong output, if that is the case for you then try retraining it.



来源:https://stackoverflow.com/questions/62098316/slot-filling-triggers-different-intent-in-dialogflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!