I’m sorry that you had to go through this. I’m east Asian myself, and I often cant tell the ethnicity of other east Asians (Korean, Chinese...). So how does Indians determine the caste of other people? Is it by the lightness of their skin?
Usually name, accent, dialect, food habits. It's not visible upfront, but a few minutes of conversation will get that information.
There is a skin colour bias, but that isn't about caste (darker skin is a sign that you have to work in the sun, which signals poverty and being of a lower economic class).