Make the bot predict exact action

I use both rasa nlu & core to build my bot but the issue is the bot predict wrong custom action

my domain:

intents: -inform

entities:

  • news

slots: news: type: text

actions:

  • action_tech
  • action_sports
  • action_general
  • action_business
  • action_sci

the context is like that when the user say " tell me news about technology" the action should be action_tech but predict another action

the entity and the value of the input is technology

what should I do for training ? any advises?

Hi @Noarah! What stories and NLU examples do you train on?

It’s important that like the one you have in mind is in the training data. So for example, an intent ask_technology followed by action_tech. You should aim to have a number of examples in your NLU training data for the intent ask_technology.

Hi @ricwo thanks for reply. I make another topic that have my stories example Improve my custom actions prediction

For nlu data I use intent called inform_news and slot “news” with value Technology Ex: tell me news about [ Technology ] ( news )

Should I make several intents for Technology, business,… etc ?

Hi @Noarah you need several examples for the intent inform_news - aim for something like a dozen or even more. A few of these examples should contain the value technology value for the entity news

I have maybe 25 examples with values Technology, business, general, science and sports. So I’ll add more examples. I thought the issue is with my stories but I’ll reconsider adding nlu data and try.

Yes there could also an issue with your stories. it might be helpful in the beginning to train on shorter stories and work your way up to complicated ones like the one you posted. If you want your bot to go to action tech at the beginning just try training on shorter stories

I slove it by changing my news api request url to pass a slot and make just one action like weather bot tutorial