Summary1. Species interactions, ranging from antagonisms to mutualisms, form the architecture of biodiversity and determine ecosystem functioning. Understanding the rules responsible for who interacts with whom, as well as the functional consequences of these interspecific interactions, is central to predict community dynamics and stability. 2. Species traits sensu lato may affect different ecological processes by determining species interactions through a two-step process. First, ecological and life-history traits govern species distributions and abundance, and hence determine species co-occurrence and the potential for species to interact. Secondly, morphological or physiological traits between co-occurring potential interaction partners should match for the realization of an interaction. Here, we review recent advances on predicting interactions from species co-occurrence and develop a probabilistic model for inferring trait matching. 3. The models proposed here integrate both neutral and trait-matching constraints, while using only information about known interactions, thereby overcoming problems originating from undersampling of rare interactions (i.e. missing links). They can easily accommodate qualitative or quantitative data and can incorporate trait variation within species, such as values that vary along developmental stages or environmental gradients. 4. We use three case studies to show that the proposed models can detect strong trait matching (e.g. predator-prey system), relaxed trait matching (e.g. herbivore-plant system) and barrier trait matching (e.g. plant-pollinator systems). 5. Only by elucidating which species traits are important in each process (i.e. in determining interaction establishment and frequency), we can advance in explaining how species interact and the consequences of these interactions for ecosystem functioning.