Primary piRNAs in Drosophila ovarian somatic cells arise from piRNA cluster transcripts and the 3' UTRs of a subset of mRNAs, including Traffic jam (Tj) mRNA. However, it is unclear how these RNAs are determined as primary piRNA sources. Here, we identify a cis-acting 100-nt fragment in the Tj 3' UTR that is sufficient for producing artificial piRNAs from unintegrated DNA. These artificial piRNAs were effective in endogenous gene transcriptional silencing. Yb, a core component of primary piRNA biogenesis center Yb bodies, directly bound the Tj-cis element. Disruption of this interaction markedly reduced piRNA production. Thus, Yb is the trans-acting partner of the Tj-cis element. Yb-CLIP revealed that Yb binding correlated with somatic piRNA production but Tj-cis element downstream sequences produced few artificial piRNAs. We thus propose that Yb determines primary piRNA sources through two modes of action: primary binding to cis elements to specify substrates and secondary binding to downstream regions to increase diversity in piRNA populations.