Dialogflow does not evaluate parameters to its reference value - dialogflow-es

I have the following custom entity named 'department'. The entity defines like below:
department [Define synonyms - checked]:
appliances| stove, washer, appliance has, appliance part, appliances, appliances department.
An intent uses this entity type (department) in training phrases. ML is enabled for the corresponding intent.
The issue:
when in the DF console I enter 'appliances department', DF does not evaluate the value as 'appliances' and set it to be equals to original value (appliances department). If I use other synonyms, the value is evaluated correctly.
Could you please help me to resolve this case.
Thank you in advance!

I have reproduced the entity, and it is working for me.
I believe that maybe Dialog Flow is seeing the synonym ‘appliances department’ as redundant since the value is ‘appliances’ and it is contained in the synonym list, as well.
Also, there is a possibility that the same value is being overlapped by other entities.

Related

Action and parameters in dialogeflow

When I created A Parameter and I assigned it to te entity called #sys.unit-information-name,
I keep getting this warning: *The annotated text 'diabetes' in training phrase 'show me results on diabetes' does not correspond to entity type '#sys.unit-information-name'. And as a result my chatbot does not give me the right result, basically it will just keep asking the question under the Prompts under the Action and parameters.
If I remove this parameter it works. But I want to use the parameter & Entity
Any Help
Thanks
The problem you are facing is because you are explicitly creating a parameter and adding the system entity #sys.unit-information-name. This entity is used to refer to information about units as per system Entities documentation.
Since you are referring to a disease “diabetes” as per your expression “show me results on diabetes”, this entity cannot be used to map diabetes or any other disease also. There is no system Entities for Diseases, so it's better that we create a custom entity defining most of the disease names.
When giving the training Phrases if the word matches with values defined in entity, then entity mapping for that word will be done and the response will be generated.

How do I create a Dialogflow custom entity that works like #sys.airport?

Since #sys.airport only exists for the default English locale, I want to create a custom entity that emulates it for other locales.
From what I've read here, you can put subentity types into the value fields, say, the system entity #sys.geo-city:city and a custom entity #usr.iata-code:iata, and it will match either one or the other.
But I don't understand how you would tell Dialogflow which city and which IATA code go together, so that Dialogflow (ES) would know to send the complete object {"city":"Amsterdam", "iata": "AMS"} to the webhook after matching either "Amsterdam" or "AMS", as it does happen with #sys.airport.
Thanks for any input!
It will be difficult to create a custom entity that works just like #sys.airport. The #sys entities are special and can do somethings custom entities can't, for instance, pairing values together.
As you pointed out, you can put multiple entities together in one single entity by using Composite Entities, but the only thing this does is allow you to recognize two values made up from other #sys or custom entities in a single entity. It doesn't give you the option to create pairs between the values of the entities.
If you would want to create something like this, you would need some code that does a look up in a dictionary or list. So when "AMS" is matched, the code fills in the missing property "Amsterdam" or vice versa.

How do i fetch the exact word that is searched, instead of its synonym in DialogFlow (Formerly, API.ai)

I'm using dialogflow to let users query for keywords of my product and give them the value of those specific keywords.
But the problem is, when user's search for the synonyms of those keywords, which are already defined in my entity list.
Its HTTP call, returns me the root word, and not the synonym due to which I am not able to find the dropped words.
How do I retrieve the exact word which was fetched?
Please look at the screenshots below for better understanding
Look at the KPIs, as it fetched "Death Rate"
Look at parameters that are fetched, under KPIs, it is fetched as "Mortality"
Screenshot of my entities, Mortality has a synonym "Death Rate"
I need to fetch the exact keyword that is entered
I know, I can put each word in entities, with synonyms apart, but it is too vague for large amount of data. As there is restrictions in number of entities too
To fetch the keywords you just use your returned entities ($entity_name). To fetch the exact synonym matched you use $entity_name.original. What you see at the training phrases is the resolved value but if you check the JSON (from the diagnostic info, bottom right corner, you'll see that the entity that returns is the one defined.
following you example, my entity is named Mortality and one of the synonyms is 'death rate'. You can see the difference between the resolved value and the actual entity name being returned

Drop down menu for String values in Hybris Management Console

I have a requirement to display a drop down menu for a String type in Hybris Management Console, restricting the value to some specific values.
As suggested in several forums, I tried to create this entry as an enumeration type but characters like '-' are to be allowed in the enumeration values, as this column receives some specific values which comprise of '-'.
How do I solve this issue?
The people advising you probably didn't understand your requirements. As such, an enumeration type is clearly not appropriate in this case. Consider the alternatives. Is there a Map Type available? What other type might allow you to achieve your goal?
Actually, you could use the hybris Enumeration. In hybris Enum Types have a code and a name. The code is the unique representation for this enum and cannot contain a "-". The name however is a localized representation of that value and can include every character your database is able to store. Have a look here:
https://help.hybris.com/6.5.0/hcd/8c895989866910148d6a802f06651702.html
Additionally, hybris enables you to dynamically create new enumeration values, which is kind of nice.

Maximo crossover domain

In Workorder tracking , there is a field "LEAD" which will display ID of lead.
In our requirement we have to display Leadname along with Lead ID.
SO I created a new field for Leadname in Workorder and used crossover domain with a new relation between Wordorder and Person. Relation where clause being personid=:lead
The crossover domain copies over the value of Leadname from Displayname attribute of PERSON object and is working fine when we give an ID in Lead attribute of Workorder.
However in case if I give a Lead ID and then remove the lead ID in WO , then leadname still remains It doesnt get modified to null.
I believe its because the crossover condition (personid=:lead ) is not satisfied and hence no action is being performed. I tried setting condition on Source and Destination as well but that also is not working.
Is there any way to default a field to null in case if crossover where clause condition is not met.
I was able to get this implemented by using automation script , but would like to know whether same can be achieved by some other means.
If it is just displaying the information you should use a multipart textbox to show lead and displayname of the person. You need to add a relation from workorder to person using the lead attribute. Then normal Maximo logic will clear the 'description' when you clear the actual lead field.
There is a way to cross-over fixed values, including null, to clear another field on a crossover action. Just make an ALNDOMAIN with a empty value (leave description empty) In the crossover domain use a relation that points to this specific domain/value and use dot-notation to crossover the description. Use relationname.description as the sourcefield in your crossover
RFE 72680 / crossovers, option to set targets to null or default value when trigger field becomes null is intended to address this shortfall in functionality. Please cast your vote!

Resources