Recommender systems provide personalized recommendations to their users for items and services. They do that using a model that is tailored to each user to infer their preferences based on their characteristics and previous interactions they have made with the system. Recent research suggests that users of a recommender system may like to receive suggestions that provide a pleasant surprise. In other words, a recommendation may be unexpected to the user, but it must be useful. This concept, called serendipity, is one of the aspects that have been proposed to meet user expectations for the recommendations they receive. Introducing serendipity means going beyond the `more of the same' aspect that past recommender systems are criticized for.In this article, we first show how to estimate user preferences based on ratings they have done in the past in a content-based recommender system.This estimation allows us to measure the relevance of a recommendation. We then determine the item attributes that play an important role in the relevance measure.Experiments in the movie domain show that the greater the relevance of a recommendation, the more the users seem willing to discover items having attributes with which they are not familiar, as long as these do not play an important role in their ratings.