Enthusiasm about artificial intelligence has propelled markets to record highs this year. But the fierce ascent has also raised concerns about a bubble.