v12
v12 copied to clipboard
NLU: Slot filling not using entity regex
When you have an utterance that uses a slot that is linked to an entity using a regex, the regex is seemingly ignored for the purposes of slot filling.
To Reproduce
- Create an entity called
job
with the regex^\s*([a-zA-Z-']+\s*){1,3}$
(any 1 - 3 words) - Create an intent called
job_pay
, with an utterance likehow much do vets get paid
and tagvets
as a slot linked to thejob
entity - Train the bot and try a phrase like
how much do train drivers get paid
. The slot will be incorrectly filled withtrain
, even though we've specified our slot can contain 1 - 3 words
Note: To reproduce, you'll need to add an extra 2 related utterances in order for NLU to kick in (see screenshot below for suitable examples)
The same probably also exists when using 2 words in the utterance, and 1 word in the message to the bot, except the slot won't be filled at all.
Expected behavior The NLU slot filling should take the entity regex into account, and not make us repeat the same utterance 3 times to allow 1 - 3 words in the slot.