Search code examples
dialogflow-es

Avoid Transcription of Currency to Symbol in Dialogflow


We have currency conversion intent in our Dialogflow Agent. A sample utterance would be "How much is 10 Dollars in Euros?".

The above utterance has 3 slots:

10 = amount
Dollars = currency1
Euros = currency2

If I input the above utterance for testing, Dialogflow is able to correctly determine the value for the slots.

However, when a user speaks the above utterance, the outcome text is actually How much is $10 in Euros?. And when I enter this utterance for testing. Dialogflow was not able to give the value for the slots anymore because it can't determine what "$" is.

So, is there any configuration to disallow Dialogflow to transcribe currency to symbol(Dollar to $)?


Solution

  • I wasn't able to find the config I was talking about in the official docs. But what I did to solve this is to add a new training phrase, "How much is currency1amount in currency2?" and add a new value "$", into the entity value list of currency1. So when the input is "How much is $10 in Euros?", $ would be currency1, 10 is the amount and Euros is currency2.