Consider following sentences:
1) I want to watch movies watched by Srikanth but not by tarun
2) I want to watch movies of Christoper Nolan but not having Christian Bayle
3) I want watch movies watched by Srikanth but not liked by Tarun
The problem I am facing is -
Even though I can successfully define entities such as "not watched", "watched" , "not liked" , "having" , "not having" etc; etc;
Hence I will know what kind of action user is referring to.
I will also get to know names like Srikanth, Tarun, Nolan, Bayle etc;
But How do I establish Relationship between name and action. How do i know which action was related to which name.
I am not able to achieve this in LUIS / DIALOGFLOW.
What I feel is only way is to break statement into 2 distinct statements, How can we do that and is that a right approahc
We cannot directly assign multiple intents to the same utterance through LUIS. You can use NLTK along with LUIS to fix this issue as discussed here.
Another workaround is to create 2 apps with each intent and assign the same utterances and add the code which would differentiate the intent based on the keyword in the sentence.
Related
I am building a chatbot using dialogflow and I want that a user will be able to select multiple responses from Suggestions.
Is there any way to get it done using dialogflow fulfillment or something else? Or is there some other alternative to implement this?
I had the same issue, and my finding is that we can't select multiple suggestion chips.
but if you want to select multiple items from user in single intent then you can use "IS LIST" option in actions and parameters.
suppose you have an entity "fruits" having values {apple, orange, mango etc}
bot: what would you like to eat
user: I would like to have apple and mango
for this add training phrase "I would like to have apple and orange"
and in actions and parameters select "IS LIST" against "fruits" entity
Suggestion Chips are meant to be hints or ways to pivot the conversation.
Depending on your use case you can guide your user through different options. For example, if they are selecting a shirt, you can first ask for the color and then the size -- separating the different options to smaller subsets. A different option/example is for selecting music style (where one can choose one or several options) can be ask them to tell you the style of music they like (while providing 5 suggestion chips) and then in your response you confirm the styles and allow them to add more (while providing 4 suggestion chips of music styles and another that says "All done") --- I think I would also use this design to implement ranking of their preferred music.
For my project I need to trigger 2 entities by one word. I have two entities with list of restaurant types the restaurant_type_id and restaurant_type. In the responses I am using $restaurant_type, but I need also to trigger the id of the restaurant type that is inside restaurant_type_id.
In the example below you can see that only one of the entities is triggered.
Is there a way to do that or that is not possible? I have tried looking for more information, but couldn't find anything in the DialogFlow Docs.
One way of getting the id as well as the name is by asking the Dialogflow to send the original value along with the resolved one.
To do this, you can create one single entity like below,
Next in the intent section under the parameter, you can tell the Dialogflow to send both the original and resolved data.
Now you have both the id and name.
In order to work the above answer, you will have to follow this rule. Otherwise, it won't recognise.
I want to create an action that takes the name of a Movie or Tv show and returns some details about it.
The problem is that I need to add all the possible tv show names to an entity.
Even then there is the limit of 3000 for the maximum number of entities in an Entity. Is there a way around this problem?
Ideally I would like to give it some sample tv show names and when the user says a new tv show name(one that the entity doesn't contain), it is able to recognise it and pass it on to the intent.
You should create a custom entity, and train it with as many examples as you can. Additionally, mark the allowed automatic expansion, so that dialogflow will be able to recognize the names which you have not defined.
The problem could still be there, that dialogflow might recognize something as movie name which is not a movie name, for that you should have a validation function in your webhook code. If validation fails, you can prompt the user again for correct movie name.
Hi I am creating slot filling chatbot where I would like to ask as much open question as possible at the beginning to make my flow the most similar to the normal conversation.
How can I achieve such a thing in terms of intents. Should I create three separate intents for case 1,2 and 3 and adding context flows in terms of 2nd and 3rd? Please help
For a case like this, you can do them as a single simple Intent that has prompts for parameters/slots that aren't addressed by the user.
First, we'll need a simple vehicle Entity type. Something like this, perhaps:
Once we have that, we can create an Intent and give it a few sample phrases:
We then need to do a few additional things (which are illustrated in the picture by the two orange arrows):
We need to mark the parameters as Required.
We need to give some Prompts for each parameter
With these, the Intent won't be complete until the user has responded to each prompt to fill the parameters. Once the user has given all the required values, it will call your fulfillment.
I'm trying to make an agent that can give me details about movies.
For example, the user says "Tell me about (movie-name)", which sends a post request to my API with the (movie-name) which then returns the response.
However, I don't understand how to grab the movie name from the user's speech without creating a movieName entity with a list of all the movies out there. I just want to grab the next word the user says after "tell me about" and store it as a parameter. How do I go about achieving that?
Yes, you must create a movieName entity, but you do not need to create a list of all movies. Maybe you are experienced with Alexa which requires a list of suggested values, but in api.ai you don't need to do that.
I find that api.ai is not very good at figuring out which words are part of a free-form entity like movieName, but hopefully adding enough user expressions will help it with that.
edit: the entity I was thinking of is '#sys.any' but maybe it would be better to use a list of movie names with the 'automated expansion' feature. I haven't tried that, but it sounds like the way that Alexa's custom slots work, which is actually a lot more flexible (just using the list as a guideline) then people seem to think.