I’ve seen in another post this explanation by @dschnurr:
The search query and each document are combined into prompts that are sent to the model. The computed log probabilities of the tokens in the document are used to produce a score indicating how likely it is that the document is related to the query.
How exactly are log probabilities used to generate the score?