What is the metric in "best of"?

There is a variable “best of” that allows to generate multiple completions and it returns the best one. My question is: how are the completions compared? What is the metric used to select the best one out of let’s say 3 generated completions?