15. A non-transitory computer storage medium encoded with a computer program, the program comprising instructions that when executed by data processing apparatus cause the data processing apparatus to perform operations comprising: receiving queries from a user device, each received query being assigned to one or more topic-based categories and at least one of the received queries being assigned to multiple different topic-based categories; identifying a set of topic-based categories for the user device, the set of topic-based categories comprising each topic-based category to which at least one of the received queries is assigned; generating, using a plurality of prediction models, a category prediction of a next query to be received from the user device and that has not yet been received from the user device, the category prediction specifying at least one topic-based category to which the next query is predicted to belong, wherein: the plurality of prediction models comprising at least two prediction models that each generate a respective category prediction based on the one or more topic-based categories to which each received query is assigned; each of the plurality of prediction models using different criteria for generating the respective category predictions; and at least one of the prediction models generates a respective category prediction based on a time at which at least one received query was received for each topic-based category in the set of topic-based categories and at least one of the prediction models generates a respective category prediction independent of the time at which at the least one received query was received for each topic-based category in the set of topic-based categories; and providing, to the user device, data that cause a content item related to the at least one topic-based category to be presented at the user device.
15. A non-transitory computer storage medium encoded with a computer program, the program comprising instructions that when executed by data processing apparatus cause the data processing apparatus to perform operations comprising: receiving queries from a user device, each received query being assigned to one or more topic-based categories and at least one of the received queries being assigned to multiple different topic-based categories; identifying a set of topic-based categories for the user device, the set of topic-based categories comprising each topic-based category to which at least one of the received queries is assigned; generating, using a plurality of prediction models, a category prediction of a next query to be received from the user device and that has not yet been received from the user device, the category prediction specifying at least one topic-based category to which the next query is predicted to belong, wherein: the plurality of prediction models comprising at least two prediction models that each generate a respective category prediction based on the one or more topic-based categories to which each received query is assigned; each of the plurality of prediction models using different criteria for generating the respective category predictions; and at least one of the prediction models generates a respective category prediction based on a time at which at least one received query was received for each topic-based category in the set of topic-based categories and at least one of the prediction models generates a respective category prediction independent of the time at which at the least one received query was received for each topic-based category in the set of topic-based categories; and providing, to the user device, data that cause a content item related to the at least one topic-based category to be presented at the user device. 16. The non-transitory computer storage medium of claim 15 , wherein the prediction models comprise a time-based prediction model that generates a respective category prediction of the next query based on the one or more topic-based categories to which each received query is assigned and a difference in submission times of the received queries.