Entities are classified as intents

I have an entity named “train”. And an intent with a lot of samples consisting of the word “train”.

While having a conversation, when I enter “train” (just the word) It has to be identified as Entity and mapped as a slot value. But instead, it got classified as intent.

FYI, I have used intent inform to extract entities. But it keeps getting classified to another intent.

How can I solve this?

Are you doing this as part of a form? You can specify that a slot is filled based on either an entity value or based on an intent.

Based on your explanation, it sounds like the word Train would match the train intent but I can imagine that there is some intent confusion between your inform and train intents and that you should design your form to handle possible confusion.

The rules policies are really good for this and the same syntax is supported for stories if you prefer to handle it that way. The slot filling section in the docs has some good examples that are applicable to your issue. You can fill the slot from either the train entity or the train intent.