The document proposes an algorithm to calculate the relevance of documents returned in response to user queries in information retrieval systems. It is based on classical similarity formulas like cosine, Jaccard, and dice that calculate similarity between document and query vectors. The algorithm aims to integrate user search preferences as a variable in determining document relevance, as classic models do not account for this. It uses text and web mining techniques to process user query and document metadata.