Effective coordination of group actions underlies the success of group-living organisms. Recent studies of animal personality have shown that groups composed of individuals with different behavioral propensities can outperform uniform groups in a range of different tasks, but we have only a rudimentary understanding of how differences in individual behavior influence the behavior of the group as a whole. In this study, we use natural variation in behavioral propensity among morphologically distinct worker castes of the small carpenter ant Camponotus yamaokai to shed new light on this. Iterative testing indicated that ants displayed consistent behavioral differences among individuals and between castes, with major workers exhibiting a lower exploratory tendency than minors. By constructing groups of different caste composition and quantifying their performance in the task of colony emigration, we show that group performance is an asymmetric humped function of caste ratio, with optimal performance achieved by groups with natural caste ratios. Using a simulation model based on our empirical data, we demonstrate that interindividual differences in social attraction and exploratory tendency are sufficient to explain the observed patterns. Our results provide new insights into how group performance in collective tasks can vary with group composition.