botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[Question] Is there a way to assign a single utterance to 2 different LUIS intents? i have a same query for 2 different flow of conversation but both have different response. so i am not able to create a proper flow of conversation using LUIS for MS chat bot.

Open NehaShaikh786 opened this issue 9 years ago • 7 comments

System Information (Required)

  • SDK Language: C#
  • SDK Version: 4.6
  • Development Environment: OTHER

Issue Description

i am using LUIS intents to get a respective response through C# code. I have some scenario where i want different response as per my flow for same utterance hit. Also is there any way from which we can get a fall back intent as its possible in API.AI, so that i can make a flow of conversation by using LUIS for MSBOT.

Code Example

Expected Behavior

I want to build a conversation in a flow for same questions which occur in another flow.

Actual Results

i am getting same answer for same question, i am trying to make a flow so that i can get different answers for similar question.

NehaShaikh786 avatar Jul 06 '17 05:07 NehaShaikh786

@NehaShaikh786

It might be possible to assign the same utterance to two different intents via the API, but this isn't possible via the portal.

When you get the response from LUIS, it'll provide the "topScoringIntent" along with a list of "intents" that are arranged in descending score order.

If the wrong intent has the leading score, then you'll have to retrain the model with this utterance to mark it with the correct intent.

sayyednazeer avatar Jul 06 '17 06:07 sayyednazeer

@sayyednazeer hi thanks for you response, can you give example of LUIS API, if possible? my problem is- i have intent named as "moisturizer" and its utterance is "do you have moisturizer" but when i retrain the model and type "do you have abcd" it still hit the moisturizer intent, which i don't expect. I want this utterance to hit to "None" intent. My motive is- I have huge data in my model, after hitting to top score intent i am using dialog for further conversation (also adding to this do you have another solution except formflow and dialog?). So i dont want my dialog to initiate when user enters the partial utterance as mentioned above. please provide some solution to this.

NehaShaikh786 avatar Jul 11 '17 12:07 NehaShaikh786

If I understand correctly you want the following in terms of intents and utterances:

"do you have moisturizer" --> Mosturizer Intent "do you have [anything but mosturizer]" --> None Intent

You could accomplish this by wrapping the word "mosturizer" in an entity. And then map the Utterance that does not have that particular entity to None.

megancooper avatar Jul 12 '17 19:07 megancooper

@NehaShaikh786

just map the... do you have [any text] to None Intent Train your luis from https://www.luis.ai/ Everything will work perfectly

If you face any such case then just go the the LUIS dashboard and map that utterance with the intent you want and train it. After that luis will handle it and will start pointing to the correct intent.

sayyednazeer avatar Jul 13 '17 05:07 sayyednazeer

hi @sayyednazeer @megancooper @nwhitmont Thanks for your response, i have used phrase list feature so that i can give required words in luis. But now i have an issue of context handling. Please tell me by using luis how can i make a context flow. For e.g- if i have two flow of conversation and the ans of same questions are different then how can i manage it if i'm going in first flow then it should give the answer of first flow (Like-Ques-"Do you have daily cream?" and Ans-"what is your skin concern" ) and if i'm in second flow then it should give the answer of second flow(Like Ques-"Do you have daily cream?" and Ans-"please mention its for face or forehead?"). I want such context handling from Language understanding only. I am restricted to use form flow because its something static. i want it to handle by language understanding. For e.g-This thing can be done in api.ai by using context and fall back intent. please give me answer with example.

NehaShaikh786 avatar Jul 14 '17 14:07 NehaShaikh786

@NehaShaikh786, did you find a solution for this question?

stevengum avatar Sep 22 '17 16:09 stevengum

Hoping that issue has been resolved, closing it. Feel free to reopen if any questions.

fanidamj-zz avatar Oct 19 '17 19:10 fanidamj-zz