1. A computer-implemented method performed by a data processing apparatus, comprising: receiving a first set of search query suggestions for a search query for display on a user device with a first resource determined to be responsive to the search query; receiving content of a subsequent resource for which the first resource is an ancestor in a link graph representing the subsequent resource and first resource as nodes, the link graph being defined by selections of linked resources at the user device; determining that the subsequent resource is within N subsequent links to the first resource, wherein N is at least 1, and in response to the determination: determining whether the search query suggestion meets a relevancy criterion that defines the search query suggestion as being relevant to the content of the subsequent resource; in response to determining that the search query suggestion meets the relevancy criterion, including the search query suggestion in a final set of search query suggestions; and in response to determining that the search query suggestion does not meet the relevancy criterion, excluding the search query suggestion from the final set of search query suggestions; and providing the final set of search query suggestions for display on the user device.