Pipeline with 2 or more models with different intents running sequentialy

Hi All, my name is Fernando

I am trying to achieve the next: I have created a component that tells me if a sentence should open a new dialog or if it’s appending information to the previous sentence, if so, then the first and second belongs to the same user goal.

Let’s assume that we have a DIETclassifier in the Rasa pipeline and I would like to use the predictions of this first classifier as a condition to send the same user message to be processed for the other custom component that I created.

The first classifier would tell me the intent of a given message. If that prediction is intent_x, so the second classifier, ideally, should process the sentence and tell me whether is intent_x_y or not.

The use case where I am trying to this could be ilustrated as:

  • usr: “I want an ice cream, chocolate, please”
  • bot: “good choice, I will create your order”
  • usr: “oh, please add a strawberry sauce over it”

vs

  • usr: “I want an ice cream, chocolate, please”
  • bot: “good choice, I will create your order”
  • usr: “Can I pay with credit card”

I don’t know if this is the best approach, but I am assuming that I would be able to use this 2 components sequentially.

EDIT: I am assuming that uses the “intent” field to be filled with the second cls output, but that’s not mandatory, if I could set a new attribute (or feature) for that information, I guess it will be enough for me

Can you help me?