In set theory, in particular the context of forcing, if $M$ is a model of $\sf ZFC$ and $P\in M$ is a partial order, we say that $G\subseteq P$ is a generic filter (or $M$-generic or generic over $M$) if:

- Whenever $p\in G$, and $p\leq q$ then $q\in G$.
- Whenever $p,q\in G$ then there is some $r\in G$ such that $r\leq p,q$.
- If $D\subseteq P$ is dense (for all $p\in P$ there is $q\in D$ such that $q\leq p$), and $D\in M$, then $D\cap G\neq\varnothing$.

The first two conditions specify that $G$ is a filter, and the third is the required genericity. So a filter is generic if it meets all the dense sets in the ground model. Since this context allows it, we can replace dense by "open dense", meaning $D$ is dense and if $p\in D$ and $q\leq p$ then $q\in D$.

So being generic means meeting all the dense open sets. And this definition agrees with the definition of genericity in the contexts of topology and algebraic geometry (and perhaps other fields of mathematics as well).

Question.Where did the term "generic" come from originally to mathematics, and how did it trickle into set theory?

It should be noted that Cohen used "generic" in his original paper, but it seems to have a different meaning, and not quite this one.