NLU not filling in slots

rasa-nlu
(Simba M) #1

I have a form that I use for the bot to gather details that it will use to query . If the user provides details in their initial statement (like in my case, select the property they are interested in), according to the documentation, the NLU is supposed to pick up the entity from the intent and since it has the same name with the slot, it is supposed to also fill the slot. For some reason, this is not happening for me. Instead, this is what I get.

Current slots: selected_property: None

May you please help…

Below are snippets of my nlu.md, domain.yml and stories.md files relevant to my question.

**nlu.md**

intent:request_for_price_info

  • How much is the [one bed](selected_property:One Bedroom)
  • How much for the [one bedroom](selected_property:One Bedroom)

**domain.yml**

intents:

  • request_for_price_info

slots: selected_property: auto_fill: false type: unfeaturized

forms:

  • property_form

**stories.md**

Story from conversation

  • request_for_price_info{“selected_property”:“One Bedroom”}
    • utter_greet
    • utter_property_info
(Julian Gerhard) #2

Hi @SimbaM

your story is missing some crucial things. Try it with this one:

 * request_for_price_info{“selected_property”:“One Bedroom”}
- property_form
- form{"name": "property_form"}
- slot{"requested_slot": "selected_property"}
- form{"name": null}

Basically, with the first line, you are telling rasa to accept an entity while triggering the intent. The second line starts the form and validates any previously given entities for fitting into slots.

Further I’d recommend you to read:

Hope that helps, tell me if you need more help!

Regards

(Simba M) #3

Thanks Julian… I however tried what you suggested and it still didn’t work. i am really wondering where i am missing it as I am doing what is written in the docummentation

(Julian Gerhard) #4

Okay, let’s try something else. Start the bot by running:

rasa run -vv -m <path_to_model> --endpoints endpoints.yml --credentials credentials.yml --enable-api

After that, do a POST request with the body:

{
	"text": "How much for the one bedroom ?"
}

to

http://localhost:5005/model/parse

and post the result here! We could then at least figure out from where the problem comes.

(Simba M) #5

Please find below the output:

C:\Temp\curl\bin>curl -X POST -d “{ “text”: “How much for the one bedroom ?”}” http://localhost:5005/model/parse {“intent”:{“name”:“request_for_price_info”,“confidence”:0.6654813429432856},“entities”:[{“start”:17,“end”:28,“value”:“One Bedroom”,“entity”:“selected_property”,“confidence”:0.9681512467272982,“extractor”:“CRFEntityExtractor”,“processors”:[“EntitySynonymMapper”]},{“start”:17,“end”:20,“text”:“one”,“value”:1,“confidence”:1.0,“additional_info”:{“value”:1,“type”:“value”},“entity”:“number”,“extractor”:“DucklingHTTPExtractor”}],“intent_ranking”:[{“name”:“request_for_price_info”,“confidence”:0.6654813429432856},{“name”:“provide_property_choice”,“confidence”:0.05945223343615485},{“name”:“request_to_book”,“confidence”:0.059380235504145513},{“name”:“greet”,“confidence”:0.0453533163422947},{“name”:“provide_number_of_guests”,“confidence”:0.03962403929518929},{“name”:“decline_to_proceed_with_booking”,“confidence”:0.027997657162340664},{“name”:“suspend_conversation”,“confidence”:0.02268004011547763},{“name”:“request_for_location_info”,“confidence”:0.02191273176359601},{“name”:“goodbye”,“confidence”:0.019958487362733607},{“name”:“provide_booking_period”,“confidence”:0.014433768933692326}],“text”:“How much for the one bedroom ?”}

Note that I changed the name of the form to ‘booking form’ and below is what the associated story looks like:

Story 00020

  • request_for_price_info{“selected_property”:“One Bedroom”}
    • booking_form
    • form{“name”: “booking_form”}
    • slot{“requested_slot”: “selected_property”}
    • form{“name”: null}
    • utter_greet_back
    • utter_intro
    • utter_provide_available_property_info
    • utter_rates
    • form: booking_form
    • slot{“requested_slot”: “num_of_people”}
  • provide_number_of_guests{“num_of_people”:“a couple and a baby”,“number”:2}
    • booking_form
    • slot{“num_of_people”:“a couple and a baby”}
    • slot{“requested_slot”:“booking_period”}
  • provide_booking_period{“time”:{“to”:“2019-08-08T00:00:00.000-07:00”,“from”:“2019-08-02T00:00:00.000-07:00”}}
    • utter_slots_values

Thanks in advance for your help!

(rianne) #6

@SimbaM Could you try to add to your domain:

entities:

  • selected_property
(Julian Gerhard) #7

This actually means that everything is parsed correctly and the problem is somewhere else.

As @rbossie correctly stated out, it might be the case, that you forgot to define the entity in your domain.yml but I think you would have seen an error then.

Another option now is to post us the action servers output by running a separate action server:

rasa run actions -vv

Because actually the slot simply does not get filled… so we need to check:

slot_mapping
slot_validation
the slot configuration in domain.yml

If you could give us this information, we could help.

(Simba M) #8

Thanks @JulianGerhard and @rbossie I picked up where my issue was. I had issues with the slot_mapping and also made some corrections to my domail.yml file. It is now working!

Thanks Again! :slight_smile: