Null Response from "model/parse" endpoint

Hi All, I am hitting my rasa server on the model/parse endpoint using curl localhost:5005/model/parse -d ‘{“text”:“Hi”}’ . I am getting correct intent, but the response is null. Can anyone help me solve it?

This is the response I am getting

{
   "text":"Hi",
   "intent":{
      "id":2401587965935920955,
      "name":"greetings.hello",
      "confidence":0.748959481716156
   },
   "entities":[ ],
   "intent_ranking":[
      {
         "id":2401587965935920955,
         "name":"greetings.hello",
         "confidence":0.748959481716156
      },
      {
         "id":916937703885804630,
         "name":"greetings.goodmorning",
         "confidence":0.06902354210615158
      },
      {
         "id":2857899066996091794,
         "name":"greetings.goodevening",
         "confidence":0.040738534182310104
      },
      {
         "id":6007210907891355534,
         "name":"greetings.how_are_you",
         "confidence":0.03640391305088997
      },
      {
         "id":-5711088046477069850,
         "name":"greetings.bye",
         "confidence":0.03622930124402046
      },
      {
         "id":423038357581255635,
         "name":"greetings.goodnight",
         "confidence":0.024439124390482903
      },
      {
         "id":8278756237344589134,
         "name":"greetings.nice_to_talk_to_you",
         "confidence":0.018406303599476814
      },
      {
         "id":4132358217728696234,
         "name":"appraisal.thank_you",
         "confidence":0.010744664818048477
      },
      {
         "id":5606075028228511676,
         "name":"agent.acquaintance",
         "confidence":0.00826401449739933
      },
      {
         "id":-683074124695170743,
         "name":"appraisal.welcome",
         "confidence":0.006791161373257637
      }
   ],
   "response_selector":{
      "all_retrieval_intents":[],
      "default":{
         "response":{
            "id":null,
            "responses":null,
            "response_templates":null,
            "confidence":0.0,
            "intent_response_key":null,
            "utter_action":"utter_None",
            "template_name":"utter_None"
         },
         "ranking":[]
      }
   }
}

Hi @AnkitChouhan Could you please confirm if you’ve added ResponseSelector to the nlu pipeline in your config.yml and if the intent greetings.hello is meant to be a retrieval intent? If so, could you please double-check if you’ve followed these guidelines for handling retrieval intents?

Hi @anca, thanks for the reply. This is the config.yml I am using.

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en

pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    min_ngram: 1
    max_ngram: 4
  - name: "RegexEntityExtractor"
    case_sensitive: False
    use_lookup_tables: True
    use_regexes: True
    "use_word_boundaries": True
  - name: DIETClassifier
    epochs: 120
    constrain_similarities: true
    entity_recognition: False
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 120
    constrain_similarities: true
  - name: FallbackClassifier
    threshold: 0.3
    ambiguity_threshold: 0.1

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
#   - name: MemoizationPolicy
#   - name: RulePolicy
#   - name: UnexpecTEDIntentPolicy
#     max_history: 5
#     epochs: 100
#   - name: TEDPolicy
#     max_history: 5
#     epochs: 100
#     constrain_similarities: true

and this null response is only occuring during model/parse endpoint hit, rasa shell is giving the proper response. Moreover, one more thing I noticed while running rasa server in debug mode, The ResponseSelector is not loading

Please let me know what changes must be done to avoid this.

Hi @AnkitChouhan are you using stories or rule for your use case?

@AnkitChouhan Could you please share you training data files too?

Both

Sorry but those are my organization’s private files, I am not allowed to share them.

@AnkitChouhan then uncomment the policies

policies:

# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
#   - name: MemoizationPolicy
#   - name: RulePolicy
#   - name: UnexpecTEDIntentPolicy
#     max_history: 5
#     epochs: 100
#   - name: TEDPolicy
#     max_history: 5
#     epochs: 100
#     constrain_similarities: true

@AnkitChouhan are you using retrieval_intent also?

@AnkitChouhan Please provide maximum training examples for your response selector at least 10+ examples and delete older model and train again.

@AnkitChouhan Even DIET and ResponseSelector epochs is 100 just fine.

@nik202 , thanks. Will try that

If out of my 420 intents, 2 are retrieval_intent, how do I need to handle them? Will they affect the whole training if not handled properly?

@AnkitChouhan Hope you have seen this guideline as suggested by Anca : Chitchat and FAQs

you need to mention retrieval_intent in config.yml file too.

1 Like

Hi @anca , I don’t think the issue is in my configuration file’s pipeline or policies. I am getting the same null response from model/parse endpoint even in new ‘rasa init’ project.

@AnkitChouhan Without seeing your training data files, it’s hard to troubleshoot, so you’ll have to use the docs guidelines I’ve posted to do this on your own. One thing I’ve noticed though that might be related or not is that your retrieval intents don’t follow the naming convention, instead of the . you should use the / , for example greetings/hello.

1 Like