Skip to content

ChoicePrompt handles irrelevant utterance as a choice because of ordinals/numbers #2956

@EdwinOtten

Description

@EdwinOtten

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:

  1. When the utterance contains a number (which is irrelevant if the user changes subject)
  2. When the utterance contains the Dutch word een, which translates to one or a depending on the context.
    Imagine a user saying i want to talk to a human, and the bot handles a 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]

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.R8Release 8 - March 16th, 2020customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions