Why dialogflow cant recognize CNY? - dialogflow-es

enter image description here
Why dialogflow cant recognize CNY?

I don't know Chinese language, I dare giving the following answer based on my observations.
In the image, a single training phrase has two parameters with same name with two different values for #sys.currency-name, what is strange to me is that both parameters are highlighted with purple. I think a parameter name was changed to have the same name than the other (which is not correct due to they have different values). By having the same parameter name with two different values I think Dialogflow will decide which one to return or combine.
Please try to change the parameter names with currency-name-1 and currency-name-2. Most probably Dialogflow will return each value (USD and CNY) in a different parameter. I think this should fix the behavior because #sys.currency-name is an ISO 4217 string where CNY is already included.

Related

Problem using .recent attribute of sys.date parameter in Dialogflow

I have question regarding Intent configuration in Dialogflow.
I've found information on StackOverflow regarding ".recent" attribute of sys.date parameter.
The idea is that using value from that attribute gives a date that happened in the past (i.e. "Monday" will be translated to last Monday, not next Monday).
I've encountered a problem when using it with required parameters.
The result in date interpretation differs depending on the input:
has the user provided all required parameters at once
user has been prompted to deliver missing ones.
Please find example below - notice different dates returned for the same input
Intent configuration
Behavior
Questions:
Do you know what may be the problem here? It seems like a bug for me
I've searched and I have not been able to find documentation on
Dialogflow's or Google's sites regarding ".recent" - do you know
where I can find it?

Replace Parameter Value in Dialogflow

Currently, I am training my agent and I am wondering if someone asks a question is it possible to change a parameter value to what you know it would be. So for example if someone asks do you have any beers can I can change the parameter to be beer instead of beers. Another example is if someone asks do you have any Johnny can I change the parameter to be Johnnie Walker instead of Johnny
If this can be done how can I do it?
The easiest way to do this is by creating developer entities for the different beverage types. This way you would define one "standard" term, and then add the other terms that alias to it.
In a developer entity, always the highlighted value in the sample image is the value identified.
In your case, you can have the word "beer" and "beer","beers" as synonyms of it. So that when a user says beers/beer the identified keyword will be "beer".

Dialog flow having trouble matching parameters

I am having an issue where dialogflow does a really bad job of matching paramters.
At first I was trying to use specific fields types like #sys.geo-city-us and #sys.given-name, but when I entered a name like Jones it matched it as a city even though I was answering the question about my name.
In the above example I answered the name question and it matched it to the company even though name and company are #sys.any entities. I don't understand why in response to a question for a specific parameter with the entity type of any it fails to match and tries to plug it into another parameter value.
Is there something I am missing about how parameters are matched?
I think this weirdness may be related to doing both #sys.any and setting is list. I ended up doing #sys.any without is list set for the name and then parsing out the names in the code. Then I left city as #sys.geo-city-us. This seems to work for my specific case but I would caution others that multiple #sys.any fields can cause some weirdness, especially with is list set.
I wish there was a setting that when I ask for X whatever the user relies is taken in as X, because that is not what #sys.any is doing.

New to DialogFlow, proper values won't appear when referencing them

I'm working my way through the tutorial and I am pretty sure I'm following it closely but it doesn't seem to be working.
I think I've successfully connected the value with the entity, then referenced said value in the response. But it seems like the entity is not responding.
You don't show the text response, but it seems unlikely this will do what you think it does.
As you've written it, the Intent will match if a user says something like "What is the February 10th"? Which doesn't make much sense.
Specifying a parameter against the sample phrase means that you expect the user to say something that matches that parameter in that place. In this case, you're saying the parameter is of type #sys.date, so you're expecting them to say a date of some sort (there are a variety of possible things that will match).
If you want the user to say "What is the date?" as a phrase, then the "date" part shouldn't be associated with a parameter. You'll then need to fill in some value for the reply - likely through a webhook.

Can I use parameters with Twist concepts?

The Twist documentation for extracting concepts shows how multiple steps can be grouped into one step that contains those steps. For instance, the following eight fixtures
1. Start at the Maintain product catalog page.
2. The page title should be “Joe’s musical —Maintain Product Catalog.”
3. Click the Add New Instrument button.
4. The page title should be “Joe’s musical—Add New Musical Instrument.”
5. Enter text “Guitar” into the Instrument field.
6. Select “Slide” from the Type selection list.
7. Select “Dobro” from the Brand selection list.
8. Click the Save button.
Can be condensed into one concept:
1. Add a New Musical Instrument “Guitar” of type “Slide” and brand “Dobro”
However, the tutorial doesn't say if it's possible to use this concept with other parameters (perhaps with "Drum" instead of "Guitar"). However, it does clearly say that parameters in the concept name should be surrounded by quotes, but they also should match the parameter name, so it's not clear if it's possible.
So can I use parameters with Twist concepts?
Yes! The documentation is really crummy about making this clear, but it is absolutely possible.
If you extracted a concept in the way that they described in the tutorial you referenced and others, then the fixture Add a New Musical Instrument “Guitar” of type “Slide” and brand “Dobro” actually contains three parameters named Guitar, Slide, and Dobro. What makes this so confusing is in each scenario you can change the value of each parameter to whatever you like (perhaps "Drum", "Snare", "Yamaha"), but under the hood, the variables are still called by their original names (thus Guitar=Drum, etc.) and these original names will appear as default values whenever you add the concept to a scenario.
To eliminate confusion, I recommend changing these default names. In this case, it might be Add a New Musical Instrument “Instrument” of type “Type” and brand “Brand”. Bizarrely, you can't rename the parameters via "Rephrase the Open Concept" because you run into a catch-22 situation. You can't change the name of the concept because it doesn't match the usage in the fixture. And you can't rename the fixtures because the parameters are bound to the concept name. So I recommend just opening it up in the text editor and making the change there.
So bottom line, the examples make it seem like you can't use parameters because the parameters wind up being named after whatever value you inputted. I recommend changing the default parameter names, but you have to do it in the text editor because Twist won't let you.

Resources