Defense against genome invaders universally relies on RNA-guided immunity. Prokaryotic CRISPR-Cas and eukaryotic RNA interference pathways recognize targets by complementary base-pairing, which places the sequences of their guide RNAs at the center of self/nonself discrimination. Here, we explore the sequence space of PIWI-interacting RNAs (piRNAs), the genome defense of animals, and establish functional priority among individual sequences. Our results reveal that only the topmost abundant piRNAs are commonly present in every cell, whereas rare sequences generate cell-to-cell diversity in flies and mice. We identify a skewed distribution of sequence abundance as a hallmark of piRNA populations and show that quantitative differences of more than a 1000-fold are established by conserved mechanisms of biogenesis. Finally, our genomics analyses and direct reporter assays reveal that abundance determines function in piRNA-guided genome defense. Taken together, we identify an effective sequence space and untangle two classes of piRNAs that differ in complexity and function. The first class represents the topmost abundant sequences and drives silencing of genomic parasites. The second class sparsely covers an enormous sequence space. These rare piRNAs cannot function in every cell, every individual, or every generation but create diversity with potential for adaptation in the ongoing arms race with genome invaders.