Responses cannot be recognized and trained - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum
Responses cannot be recognized and trained
post by ZahraaMaher on Jan 26, 2021
Hi
I am trying to create my responses, actions
so I have created the domain file: version: “2.0”
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- greet
- morning
- evening
- afternoon
- goodbye
- goodnight
- nice_to_meet
- nice_to_talk
- see_again
- thanking
- welcome_thanks
- well_done
- askingAboutDoingWithName
- askingAboutDoingWithOutName
- waiting
- sorry
- user_waiting
- flight_search_intent
- flight_search_intent_with_daeparture_and_destenation_cities_and_departure_date
- flight_search_intent_with_daeparture_and_destenation_cities_only
- flight_search_with_destenation_only
- flight_search_with_departure_only
- provide_departure_city
- provide_destination_city
- provide_departure_date
- provide_return_date
- provide_one_way_trip
- provide_round_trip
- Connect_agent
- provide_name
- provide_phone_number
- provide_email
- provide_issue_deatils
- get_Hoppies
- get_Kind_of_cities
- get_weather
- bot_challenge
entities:
- name
- Search_flight
- city
- departure_date
- return_date
- return_decision
- one_way_flight
- round_flight
- report_issue
- provide_name
- phone
- email
- get_issue_details
- hobby
- city_type
- weather_type
responses:
utter_greet:
- text: "Hey, This is Tickie! How can I help you?"
utter_did_that_help:
- text: "Did that help you?"
utter_goodbye:
- text: "Bye"
utter_ask_about_trip:
- text: "Are you looking for a round trip or a one way trip?"
utter_ask_about_departure:
- text: "Where are you flying from? (departure city)"
utter_ask_about_destination:
- text: "where are you flying to? (destination city)"
utter_ask_about_departure_date:
- text: "when would you like to go?"
utter_ask_about_return_date:
- text: "when would you like to return?"
utter_iamabot:
- text: "I am a robot"
actions:
- action_flight_search
then I have created my stories file: version: “2.0”
stories:
- story: flight_search1
steps:
- intent: greet
- action: utter_greet
- intent: flight_search_intent
- action: utter_ask_about_trip
- intent: provide_round_trip
- action: utter_ask_about_departure
- intent: provide_departure_city
- action: utter_ask_about_destination
- intent: provide_destination_city
- action: utter_ask_about_departure_date
- intent: provide_departure_date
- action: utter_ask_about_return_date
- intent: provide_return_date
- action: action_flight_search
- intent: thanking
- action: utter_goodbye
- story: flight_search2
steps:
- intent: greet
- action: utter_greet
- intent: flight_search_with_destenation_only
- action: utter_ask_about_departure
- intent: provide_departure_city
- action: utter_ask_about_departure_date
- intent: provide_departure_date
- action: action_flight_search
- intent: thanking
- action: utter_goodbye
then I created the endpoints file:
action_endpoint:
url: "http://localhost:5055/webhook"
After that, I have run the action server in the terminal using this command:
python3 -m rasa run actions
and I have trained the model using the command:
python3 -m rasa train
but, it cannot read the responses, as you can see here:
so there is no responses when I tried the python3 -m rasa shell command as showing here:
can anyone help me to fix this issue?
post by FearsomeTuna on Jan 26, 2021
Just to be sure, you should indicate the version of rasa you’re using. Anyway, now that I notice, the default project that you get when you call rasa init produces output with that same line ‘0 distinct responses’, and it works fine (it does respond according to responses defined in domain). So I’m guessing your issue lies elsewhere.
I don’t see your intents defined anywhere. This may seem obvious, but have you defined those intents you show in the domain? On top of specifing the intents you are going to use in the domain file, you actually have to define them elsewhere (on the default project hierarchy, it’s on the nlu.yml file on the data folder). See Training Data Format.
post by ZahraaMaher on Jan 27, 2021
I have my nlu file that has all the intents and entities, lookup tables
you can see it here:
version: "2.0"
nlu:
#A)Here the list of intents that would be used for Greetings function:
#1) Welcoming without time:
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- hey there
- let’s go
- just going to say hi
- heya
- hello hi
- howdy
- greetings
- hi there
- long time no see
- I greet you
- hello again
- good day
#... (remaining intets omitted for brevity)
could anyone help me to solve the problem?
post by FearsomeTuna on Jan 27, 2021
I suggest a few things:
- Run your bot with
--verbose --debugoption to see what your bot is actually doing when you send it messages. You can also userasa xand try the interactive chat there, it also shows some info about what the bot does and confidence levels. - Try running
rasa testto see info on predicted intents and actions. - Try running
rasa data validateto validate the data files you are providing to your bot. - Check your pipeline and policies, making mistakes there can drastically change your bot training and behaviour.
- Try to start a new default project using
rasa init. Does the problem happen then? If it doesn’t, then you could incrementally add things from there. I have made minor mistakes, specially on syntax, that can interfere with the bot expected behaviour. By the way, some of your intent examples have a space between in the entity annotation. Should be[entity_example](entity_name)without any space between the brackets and the parenthesis[]no_space_here(). - Try using virtual environments, they may help isolate your current environment and discard other possible issues.