Purpose of vanilloid receptors

The search feature doesn’t seem to be working. I’m wondering what the actual purpose of the vanilloid receptors in mammal’s mouth is. I know they fire off whenever you eat capsaicin, but that hardly seems like an evolutionary benefit. Vanilla isn’t one of the five or six basic tastes. What is their main purpose?

Maybe to warn you that what you are eating may be poison? Perhaps some plants had lookalikes that were deadly, so we developed a way to tell them apart so the species would continue to exist? Just a guess, but maybe a bit correct. I’d like to know too.