The stock market has stumbled on concerns that the surge in artificial intelligence stocks could echo the dot-com bubble.