dialogFlow #sys.number-sequence only works for English - dialogflow-es

I'm building an Action for Google Assistant using dialogFlow, and it has to support multiple languages(EN, NL, FR).
I have a PinIntent, where I want to use #sys.number-sequence entity in my utterance.
It works on EN version, but when I use the same entity for NL or FR I get the following error and can't save the intent.
ERROR MESSAGE:
I don't want to use #sys.number, if the pincode is 0123 it will return 123, which will not match in my webhook.
I also don't want to use #sys.any, this will basically listen to all input...
Is there a tutorial where I can create a custom entity based on other entities?
eg. #pincode, which will map to 0000, one two three four, 1 2 3 4, one 2 34, thousandtwohunderdthirtyfour, ...
Thanks

According to the Dialogflow system entities documentation, #sys.number-sequence currently isn't available in NL or FR. Regarding this question:
Is there a tutorial where I can create a custom entity based on other entities? eg. #pincode, which will map to 0000, one two three four, 1 2 3 4, one 2 34, thousandtwohunderdthirtyfour,
This is called a composite entity.

Related

Select multiple options from suggestion in dialogflow

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.

Recognize 'a' in a sentence and indicate as 1 #sys.number in Dialogflow

I would like Dialogflow to detect a in a sentence and give it a number = 1.
Example: I would like to have a chicken rice.
Dialogflow should detect as:
'a' = #sys.number, Resolved value : one or 1
"chicken rice" = #delivery-product, resolved value : chicken rice
I already have an entity to detect the product, a intent to detect single order or multiple order,
i.e. "I want 2 chicken rice and 2 coffee" .
this would return me both numbers and products.
However I just can't get Dialogflow to detect:
I want a coffee
I want 2 chicken rice and a coffee.
Anyone have any recommendation to tackle this issue?
Thank you!
Create a new custom entity with the synonym of "1" as "a" and then add that custom entity in a new custom entity with "#sys.number". Do not add synonyms for this entity. Use the second custom entity in your intent training phrases.

How To Handle Homonyms

I am in the process of creating an agent that will handle call requests via speech. For example, here is what the flow looks like:
1). User says: I need to call John
2). The agent grabs John as the parameter and via fulfillment it queries a database for all the entries that contains John in a certain field. If there is more than one John, a follow up intent is triggered and sends a response asking which John is the desired one:
Agent says: There are several Johns, who do you wish to call? John Test, John Smith, John Pleis or John Schmidt?.
3). The user wants to get in touch with John Pleis.
User says: John Pleis
Here is where I'm having problem. Dialogflow is recognizing John Please, instead of John Pleis. How can I handle this?
Update
Here is how the intent looks:
-- INITIAL INTENT --
-- FOLLOW UP INTENT --
You should be able to address these by using your own Entity Types for the names instead of using the System Entity Type of #sys:any. This lets you specify the possible names that would be accepted and Dialogflow can work with the assistant to better understand what the user might be saying. This isn't perfect, but can improve phrase detection, and can provide you with some tools to help it out to make detection even better.
If your directory is relatively small (a few hundred people, perhaps), you can simply create Developer Entity Types up front for all the names. (There is even an API for managing these Entity Types, so you can automate it.)
If you have too many names, you may want to just create Developer Entity Types for the possible first names (or use the System Entity Type of #sys:given-name if that is suitable enough) and then, as part of your fulfillment webhook, populate a Session Entity Type with the possible names that match.
In either of these cases, you can also use entity aliases to help improve matching. So if you see that "John Please" is still matching, then you can set this up as an alias for "John Piels" and Dialogflow will report this as "John Piels" for that Entity.

Complex Statements Intent Classification

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.

LUIS does not recognize names with spaces

So I got a bot built with Microsoft Bot Framework and it's using the LUIS API for text recognition. With this bot, I'm able to ask about information about different devices that I got in my backend. They got names like Desk, Desk 2 and Phone Booth 4. The first and second name works just fine but whenever I send a name that contains 2 spaces or more, LUIS will fail to recognize it. I have added all the names to a feature list on LUIS but it doesn't seem to do anything. When I'm in the bot code executes the method for that intent, the entity is just null whenever I send this kind of names. Any idea how I might solve this? As I described, names with just one space like Desk 2 works just fine. Maybe there is a way to save multiple words as an entity inside LUIS?
In the image below, the top entry is "show me phone booth 4" and the bottom one "show me desk 2".
It'll take a little leg work, but have you tried updating your model programmatically?
On the LUIS API reference, you can label individual utterances or do it in batches. The benefit of doing it this way is that you can select what should be recognized as an entity based on index position.
Example:
{
"text": "Book me a flight from Cairo to Redmond next Thursday",
"intentName": "BookFlight",
"entityLabels":
[
{
"entityName": "Location::From",
"startCharIndex": 22,
"endCharIndex": 26
},
{
"entityName": "Location::To",
"startCharIndex": 31,
"endCharIndex": 37
}
]
}
I admit I haven't attempted to do this before, but I do not see how labeling/training this way would logically fail.
One thing I do note about your entities is that they're composed of an item and also a number. You could throw them into a composite entity; but in this case doing it the way I mentioned above is a good way to do what you're looking for.
That said, if you plan on using the office-furniture-pieces(?) as entities for a separate intent, say, 'PurchaseNewOfficePieces', it might pay to create use a composite entity for 'Desk 2' and 'Phone Booth 4'.

Resources