Rasa inner structure and processes

Hi,

Is there any in-detail description how RASA works from inside? I can get details on how DIET classifier works, for instance, or how TED policy works, but I can’t get what is happening after intent/entity classifier makes its output? I just guess that then response calculator starts working and uses policy to determine next response, but I don’t get how it’s connected with action server, what is a clear sequence of events that are happening inside.

Can anyone clarify?

@Gleb_Berjoskin Hello!

Please see the Algorithm Dashboard series of Rasa and check for DIET classifier and TED policy working. Algorithm Dashboard

I wish this will give you better clarity.

1 Like

@Gleb_Berjoskin I admit that there’s no in-detail description outside the actual codebase. However, there are still ways of seeing what’s happening on the inside – either reading the code or observing the output of something like rasa shell --debug. Importantly, there are many things going on and a complete picture would be too complex. But if I assume that you’re mostly interested in the decision-making flow that happens after NLU and moves the conversation forwards, then the steps are roughly:

  1. policies look at the conversation so far and make predictions
  2. a prediction is chosen from among all the predictions based on the policies’ priorities
  3. the chosen action is run, which can be either a custom action, or an action that simply maps to some response text. Note that this can change the conversation tracker, e.g. slots can be set from within a custom action.
  4. whenever the bot is to actually utter some text, natural language generation (NLG) happens – in the simplest scenario, this fetches the appropriate text given a response name (and randomly chooses if there are multiple texts), and does variable interpolation
  5. further actions are predicted and executed in a loop, until action_listen gets predicted (or some other special exceptions are encountered)

Hope this helps. Would you say that having this kind of flow documented somewhere would be useful for you? What’s your motivation for actually wanting this kind of information? I’m curious :slight_smile: