Making some words more important during training

Is there a way to make some words in a training example count more than others when Rasa looks for intents? If I put them in twice in the example, will they have more weight on determining what the intent is?

Here’s a typical training example:

how did your thinking change :: **ask, tag500,**

ask and tag500 are keys I want to associate with this example, so I could do this:

how did your thinking change :: **ask, tag500,** **ask, tag500,** **ask, tag500,**, **ask, tag500,**

but would it have any effect on favoring examples with those tags be identified as a given intent?

Alternatively, I could flag them as entities, even though I don’t need them as entities, if that would raise their importance:

how did your thinking change :: [tag1](ask), [tag2](tag500)

1 Like

@bferster can you please share some examples of some words in the training example? If you emphasize one word in the training example it will not impact the intent I guess.

Yes.

The more examples that contains a word, the more it will be associated with this intent.

Thanks Nik, I added one to my question

Thanks Chris I edited my post with an example. Which do you think will help more?

Repeating the keyword multiple times in the same example may lead the bot to believe that it usually appears that many times in a user input, which may thus lead to the opposite of the desired effect.

It would be better to have multiple examples containing the keyword.

For example, for a want_pizza intent:

Bad:
- I want pizza pizza pizza pizza

Good:
- I want pizza
- Can I get pizza?
- I need to eat a pizza
- Pizza would be amazing to have right now

Examples should be as close to what a user may type as possible.

That’s good to know. I’m already tagging multiple events, but I want the tags to mean more than just another word. I’m training on 4,000 remarks made by live teachers, hand-coded and tagged to 5 intents

Would making it an entity help, like this?

how did your thinking change :: [tag1](ask), [tag2](tag500)

Yes, tagging them as entities would help :slight_smile:

Thanks Chris. I’ll test it out. For some reason Rasa on Colab stopped working today, so I need to sort that out first.

1 Like