Explaining the structure of ecosystems is one of the great challenges of ecology. Simple models for food web structure aim at disentangling the complexity of ecological interaction networks and detect the main forces that are responsible for their shape. Trophic interactions are influenced by species traits, which in turn are largely determined by evolutionary history. Closely related species are more likely to share similar traits, such as body size, feeding mode and habitat preference than distant ones. Here, we present a theoretical framework for analysing whether evolutionary history--represented by taxonomic classification--provides valuable information on food web structure. In doing so, we measure which taxonomic ranks better explain species interactions. Our analysis is based on partitioning of the species into taxonomic units. For each partition, we compute the likelihood that a probabilistic model for food web structure reproduces the data using this information. We find that taxonomic partitions produce significantly higher likelihoods than expected at random. Marginal likelihoods (Bayes factors) are used to perform model selection among taxonomic ranks. We show that food webs are best explained by the coarser taxonomic ranks (kingdom to class). Our methods provide a way to explicitly include evolutionary history in models for food web structure.