A query prefix is received from a user device. A user identifier is determined based on the user device. A user category is determined based on the user identifier. A node representing the query prefix is located in a query graph. Descendent nodes of the located node that represent queries are located. Each node has one or more user category specific frequency measures and each user category specific frequency measure is associated with a user category. The queries represented by the located nodes are ranked based on the associated user category specific frequency measure associated with the identified user category. The ranked queries are sent to the user device.