We are developing Library BOT using Microsoft BOT.
Here We have created one Intent BookSearch, and Entity BookName, BookAuthor.
We trained LUIS with Simple question,but he works only matching questions.
Ex. I trained LUIS like "I need book", so its works properly
But with Same question we write "I need a book", its doesn't understand to match with book intent.
Can anyone help us here? Like that so many scenario where we found LUIS only works with exact matching questions.
One More Problem, We have Book name, with Three Work, unable to tag three words as a bookname entity.
It sounds like your model just needs more training with a variety of sentence structures.
LUIS will match the exact intent when it's been trained but needs more examples to get better with novel utterances. So "I need book" vs "I need a book" should be pretty easy for it to learn with more properly labeled utterances.
As for the title with three words, highlighting them all by clicking and dragging across all three is possible.
You have to write more possible questions which user can ask regarding book?
Let me give an example to explain this...
I need book
I need a book
What latest book you have?
Can you recommend a book to me
I am looking for book
I am looking for a book
In above examples - Intent should be - FindBook
I am looking for C# book?
In above example - Intent should be - FindBook, here user has mentioned the Subject (C#) as well. Subject will be entity.
I am looking for C# book written by Joseph Albahari, Ben Albahari
In above example - Intent Should be one - FindBook, here user has mentioned the Subject and Writer.
Subject and Writer will be entity.
You have to train your model and feed more possible questions, then only LUIS will work perfectly.
You can highlight full sentence as well.
Related
What is the best practice approach to handle typos / misspelling on LUIS List Entities?
I have intents on LUIS which use a list entity (specifically Company Department - HR, Finance, etc). It is common for users to misspell this when putting forward their utterance. LUIS expects an exact match, it doesn't do a "smart" match, and therefore doesn't pick up the misspelled entity.
a) Using bing spell check is not necessarily a good solution. e.g. Certain departments are acronyms such as VRPA - and bing wont correct a typo there.
b) When I used LUIS a year ago, I would pre-process the utterance and use a Levenshtein distance algorithm to fix typos on list entities before feeding them to LUIS.
I would imagine that by now LUIS has some better out of the box way of handling this very common use case.
I'd appreciate input on what the best practice approach is to handle this.
#acambitsis and I exchanged messages via his UserVoice ticket, but I'm going to post the answer here for others.
A combination of Bing and Simple Entities might be what you're looking for, then (they're machine-learned).
I was able to accomplish something close and attached images.
In entities, I created a Simple entity with the role, VRPA. In intents, I created the Show Me intent and added sample utterances "Show me the VRPA" and "Show me the VPRA". I clicked on V**A and selected the Simple Entity:VRPA role. After training, I tried "show me the varp" and it correctly guessed "varp" was the "Simple:VRPA" entity.
You may also find RegEx entities useful. For acronyms, you could do something like: /[vrpa]/i and then any combination of VRPA/VPRA/VARP/ARVP would match.
I highly recommend reading through the Entity Types and Improve App Performance to see if anything jumps out to solve your particular issues.
This may not do exactly what you're looking for. If not, I'd recommend implementing a fuzzy-matching algo of your choice.
entities
intents
I am a very new to LUIS. I am not able to use phrase list and pattern. Since I could not find any resource (Except Microsoft document), where I can get more details about it neither I could find any reference of demo.
It would be nice if any one can explain a bit in layman language in which scenario we can use both.
One more thing phrase list are not listing with entity while we are working on Utterance in intent creation
Since I could not find any resource (Except Microsoft document), where
I can get more details about it neither I could find any reference of
demo.
You can find more examples from this StackOverFlow answers about using Patterns feature and Phrase Lists other than Microsoft documentation.
It would be nice if any one can explain a bit in layman language in
which scenario we can use both.
In short Patterns are used for labeling entities which follow a specific pattern without providing more examples whereas Phrase Lists are used for providing synonyms of the utterances.
One more thing phrase list are not listing with entity while we are
working on Utterance in intent creation
Please read more about Phrase Lists about how to use it and how it works. If you still have issues send the snapshot with more details to Luisuservoice#microsoft.com.
I was trying to understand the examples given in RASA core git. I have seen an example story
greet
utter_ask_howcanhelp
inform{"cuisine": "italian"}
utter_on_it
utter_ask_location
But I didn't understand what {"cuisine": "italian"} is. Whether it is the default value of the slot or user has to provide italian in the input string. Can anybody help me to understand how to write stories in RASA core
Regards
One of the most powerful features of any dialog flow is stories. This is how you are telling the model what are the possible flows of conversational dialog.
In the questions you have asked about. Clearly the Italian is not the default value.
inform{"cuisine": "italian"}
Here you are telling the machine learning engine that you are looking for an Intent 'Inform' which will have a slot named cuisine. Here Italian is an example. At the runtime, it can be anything. You can also have another story line where Intent inform without cuisine slot. That story might ask for cuisine in the next dialog.
Defining the story lines, should not be confused with programming language. It is just an indication for Machine learning algorithms.
More details about using slots can be found here and here
This story describes how the dialogue model would behave in the case the user said something like "I want to eat Italian food". As you note, the slot "cuisine" is set to the value "italian".
In the restaurant example, the cuisine slot is a simple TextSlot. This means that the dialogue model only gets to see if the slot has a value or not. The behaviour would be exactly the same if the user had asked for chinese food, thai food, or anything else.
If you want the value of a slot to influence the dialogue going forward, you can use a different slot type, e.g. a categorical slot
I trained my luis model to recognize an intent called "getDefinition" with example utterances such as: "What does BLANK mean" or "Can you explain BLANK to me?". It recognizes the intent correctly. I also added an entity called "topic" and trained it to recognize what topic the user is asking about. The problem is that luis only recognizes the exact topic the user is asking about if I used that specific term in one of the utterances before.
Does this mean I have to train it with all the possible terms a user can ask about or is there some way to have it recognize it anyway?
For example when I ask "What does blockchain mean" it correctly identifies the entity (topic) as blockchain because the word blockchain is in the utterance. But if I ask the same version of the question about another topic such as "what does mining mean", it doesn't recognize that as the entity.
Using a list or phrase list doesn't seem to be solving the problem. I want to eventually have thousands of topics the bot responds to, entering each topic in a list is tedious and inconvenient. Is there a way LUIS can recognize that its a topic just from the context?
What is the best way to go about this?
Same Doubt, Bit Modified. Sorry for Reposting this here.
At the moment LUIS cannot extract an entity just based on the the intent. Phrase lists will help LUIS extract tokens that don't have explicit training data. For example training LUIS with the utterance "What does blockchain mean?" does not mean that it will extract "mining" from "What does mining mean?" unless "mining" was either included in a phrase list, or a list entity. In addition to what Nicolas R said about tagging different values, another thing to consider is that using words not commonly found (or found at all) in the corpuses that LUIS uses for each culture will likely result in LUIS not extracting the words without assistance (either via Phrase list or list entity).
For example, if you created a LUIS application that dealt with units of measurement, while you might not be required to train it with units such as inch, meter, kilometer or ounce; you would probably have to train it with words like milliradian, parsec, and even other cultural spellings like kilometre. Otherwise these words would most likely not be extracted by LUIS. If a user provided the tokens "Planck unit", LUIS might provide a faulty extraction where it returns "unit" as the measurement entity instead of "Planck unit".
I trained my luis model to recognize an intent called "requestDefintion" with example utterances such as: "What does BLANK mean" or "Can you explain BLANK to me?".
It recognizes the intent correctly. I also added an entity called "topic" and trained it to recognize what topic the user is asking about.
The problem is that luis only recognizes the exact topic the user is asking about if I used that specific term in one of the utterances before.
Does this mean I have to train it with all the possible terms a user can ask about or is there some way to have it recognize it anyway?
For example when I ask "What does blockchain mean" it correctly identifies the entity (topic) as blockchain because the word blockchain is in the utterance. But if I ask the same version of the question about another topic such as "what does mining mean", it doesn't recognize that as the entity.
What is the best way to go about this?
Does this mean I have to train it with all the possible terms a user can ask about or is there some way to have it recognize it anyway?
You can try to use phrase list features, which can help LUIS recognize intents and entities. For example, you can create a phrase list named " topic" that contains the values BLANK, blockchain and mining etc.
My test with utterance what does mining mean:
Using phrase list, the score is 0.94
Not using phrase list, the score is 0.77
Note: If define too many intents, it becomes harder for LUIS to classify utterances correctly, please do not define too many intents.