What’s perplexity?
Note that this has nothing to do with whether the answer is objectively correct. It's just measuring how confident it is.
To be clearer, it is the exponent of the average negative log probability that the model gives to the real tokens of a sample text[0]. Roughly, it relates to how strongly the model can predict the sample text. A perfect model would have perplexity one; a random model has a perplexity equal to the number of possible tokens; the worst model has infinite perplexity.
[0]: https://github.com/pytorch/torcheval/blob/3faf19c060b8a7c074...