Different response for same question


I am currently building an FAQ bot with RASA 1.9.5, following is my sample data:

## intent: definitions
- What is [Speech Recognition](name)
- define [Speech Recognition](name)

- What is [RPA](name)
- What is [Robotic Process Automation](name)
- what is [cognitive process automation](name)
- what is [CPA](name)

- What is [Sentiment](name) Analysis
- define [Sentiment](name) analysis

The following is how i wrote in my story file:

* definitions{"name":"speech recognition"}
	- utter_Speech_recognition

* definitions{"name":"RPA","name":"Robotic Process Automation"}  
        - utter_RPA_def
* definitions{"name":"sentiment"}
	- utter_sentiment_analysis
  - name: SpacyNLP
    case_sensitive: False
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    number_of_transformer_layers: 0
    weight_sparsity: 0
    intent_classification: True
    entity_recognition: True
    use_masked_language_model: False
    BILOU_flag: False
    epochs: 150

There are more than 12 definitions in definitions intent and i used intent{ entity} format. Post the training process, I am getting different responses for the same question! Please tell me if the above format is correct for training? if not please suggest me a way to frame the above case and where it went wrong. Many thanks!

Hello @sandilya45

By “different responses” do you mean responses or actually different intents and entities? Also, this doesn’t seem right:

Is the name entity supposed to be RPA or Robotic Process Automation? If you want either one to trigger utter_RPA_def, you need to write two stories, one for each.

For your application, it might also be worth checking out the response selector: Tutorial: Building Assistants

HI @j.mosig ,

Thank you for your swift response.

  1. If i type what is RPA? in the conversation 3 times, i would get 3 different answers instead of one.
  2. Can i write the same thing in the below format:
* definitions{“name”:“RPA”} OR definitions{“name”:“Robotic Process Automation”}
     - utter_RPA_def

The OR format should work, yes. If you have defined multiple responses for the same action, then one of these responses will be selected at random each time. What does your domain file look like?

The following is a small snippet from my domain dile @j.mosig. Furthermore, i have tried your suggestion in writing NLP and Natural Language processing in two stories and the same issue continues.

  session_expiration_time: 60
  carry_over_slots_to_new_session: true
- greet
- goodbye
- definitions
- AI_importance
- Deep_Learning_Applications
- Expertise_NLP_bot_RPA_DS
- expertise
- name
- tech
  - text : NLP is the way computers process and analyze natural language data. It has
      two branches; 1. Natural Language Understanding Taking sequences of words and
      determining the intended meaning. \n2. Natural Language Generation Process of
      transforming structured data, ideas into natural language text or speech.
  - text : Robotic Process Automation (RPA) enables you with tools to create your own
      software robots to automate any business process. It typically bridges gaps
      in current business applications that cant communicate with each other directly.
      Unlike business integration and business process management technologies, RPA
      does not require any changes to existing applications. It is a non intrusive
      business integration technology

Please help me in resolving the issue.

Ok, this is odd. Do you get the correct intents and entities when you run rasa shell nlu and enter your question(s)?