1. One or more computer-storage media having computer-executable instructions embodied thereon that, when executed by a computing device, cause the computing device to perform a method of determining relevant advertisements with a machine learning model based on a query, the method comprising: receiving training data for training a machine learning model, the training data comprising information indicating relevance between a set of reference and target documents, the documents comprising one or more training terms; determining one or more training data feature sets and corresponding training data feature values from the training terms of the trained data, each feature set and values associated with a training term; and determining as set of weight parameters for each of the training terms by applying the one or more of the feature sets and values associated with the training term to a machine learning model, thereby by training the model.