F-Score Error

Hi All,

I tried rasa-starter-kit,I trained nlu and core ,started action-server(Chuck Norris Jokes) and connected it to mr-bot through socket.io,changed and tweaked the nlu.md and domain.yml and stories.md files by adding some intents,templates etc.Everything works awesome!!.

However I am left with a few questions:

1)When I train rasa-core,I get the following error on command line : F-score is ill-defined and being set to 0.0 in labels with no predicted samples.What am I doing wrong.

2)My bot gives some irrelevant answers to some questions like if I ask for hobbies,it gives me where it was born.May be some concepts which I am missing here.Kindly help.

Thankyou, Vivek

Hi Champs,

I am still not able to figure out the 2 questions,any help would be highly appreciated!

Thankyou :slight_smile: Vivek

Hey @code-efficient. The first meesage you get is not really an error - it’s a warning that your model sends to you meaning that you not enough training examples to calculcate the F-score. That could mean that your NLU training data has very few examples per intent or you have just very few stories in your dialogue management data and when the model makes split to evaluate the model there are not enough training examples to make a split and produce the F-score.

That is probably causes your bot to produce wrong responses - it’s making predictions, but due to the lack of training examples it’s not yet doing a good job.

How many training stories do you have? And how many examples do you have for the intents?

Hey @Juste,thanks for reply.I guess you are correct that I have few number of stories in stories.md than the number of intent examples in nlu_data.md and there should be more stories. I am working on that and see how it goes from there.However,it would be very kind of you if you can explain a bit about :

1)What to consider when writing stories e.g. the beginning,the middle ,the end,what should be the fundamental concept when writing a story as I have written some stories which are very short e.g.

"# story_origin

  • origin
  • utter_birthplace"

In this above example,do I need to add something else in order to continue the dialog or in other words , complete the path to lead the chatter to the goal which in this case would be listening to a joke ,feeling happy,bot asking him do you need to hear another joke? and goodbye.

2)How can I define my own fallback,right now,when my bot doesn’t seem to know exactly what to answer,it falls back by default to “Hey,tell me your name”(The opening sentence of the bot)

3)In domain.yml,if I am adding more than one text in the utter template e.g.


- text: "Oh sorry if I made you angry,would you like to listen to another joke"
- text: "Please let me know what can I do to cheer you up?"

How does it work while chatting with the bot?

Thankyou, Vivek

  1. The great way to start writing stories is using our interactive training, just talk to the bot as you would, and fix the bot answers, then export generated nlu data and the stories
  2. default fallback uses utter_default template, change it or define your custom default action (please see our docs)
  3. the bot will randomly choose between these two utterances

Thanks @Ghostvv for the reply…you cleared all 3 queries.Also can I find great examples of well written conversations in stories apart from the rasa-starter or are can you recommend any bots which are live and carry the conversation well ,I just want to see how a great bot handles the conversations and the chatter/user/visitor.

You can check out the Rasa demo bot GitHub - RasaHQ/rasa-demo: An example of a cool Rasa bot and you can test in on the Rasa docs.

Got it @Juste…Thanks :slight_smile:

Hi @Juste,I replied on this comment because my question is related to this context. This question might be naive as I am still new to chatbot building. That said here is my query: I used dialogflow to create intents eg. intent name:Hobbies,intent phrases:“what are your hobbies” and “Your hobbies please” and set a relevant bot response,I tried it out with “may i know your hobbies” and please let me know about your hobbies"…both worked although this was the only intent which i added.I am not able to do the same in rasa as you said that it may need more training data.I guess it does not have to do anything with pipeline and may be some advanced skills are needed to get the results.Please clarify. Thankyou!

Update on my previous question,I changed pipeline to tensorflow_embedding,it shows the same results as dialogflow,now my question is a bit different :slight_smile:…why do you recommend spacy_sklearn if we have less than 1000 training examples? because mine are a way less than 1000

1 Like