0
votes

I have an issue where dialogflow seems to match the wrong intent once the user has selected an item from the google assistant option (list) response. I am using a webhook (.NET application) to handle requests and send responses.

What the flow looks like:

  • user makes a phrase to match the intent (dictate report "text" for "company")
  • back-end receives request and searches for the company
  • back-end finds out there are more companies that match the criteria so it sends a list response
  • user selects list item of choice (company)
  • back-end receives the correct list item (company)

The conversation flow as explained above goes well UNTIL the user selects the desired item from the list. Then for some reason the request that my back-end receives is coming from a different intent that ALSO has an assistant option event.

I have 2 similar intents:

  • DictateReport
  • DictateTodo

Both intents have a couple of training phrases, three of the same parameters and an assistant_option event.

The correct intent is matched when I use the appropriate training phrase (I know that because my back-end receives the right request), yet once the back-end returns a list response and the user selects an item from the list, the incoming request is always assigned that the request is coming from the "dictate todo for company" intent INSTEAD of the "dictate report for company" intent.

So it seems like dialogflow does not have enough information to determine for what intent the option_list response is. What am I missing here?

2

2 Answers

1
votes

Events like actions_intent_OPTION are matched according to context. If you want to match the actions_intent_OPTION event to a specific point in the flow, give the two intents (the one prompting the user to select an option and the one receiving the option) a context specificity (e.g. a unique context or a unique combination of contexts) that is not shared with other intents. Do the same with the other prompt that also is associated with an OPTION event.

https://cloud.google.com/dialogflow/docs/contexts-overview

1
votes

Like Rose B just mentioned my issue was indeed fixed due to providing the intent with the appropriate context. This is the way dialogflow knows what intent the OPTION event should match.

Thanks a lot for the help!