3

Suppose we have 50 intents, few of them are closely related together but their functionality is different.

Is it possible to prompt the user with 4-5 matching intents and ask them which one they actually meant?

It is possible in MS Bot Framework, I want to know if its doable in Dialogflow or Amazon Lex in any way?

Nicolas R
  • 13,812
  • 2
  • 28
  • 57
sid8491
  • 6,622
  • 6
  • 38
  • 64
  • 1
    Amazon Lex doesn't have this as a native feature, but it may be possible through some creative usage of Lambda validation code hooks. Haven't tried it, but you may be able to point all of the potential matching intents to the same Lambda validation code hook and then use logic in your Lambda function to elicit the "best" intent. – Parrett Apps Apr 16 '18 at 19:51

2 Answers2

1

What you're looking to do is supported in a way with Dialogflow, but not directly. There is a thing known as Follow-up intents. These will only run when a user is currently in an intent. Like if you're looking for confirmation, you may create a primary intent when a follow-up intent that matches yes or no. This uses contexts.

In Dialogflow, you'd probably create a primary intent that matches all of the possible queries. Then you can respond with a set of possible matched intents.

Weather Intent

  • "What is the weather"
  • "Is it going to rain"
  • "Will it be sunny tomorrow"

Then you can respond with your possible follow-up intents.

  • "Do you want weather today, tomorrow, or next week

You'd create three follow-up intents with their own phrases that will only match if the user just entered the original intent.

Weather Today Intent

  • "today"

You can respond with something specifically for this.

Keep in mind that Dialogflow's machine learning is designed so that you don't have this ambiguity issue. Users should ideally just enter the text and it should be correctly matched. If you're facing ambiguity problems you can add additional training phrases for each intent.

You can also help guide users through conversation using quick replies.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • 1
    sorry this is not what i meant exactly. suppose user typed `what is the name` and there are multiple intents for `what is my name` and `what is owners name` and `what is name of indian captain` so it should return all the intents which are matching 90% or above. not just the best matched intent. or list of all intents with accuracy score like we get in `LUIS`. – sid8491 Aug 30 '18 at 12:06
  • You can get the score for matching a particular intent, but I don't think you get multiple matched intents – Nick Felker Aug 30 '18 at 17:57
0

Multiple intents are for a given prediction are not currently supported in DialogFlow, but there is an open feature request for this feature logged on Google's bug tracking system. If you think it would be useful, be sure to 'star' the issue so they know people want it.

Amazon Lex has recently introduced this feature. Check the 'alternativeIntents' object:

alternativeIntents One to four alternative intents that may be applicable to the user's intent.

Marc
  • 1,541
  • 2
  • 19
  • 29