I am using LUIS in composer and I use a phrase like the below to give examples to the ML entity "Location".
What is the weather in the {# location = London}
Is there a way in composer to tell LUIS not to pick "moon" as a location in the utterance "what is the weather in the moon".
Related
I have trained a Rasa bot. I want to add new training phrases to an intent via code and trigger intent so that this new training phrases is available for next utterance. How do I do that?
Could not find any relevant reference in the Rasa documentation. In case of Rasa interactive learning, it seams it is a manual process where a human has to sit an train the model.
You cannot train your Rasa model dynamically. If you add new training examples to your NLU data, you need to retrain the model to have the model understand the new intents.
If you do interactive learning, you will generate new training data. That data can be used to re-train your model afterwards.
I think you can use an Interactive session with bot. By doing this you can train bot with some new utterance and new answers
I'm having a problem with Rasa_NLU giving me the wrong entity for an intent. An example is “How do I get to New York?” Where, I tagged the training data to name the entity “city”. In a different intent, it was tagged “destination”.
intent: check_weather
what is the weather in new york?
intent: get_directions
how do I get to new york?
I have a script that takes action on the intent returned and processes the entities. If I get back the get_directions intent, I’ll look in the json for the destination entity, but it has city instead. Using ner_crf, is there a way to de-emphasize entities in an intent, so that the classifier is biased to those that the intent was trained for? That is, the classifier would be weighted to giving a destination for get_directions, and a city for get_weather?
The typical answer I've found is to add more training examples. I'm up to 60 for each of the two intents I have, and it is still getting it wrong.
As of right now, you can only featurize/unfeaturize all entities for a certain intent. I can see that that's not really your use case since both intents require entities -- just different ones. There is currently a community PR open to add per-intent featurization of specific entities, so it will be available in the future.
I have a bot which uses LUIS and QnA Maker.
Now, I am able to send queries and get back response in my bot based on the search keyword. But in case my search keyword is used in multiple questions, QnA Maker just retrieves the first matching QnA pair.
Consider below QnA pair:
What is flexible working? Flexibility to work from home
How to avail flexible working? Get in touch with manager
If the user types the exact question and hits enter, the response would be the answer which matches the question. But, if the user types flexible working in this case the response would be just the first QnA answer. So in this case I would like retrieve both the questions and throw back to the user as a choice of questions to choose from.
I tried overriding the RespondFromQnAMakerResultAsync and also checked the QnA maker APIs. Unfortunately I didn't find any way to do this.
Any help on this please? Let me know if I can rephrase or clarify more on this.
in case my search keyword is used in multiple questions, the QnA maker just retrieves the first matching QnA pair
You can try to specify the top parameter for QnAMakerAttribute, which controls the number of answers to return.
The definition of QnAMakerAttribute:
public QnAMakerAttribute(string subscriptionKey, string knowledgebaseId, string defaultMessage = null, double scoreThreshold = 0.3, int top = 1);
In your QnaDialog, you can specify it like this:
public QnaDialog() : base(new QnAMakerService(new QnAMakerAttribute("{subscriptionKey_here}", "{knowledgebaseId_here}", "Sorry, I couldn't find an answer for that", 0.5, 5)))
{
}
Edit:
The above approach worked for me, it can promote questions and show the answer for selected question.
I have an app in LUIS with one intent "Help" (appart from None) and when I test it with utterances that my intent does not cover (e.g "Hi man"), LUIS resolves to the "Help" intent... I have no utterances in "None" intent...
What should I do? Should I add all the utterances I don't want to match "Help" intent in "None"?
Should I need to know everything a user can ask to my bot which is not related with "Help"?
For me, that's not make sense at all... and I think that is exactly how LUIS works...
Intent are the action which we define, None is predefined Intent which come along with every LUIS model that you create , coming back to your problem. You have only define one intent i.e "help" so whenever LUIS gets the any query it will show the highest scoring intent i.e. "help". whenever you create an intent make to sure to save at least 5-6 co-related utterance, so that LUIS can generate a pattern out of it 'more you define co-related utterance better accuracy of result you will get'
if you want LUIS to respond on "HI man" create a new intent 'greet' save some utterance let LUIS do the remaining task, lastly about None intent If any user input 'asdsafdasdsfdsf' string like this. Your bot should be able to handle it respond accordingly like 'this asdsafdasdsfdsf is irrelevant to me' in simple term 'any irregular action that user want bot to perform come under none intent' i hope this will help
You can check the score of the Luis intent and then accordingly send the default response from code. For the utterances which are configured will have a greater score. Also, Luis app shud be balanced in terms of utterances configured as there is not a defined way that u can point utterances to None intent. Please check this link for best practices.
https://learn.microsoft.com/en-us/azure/cognitive-services/luis/luis-concept-best-practices. Also to highlight Luis does not work in terms of keyword matching to the utterances which you have configured. It works in terms of data you add in Luis in respective intents.
I am developping a bot using the LUIS API by Microsoft. This bot must understand queries related to shopping like "I want potatoes".
The only thing my application is struggling with is detecting intents from composite terms:
For the query "I want chopped steak", LUIS will detect chopped as an intent but not "chopped steak". I tried creating a productName phrase list feature and setting different composite terms including "chopped steak" but this doesn't seem to work.
What could I do to achieve that purpose ?