I want to build an ml model, which can when given a text input, can predict predefined tags or labels for the text. I already built one such model, but the problem with that is that it only predicts correct labels when a particular keyword is present in the text. For example - TEXT - "How to crack an interview?". LABELS PREDICTED - "Interview, Fresher". BUT, If TEXT - "How to clear hr round of xyz company, what questions the can ask?". Either it will predict some irrelevant label or no label at all. My model is very similar to this model
Seems like you overfitted. I would advise you to get more data if you can and more importantly use a pre-trained model to encode the words to vectors. See for example the answer to this question.