The authors measure the efficacy of three methods for predicting the time to infection for susceptible individuals in a population undergoing an HIV epidemic. The methods differ in whether they require detailed information of the contact network and whether they require knowledge of the initial source of infection. Efficacy is evaluated using simulations for 20 different contact patterns. Only the risk score that uses both kinds of information accounts for more than 15 per cent of individual variability. The efficacy of this score ranges from 10 per cent in very unstructured populations to 60 per cent for spatially localized contact networks. This improved performance may be explained by the larger fraction of the total variability not due to the disease dynamics. When all variables are dichotomized, the two poorer methods produce odds ratios between 1.4 and 2.3. The odds ratio for the risk score with full information ranges from 2.5 to 17. Risk assessment protocols and intervention programmes are encouraged to assess contact patterns and detect sources of infection.