UX Generalists or Specialists?

This is a question that every UX professional faces at some point: is it better to be a UX generalist—for example, practicing both user research and UX design—or is it better to specialize—perhaps in a specific domain? Companies often question whether a team of UX generalists or a mix of specialists is best.