Dialogflow automatically goes to Default Welcome I

2019-08-16 23:51发布

问题:

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.