This document describes a system where advertisers do not need to create multiple variations of an advertisement for targeting different sets of users. The system includes utilizing machine learning algorithms to generate a dedicated model to generalize user interests (e.g., as opposed to a rule based approach). The machine learning algorithms and model can be applied to a large scale of users to provide coverage on personalized advertisements. As the advertisement is generated at query time, additional storage is not needed in the backend.