Finally, the documents are ranked in descending order based on the probability assigned to the query.
if terms of a document lead to higher generation probabilities, the more relevant this document is to the query.