Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to OR slot values #7715

Closed
3 tasks done
indam23 opened this issue Jan 13, 2021 · 7 comments
Closed
3 tasks done

Make it possible to OR slot values #7715

indam23 opened this issue Jan 13, 2021 · 7 comments
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) cse-issues effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@indam23
Copy link
Contributor

indam23 commented Jan 13, 2021

Description of Problem:
Currently only one slot value can be given per slot_was_set step or condition. It would be useful to be able to "OR" slot values, i.e. list multiple options that all qualify for that step, especially with many-valued categorical slots.

Currently the only way around is either to create "meta slots" which reflect a certain grouping of slot values, or to create individual stories for each slot value, even when the steps in each one are identical otherwise. This can lead to an explosion in the number of stories with a many-valued categorical slot.

(Bigger scope: it would also be useful to be able to OR slot names e.g. either the first_name or the logged_in slot have a value, although I have seen less clear examples where this would be the best way to solve a problem. )

Overview of the Solution:
Allow listing multiple allowable values per slot in a story or rule slot_was_set step (see examples). If in a conversation the slot is set to any one of those values, the dialogue state should be considered to match the story/rule at that point.

Examples (if relevant):

For example, given this slot:

slots:
  account_type:
    type: categorical
    values:
       - free
       - standard
       - gold
       - premium

There could be cases where you want to group the values into free, and standard, gold, premium,
and other cases where each individual value gets its own variant on a story, or the values are grouped differently:

stories:
   story: greet a customer on a free plan
   steps: 
      - intent: greet
      - slot_was_set:
         - account_type: free
      - action: utter_greet_free_customer

   story: greet a customer on any paid plan
   steps: 
      - intent: greet
      - slot_was_set:
         - account_type: 
               - standard
               - gold
               - premium
      - action: utter_greet_paying_customer

   story: list options standard and free
   steps: 
      - intent: what_can_do
      - slot_was_set:
         - account_type: 
               - standard 
               - free
      - action: utter_standard_options

   story: list options gold and premium
   steps: 
      - intent: what_can_do
      - slot_was_set:
         - account_type: 
               - gold 
               - premium
      - action: utter_advanced_options

Blockers (if relevant):
None known

Definition of Done:

  • determine if this is the best way to address the problem.
  • verify solution with Research and CSE.
  • Open implementation issue with solution detailed.
@indam23 indam23 added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Jan 13, 2021
@kaustuk
Copy link
Contributor

kaustuk commented Jan 17, 2021

@melindaloubser1 is this issue open for community? I would like to contribute.

@indam23
Copy link
Contributor Author

indam23 commented Jan 17, 2021

It's still under discussion, so I'm not sure (@TyDunn )

@TyDunn
Copy link
Contributor

TyDunn commented Jan 19, 2021

Hi @kaustuk. If you are interested in contributing this, could you please sketch out a plan for how you would go about doing it?

@kaustuk
Copy link
Contributor

kaustuk commented Jan 19, 2021

@TyDunn thanks for the reply. Sure I will come up with plan by this weekends.

@TyDunn
Copy link
Contributor

TyDunn commented Jan 19, 2021

@kaustuk Thanks! This will help us figure out if we feel this can be handled by the community 🚀

@alwx alwx added the area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) label Jan 29, 2021
@desmarchris
Copy link
Contributor

at least four customers (including one of the biggest) have asked for this now so bumping it up in CSE priority

@TyDunn TyDunn added the effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label May 21, 2021
@joejuzl
Copy link
Contributor

joejuzl commented Jun 22, 2021

closing in favour of #8933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/training-data Issues focused around Rasa training data (stories, NLU, domain, etc.) cse-issues effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

No branches or pull requests

6 participants