BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

validation and key-word extraction in the same user input

Open chia-lun opened this issue 3 years ago • 4 comments

Describe the bug

I have been trying to do validation (other-> validation->validation rules) and key word extraction (in user input) but the entity extraction somehow did not work (the entity is extracted but the property was not set to the value). I tried to track it with the bot framework emulator and found out every time the entity extraction is conducted, the LuisV3 trace happens twice one right after another (I assume the second time the entity extraction is set to an empty string, but not sure about it).

I also have a question about the order of validation and entity extraction that is not directly related to this bug: which is goes first? Will the user input get extracted first and then validated?

Version

  • Bot framework composer (v2.1.2)
  • SDK v4

OS

  • [x] macOS
  • [ ] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Create a new question
  2. In 'User Input', set property to user.email, value to =coalesce(@email), add @ prebuilt email in expected reponses
  3. I think we can forget about validation for now as it works on my end (it is just a regex email validation)
  4. See error

Expected behavior

The property should be set to the extracted entity and get validated.

Screenshots

This is the section for reproduction of the bug:
Screen Shot 2022-07-15 at 2 42 44 PM


Here you can see the first time the entity did get extracted:
Screen Shot 2022-07-15 at 2 42 00 PM
But the second time the entity is set to an empty string:
Screen Shot 2022-07-15 at 2 42 10 PM

chia-lun avatar Jul 18 '22 22:07 chia-lun

I am investigating.

dmvtech avatar Jul 20 '22 17:07 dmvtech

Hi @chia-lun Apologies for the delay. I am still investigating this.

dmvtech avatar Jul 26 '22 17:07 dmvtech

No worries! Thank you for taking time to investigate.

chia-lun avatar Jul 26 '22 18:07 chia-lun

Hi @chia-lun

Will the user input get extracted first and then validated?

That is correct. But you should use turn.extracted.text instead of user.email.

Regarding the two LUIS traces, do you have interruptions enabled on the prompt for text or dialog?

dmvtech avatar Aug 02 '22 00:08 dmvtech

Hi @chia-lun

Do you still need assistance on this issue?

dmvtech avatar Aug 15 '22 17:08 dmvtech

Closing due to lack of reply. If you still need assistance on this, please comment with the pertinent information and we can reopen to continue.

dmvtech avatar Aug 16 '22 23:08 dmvtech