Understanding what structures ecological communities is vital to answering questions about extinctions, environmental change, trophic cascades, and ecosystem functioning. Optimal foraging theory was conceived to increase such understanding by providing a framework with which to predict species interactions and resulting community structure. Here, we use an optimal foraging model and allometries of foraging variables to predict the structure of real food webs. The qualitative structure of the resulting model provides a more mechanistic basis for the phenomenological rules of previous models. Quantitative analyses show that the model predicts up to 65% of the links in real food webs. The deterministic nature of the model allows analysis of the model's successes and failures in predicting particular interactions. Predacious and herbivorous feeding interactions are better predicted than pathogenic, parasitoid, and parasitic interactions. Results also indicate that accurate prediction and modeling of some food webs will require incorporating traits other than body size and diet choice models specific to different types of feeding interaction. The model results support the hypothesis that individual behavior, subject to natural selection, determines individual diets and that food web structure is the sum of these individual decisions.body size ͉ complexity ͉ connectance E xplaining and predicting community structure is a central part of ecological research. It is vital to answering questions about extinctions (1, 2), environmental change (3), trophic cascades (4), and ecosystem functioning (5, 6). We focus on one of the major components of community structure: the interactions between consumers and resources. Food webs represent communities in terms of species and the feeding links between them, and discovering what determines their structure is a major goal in ecology.There are several different approaches to modeling food webs, each emphasizing different processes by which food web structure might be controlled. For example, dynamic models focus on how structure relates to population dynamics and community stability (2, 7-11). Evolutionary models incorporate the processes that control the formation and expansion of food webs (12, 13). Static models include rules that determine structural attributes of food webs (14-19). These models have developed our thinking about food webs in a number of ways, but they have limitations. The stochastic, and therefore generalized, nature of these models means that predicting the arrangement of links in a particular real food web is difficult. Here, we describe a new approach to modeling food webs that avoids some of these problems through use of the allometries of body size and foraging behavior of individual consumers.The contingency model of optimal foraging predicts the diet that maximises a consumer's rate of energy intake (20). We have shown that this optimal foraging model can predict consumer diet breadths and food web connectance (21). This model of connectance [which we te...