How to make an Inform intent

rasa core version: 0.11.3

Hello, I got a FormAction that requests for the unfeaturized slots username and password which are FreeTextFormField in my form:

 def required_fields():
    return [
        FreeTextFormField("username"),
        FreeTextFormField("password"),
    ]

since FreeTextFormField slots are filled with the next user utterance as the documentation mention in Slot Filling But the user utterance is classified with a random intent from my intents. So I tried to use an “inform” intent as the example given in the docs. The problem is how to make rasa classify it as an inform intent, since username and password could have any input from the users I do not know how to train the nlu it to recognize it.

This is the story i want to follow:

## Generated Story 3741297509561492559
  • query_info
    • action_login_form
    • slot{“requested_slot”: “username”}
  • inform{“username”: “leo17”}
    • action_login_form
    • slot{“username”: “20121917”}
    • slot{“requested_slot”: “leo17”}
  • inform{“password”: “123456”}
    • action_login_form
    • slot{“password”: “123456”}
    • utter_info

I think this issue is the same as in:

you should add some examples to your inform intent. Also what pipeline are you using? with the tensorflow_embedding pipeline it’s possible to handle oov tokens, such that they’ll mostly get classified into one intent

I was using the spacy pipeline but I changed to tensorflow to try your answer. If I type the password 321 I get:

  • Received user message ‘321’ with intent ‘{‘name’: ‘inform’, ‘confidence’: 0.16141913281525183}’ and entities ‘[]’ the same confidence for the spacy pipeline. It is lower than my fallback treshold of 0.25 so I’m getting the fallback default.

this is my training data for Inform intent:

## intent:inform
- [20121917](matricula)
- [20130940](matricula) 
- [20003215](matricula) 
- [19980532](matricula) 
- [20106598](matricula) 
- [20186459](matricula)
- [20132013](matricula)
- [20122012](matricula)
- [12345678](matricula) 
- mipassword - 06505641 
- dfgdsd34f 
- asdffff
- asdfasdf 
- m80943295824
- jljdf8384
- OOV


## regex:matricula
- [0-9]{8}

my pipeline config:

language: “es”

pipeline:

  • name: “tokenizer_whitespace”
  • name: “ner_crf”
  • name: “ner_synonyms”
  • name: “intent_featurizer_count_vectors” “OOV_token”: OOV
  • name: “intent_classifier_tensorflow_embedding”

Also the entity matricula which is a regex is not getting extracted. Any suggestion?

you need to add intent_entity_featurizer_regex to the pipeline, that should help. Also you need to label all entities in your training data, looks like some of them are not labeled in that training data. You should also add a lot more training data, that’ll improve things too

1 Like

Hi there

I have a similar challange as leonardoaii71. If a passwort-reset/change chatbot, A user should be able to input the username of another user in order to reset/unlock the account. Unfortunately the usernames does not follow a exact pattern. Pattern could be: max n-char before and after a point. This regex this maybe no very accurate.

Any other idea? Is is possible to force the next user input to be put in a specific entity?

Thanks four your help.

@dariofiore, the FormAction would be perfect for this and type will be unfeaturized slot. You then can do slot mapping and do from_text. See Forms for more details.

@leonardoaii71, regex featureized doesn’t seems to be working because it doesn’t do exact match. I have solution that I came up posted here: RASA Regex Entity Extraction - Naoko - Medium hope this helps!