-
Notifications
You must be signed in to change notification settings - Fork 492
Description
Is your feature request related to a problem? Please describe.
If the user ignores the buttons of a ChoicePrompt and asks another (totally different) question, the bot may recognizes ordinals/numbers in the utterance and handles that as if the user made a choice. This causes problems for me in multiple cases:
- When the utterance contains a number (which is irrelevant if the user changes subject)
- When the utterance contains the Dutch word
een
, which translates toone
ora
depending on the context.
Imagine a user sayingi want to talk to a human
, and the bot handlesa
as option 1.
Describe the solution you'd like
I'd like to disable part of the logic in ChoiceRecognizers so it won't recognize choices based on ordinals/numbers. This option could be added to FindChoicesOptions.
The V3 .NET SDK offered ChoiceOptions, which allowed us to disable these features (source).
/// <param name="recognizeChoices">(Optional) if true, the prompt will attempt to recognize numbers in the users utterance as the index of the choice to return. The default value is "true".</param>
/// <param name="recognizeNumbers">(Optional) if true, the prompt will attempt to recognize ordinals like "the first one" or "the second one" as the index of the choice to return. The default value is "true".</param>
/// <param name="recognizeOrdinals">(Optional) if true, the prompt will attempt to recognize the selected value using the choices themselves. The default value is "true".</param>
Otherwise, I'd like to supply my own implementation of ChoiceRecognizers to the ChoicePrompt.
Describe alternatives you've considered
I have considered implementing my own ChoicePrompt and use some custom logic instead of ChoiceRecognizers to recognize choices.
Additional context
In V3 someone had a similar issue because the titles of his Choice buttons contained numbers. Back then, @EricDahlvang suggested to set recognizeOrdinals to false.
[enhancement]