1. A method performed by data processing apparatus, the method comprising: receiving, from a search interface presented at a user device, a request for advertisements, the request specifying a set of query suggestions, wherein the set of query suggestions has been identified for a partial query received from the search interface presented by the user device in response to a time delay between characters having been entered in a query input field of the search interface; accessing an index that includes a ranking of the query suggestions, wherein the ranking was performed prior to receiving the request for advertisements and is based, at least in part, on a probability of each query suggestion being selected by a user that input the partial query, and is based, at least in part, on a length of each query suggestion, wherein the query suggestions have been ranked (i) by the probability of each query suggestion being selected by the user, such that the query suggestion is ranked higher when the query suggestion has a higher probability of being selected by the user, and (ii) by the length of each query suggestion, such that a shorter query suggestion is ranked higher among multiple query suggestions that each have a similar probability of being selected by the user; selecting a proper subset of the query suggestions, the proper subset including at least a highest ranked query suggestion based on the ranking, a second query suggestion, and a third query suggestion, wherein each query suggestion of the proper subset of the query suggestions has been classified with a corresponding topic; identifying a topic of the highest ranked query suggestion, a topic of the second query suggestion, and a topic of the third query suggestion; identifying a first advertisement based on the highest ranked query suggestion; determining that the topic of the second query suggestion does not match the topic of the highest ranked query suggestion, wherein the second query suggestion of the proper subset is different from the highest ranked query suggestion; determining that the topic of the third query suggestion matches the topic of the highest ranked query suggestion, wherein the third query suggestion of the proper subset is different from the highest ranked query suggestion and the second query suggestion; identifying a second advertisement based on the third query suggestion as a result of determining that the topic of the third query suggestion matches the topic of the highest ranked query suggestion and determining that the topic of the second query suggestion does not match the topic of the highest ranked query suggestion; providing, to the user device, data that causes presentation of the identified first and second advertisements at the user device; and dynamically updating the search interface presented by the user device to include the first advertisement and the second advertisement.