When a groundbreaking technology arrives, investors are quick to identify leaders and laggards. The artificial intelligence boom has knocked shares of software and data firms. Yet past bubbles show these early assessments are often wrong. It’s an opportunity for stockpickers.

