Dialogflow automatically goes to Default Welcome Intent after follow up despite telling it not to

岁酱吖の 提交于 2019-12-11 16:23:34

问题


How do I ensure that when the user replies to the question:

"Are you wanting a happy, sad, angry or confident song?"

with "Angry", that the agent takes the user back to the "angry" intent (it's grandparent's brother) and not the default welcome intent?

Here is my layout: DefaultWelcomeIntent-->-Happy-->-Happy-noIncorrectEmotion (back to DefaultWelcomeIntent) The user replies "happy" to the original "how are you feeling?" question

|_____The user replies "no" to the emotion checker intent (saying "I have 
      detected that you are "feeling happy, is this correct?"
      |_____The user replies that they are angry to the follow up of this 
            which asks "Are you wanting a happy, sad, angry or confident 
            song?"  

Actual response: goes back to default welcome intent Intended response: goes to Angry intent

Intended response: goes to Angry intent I have set the output contexts to be going to angry, sad and confident (although I don't think this does much)

I have also tried changing the intended intent on the Training tab of dialogflow, but this does not do anything either...

Here is the dialog between the user and agent:


回答1:


My understanding is that follow-up intents form a tree (actually a DAG - directed acyclic graph) so they cannot by definition have loops. Therefore you can't say, "go to my grandparent's intent" in dialogflow.

However there is an out. If you send the request to a webhook, the webhook can reply saying which context and intent to go to. And it can go anywhere, which should allow you to build a loop.




回答2:


Setting output contexts to be going to angry-followup, sad-followup and confident-followup doesn't seem right. None of those follow-up intents have training about "angry" "happy" "sad" so they won't be understood. I would change the output intent first to see how it behaves.




回答3:


I solved this by ensuring that the input contexts for the angry intent matched exactly the output contents for the angry checker intent. I found that dialogflow is extremely sensitive to the input and output contexts so one must ensure that they follow each other in a tree like fashion. And as the answer from btliiy says, I used the webhook to do the linking parts backwards up the tree when necessary. Thanks for your help!



来源:https://stackoverflow.com/questions/57444185/dialogflow-automatically-goes-to-default-welcome-intent-after-follow-up-despite

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