The secretion of cuticular antimicrobial compounds is an important defensive mechanism for social insects and recent studies have demonstrated their role in the evolution of sociality. However, the factors that might affect their production and effectiveness are not well understood. For example, natural variation in colony size and genetic diversity are predicted to influence susceptibility to disease and, as a consequence, we hypothesized that colonies adjust by varying antimicrobial production. We examined the effects of colony size and genetic diversity on the antimicrobial properties of cuticular compounds in 10 colonies of the Australian paper wasp, Polistes humilis F. ( Vespidae: Polistinae). The effectiveness of antimicrobial compounds produced by a colony was found to increase with genetic diversity but decrease with colony size. Further, genetic diversity appears to be the stronger factor in determining effectiveness of antimicrobial compounds and may compensate for larger group sizes. These data highlight a possible trade-off between increasing group size for work efficiency and maximizing relatedness for indirect fitness benefits, with disease risk being the underlying driving factor.