`from_text` slots in form get filled too greedily
See original GitHub issueWhile the optimal behaviour here is disputable, the observed behaviour simply differs between versions 2.8 and 3.0rc2.
Let’s have the rasa init
project with a form with two slots, each filled from_text
(in 2.8, the mapping would be defined in the form):
slots:
slot_1:
type: categorical
mappings:
- type: from_text
values:
- some
- none
slot_2:
type: bool
mappings:
- type: from_text
forms:
my_form:
required_slots:
- slot_1
- slot_2
Let’s say that the form should start after intent:greet
. So, when I say hi
, the form starts. However, when that happens, both slots also get filled from that utterance and the form instantly exits! In 2.8, the form would ignore the form-initiating utterance and only fill the slot(s) after asking the user about them (utter_ask_<slot_name>
).
On a similar note, what I also observe (which wasn’t in 2.8) is that already filled slots get re-filled. What I mean is: Let’s change the above situation such that the 2nd slot has a custom extractor that is a bit more picky and doesn’t fill slot_2
with hi
. Then, that hi
makes it into slot_1
only and the bot asks the user about slot_2
. Then, when a user provides a value which now fills slot_2
, that value also fills slot_1
which was already filled. In 2.8, slot_1
would’ve kept its original value when already filled.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
@ancalita thanks, I was offline yesterday but I agree with the chosen solution and with everything Melinda has said 🙂
@melindaloubser1 yup, the
migrate
command addsconditions
(with bothactive_loop
andrequested_slot
) in the 3.0 migrated format for all mapping types (apart fromfrom_entity
andfrom_trigger_intent
). I also agree with the documentation update / mandate (😛) on the usage ofconditions
. I will look at the comment you’ve added in the other issue now.