Hi all
After some extensive testing and trying workarounds, thought I’d post here to mention this issue and see if there’s a solution.
When capturing a currency amount in the millions, the wrong values are picked up when the user says something like “1million” or “5million”
e.g.
I want to pay “2million” results in this:
“original”: “million”,
“currency”: “USD”,
“amount”: 1000000
or when I have the currency set to list, it ends up with this:
{
“currency”: “USD”,
“amount”: 2,
“original”: “2”
},
{
“currency”: “USD”,
“amount”: 1000000,
“original”: “million”
}
However, adding a space e.g. “1 million” gets the right value captured.
I’ve tried a few ways to workaround with composite entities, and annotating training phrases but couldn’t get it work without custom code.
Good day @FlashMaddison ,
Welcome back to Google Cloud Community!
There are several reasons why your training phrases and composite entities are not working, you can validate the solutions below if it will solve your problem.
-
In case you haven’t, you need to define 20 training phrases (bare minimum) for every intent in order for the Natural Language Understanding (NLU) Model to match the intent. The reason for this is the NLU model might be leaning more towards other intents with more training phrases which means if I only have only 5 training phrases for intent A while intent B has 50 training phrases, NLU will be bias for intent B. It is also desirable to have approximately 50 training phrases specially for head intents. You can learn more using this link: https://cloud.google.com/dialogflow/cx/docs/concept/agent-design#phrase-minimum
https://cloud.google.com/dialogflow/cx/docs/concept/agent-design#intent-bias
-
For best practice of annotation, you can use this link: https://cloud.google.com/dialogflow/cx/docs/concept/agent-design#annotation-consistency
https://cloud.google.com/dialogflow/cx/docs/concept/agent-design#entity-value-variety
-
You can also try adjusting the ML settings on how the user input will be processed to improve the performance of your agent. You can learn more using this link: https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-ml
-
As a best practice, you should also avoid nesting composite entities and similar intents. You can check, this link for more information: https://cloud.google.com/dialogflow/cx/docs/concept/agent-design#entity-composite-nest
Hope it helps!
Hi, thank you for your response however none of that helps. I believe this is a bug with the sys.unit-currency entity itself.
Annotation solution doesn’t help when using parameter filling.
sys.number correctly parses input like “3.3m” or “3.3million” but sys.unit-currency does not.
I cannot find anywhere to raise bugs to the DialogFlow team, how do I report this?