Do creatures with Legendary Resistance know what is hitting them in order to choose to use the resistance or not?


Say I cast a Fireball at a white dragon, it definitively knows that the spell cast was a Fireball, with all those flames around…

However, some spells are more subtle, such as Banishment. Maybe the characters want to have about 1 minute to build something that will kill the dragon once it returns… but then it could take casting the Banishment spell (or other spells) many times to successfully sending the dragon on a demiplane for a while.

Yet, if the Dragon (or other target) cannot really know what the spell is, then it could accept a failure thinking it may need its resistance later when it is in a worst situation than at this time…

I have not been able to find something in RAW that says the target knows of the exact spell effects when it has the Legendary Resistance skill. Is there?