Why does the “Intention Priority” not work?

2019-09-01 00:09发布

问题:

Docs: https://dialogflow.com/docs/intents

My example: https://ufile.io/tds8e (for restore)

It primarily consists of a welcome intent that asks a question, and two followup intents.

The three relevant intents look like this:

Desired scenario:

  • I'm ready. Ask your questions
  • I don't know
  • Ok, this is a little hint: TRIangle
  • I don't know
  • Oh, you are hopeless. Three, three angles, stupid man.

Now the following happens:

  • I'm ready. Ask your questions
  • I don't know
  • Ok, this is a little hint: TRIangle
  • I don't know
  • Ok, this is a little hint: TRIangle

What am I doing wrong?

回答1:

The problem is that you're not using Intent priority and Followup Intents correctly.

Priority should rarely be used - its purpose is to help the system disambiguate between two different Intents that may both match certain user inputs and to make it clear which of the two should be picked in those cases. It is not meant to say "use this Intent first, and then use this Intent".

Similarly, the Followup Intents are meant to indicate which Intents are the expected ones to use immediately after the base Intent. You're saying that there are two possible Intents to use "immediately" after, but both of them have the same possible value ("I don't know"). If you really wanted to use Followup Intents, then you would want to have the second Followup Intent as a followup to the first Followup Intent (since you want it considered only after the first one, not the base Intent).

Additionally, you probably don't want to use a Custom Followup Intent in this case (unless you really want to respond specifically to "I don't know"). In each case, it might make more sense to have a Custom Followup Intent for the actual answer, and then a Fallback Followup Intent that would handle anything else the user might say (from "I don't know" to the wrong answer).