Rasa producing wrong (random) actions with correctly identified intents

Hey there,

I have a problem with the intent-action-connection. If my bot gets an intent right (even with 1.0 probability), it uses a wrong action in many times, although the corresponding story is clear and without any pitfalls, e.g.:

## what is your name
* what_is_your_name
- utter_what_is_my_name

There is no clear pattern for this mis-assignment but these are the findings I could make in the “test your bot”-mode:

  • the first response-action of a conversation always fits to the intent – no matter what the intent is
  • from the second response-action onwards it is possible that a random response-action is assigned to the correctly identified intent (with up to 1.0 probability) – this seems to happen totally random, no matter what the intent is
  • in some cases no response-action (utterance) is presented although a response-action was selected – again this seems not to be dependent on a concrete response-action but can happen to everyone of it from time to time

Maybe someone has an idea, what is wrong here. What is especially striking is that the first action-turn is always correct and after that it can get random. This is what my config looks like:

language: de
pipeline: supervised_embeddings
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy

Thanks in advance!

2 Likes

@sebastian that’s because the MemoizationPolicy uses a max_history of 5 by default, meaning that it will pay attention to the history of the conversation. If you don’t have a story where the question is asked more than once, it may not know what to do. That being said, there’s a bunch of ways you can resolve that. I’d suggest you take a look at this tutorial: Tutorial: Building Assistants

2 Likes

@akelad Hey Akela,

thanks so much! It’s working again. I was really getting crazy with finding the problem. Shame on me for skipping some of the basics :sweat_smile:.

Hey Akela @akelad,

I have one follow up question concerning this topic:

In case my bot should be able to deal with both,

  • easy one turn FAQ-like intents (but more than just one in a single conversation)
  • contextual intents, e. g. slot collection over several turns

how do I arrange this with MemoizationPolicy? As I understood it, the value 1 is appropriate for the FAQs, while we need a higher value for greater ranges of relevant dialogue.

Thanks in advance! :slight_smile:

@sebastian then I would suggest using the default max_history parameter, and using either the MappingPolicy or the AugmentedMemoizationPolicy for your FAQ like intents.