SUMMARYHermaphroditism and gonochorism are two contrasting forms of sexuality. Hermaphroditic species are generally seen as species adapted to conditions of low density, stabilized by poor mate search efficiency and high costs of searching. They can adjust allocation of reproductive resources to each sex function in response to current social conditions, making reproduction more efficient, at least in principle. By contrast, gonochorism (separate sexes) is advantageous when mates are frequent, making it ineffective to maintain two sex functions in a single individual. This, however, also rules out the need for a flexible response to mating opportunities as known for hermaphrodites. In the hermaphroditic marine polychaete worm Ophryotrocha diadema we showed earlier that group size is assessed through a chemical cue. In this study we verified the accuracy of the response to gradients of the chemical cue used to assess group size by O. diadema by checking reduction in egg production as the group of partners increases, as expected according to sex allocation theory. Furthermore we compared the effect of such a gradient with a similar gradient in a closely related gonochoric species (O. labronica). Here sex allocation adjustment is not predicted, thus an adaptive change in egg production in response to group-size cues is not expected. In fact, our results show that the group-size effect only occurs in O. diadema and not in O. labronica. Moreover, our study provides evidence of high perceptual abilities of chemical cues in O. diadema, suggesting that perceiving social cues and adjusting sex allocation appropriately are special properties of hermaphrodites.