An operating question for Rasa's KerasPolicy

Hi, there! In the Rasa’s website, it tells us as follows: " The KerasPolicy uses a neural network implemented in Keras to select the next action. The default architecture is based on an LSTM…" (please refer to the website: Policies)

Actually, this KerasPolicy is filled in a file “config.yml” which is introduced in NLU-training stage (not in dialog management stage or we say Rasa-Core stage). But, the stories dataset are trained in Rasa-Core stage. My problem is: How does this KerasPolicy be explained in predicting(or select) the next action of stories? (because these two models in NLU and dialog-management stages are seems independent.) It seems that stories are dependent on NLU-stage again(this is a little confuse for me!). thanks a lot.

Actually, The policy is run both during training and during action prediction. During training, The neural network is trained with the provided stories, and during prediction the neural network transforms the vector of features (intents, slots and previous actions) into the vector of probabilities for each action. Then, the highest probability is chosen.

1 Like