Replace Parameter Value in Dialogflow - dialogflow-es

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".

Related

Why dialogflow cant recognize CNY?

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.

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.

Dialogflow: How do I get sys.boolean?

I would like to add training phrases like
Yes
I would love to
No
No, thanks
and extract a boolean var $extraCheese containing True or False which I can use later. If I was expecting a color, I would do $dressColor and #sys.color, but then I don't find #sys.boolean
How do I do this?
It is, indeed, baffling that Dialogflow doesn't offer this natively. They offer this as an option for a Followup Intent, if that is suitable for you, but not as a System Entity.
Fortunately, it is fairly easy for you to make a Boolean Entity yourself.
Click on the + sign next to the Entity menu option on the left.
Set the name for the Entity: such as Boolean.
Add the value for an entity (true for example) which is the text value your webhook will be sent. You then also add aliases for that value. This needs to include the value itelf (true, again), but also anything else the user might say to represent this value (yes, sure, etc).
Then repeat this for other values you may want.
When you're done, you can click Save and then use this entity in your sample phrases just like the built-in entities.

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.

Designing a one EVERYTHING search box (date+address+keywords)

I'm storing information about local "events". They are described by 3 things - address, date, keywords(tags). I want to have only one search box for at least address and keywords. The date might go to a separate field. I'm assuming that most people will search for events that are taking place "today" so this filter won't get that much traffic.
I need those addresses to be correct (because I'm geocoding them afterwards) so I need to validate them before submitting the form and display a list of "did you mean" if a user made a typo there. I can't do life search here. I can do a live search on keywords. Keep in mind that a user can make a typo there too and I want to catch that.
Is there a clever way to design the input's parser in this case to guess which is supposed to be address and which keywords?
OR
Is there a way to actually parse it as user is entering his query? Maybe I should show autocomplete hints for keywords, after 3 first characters are entered, and if user denies to use them then to assume that it's a part of an address he's typing.
What do You think?
Take a look at Document Cloud's Visual search
http://documentcloud.github.com/visualsearch/#demo

Resources