The race is on. I'm referring to the mad dash to win big in the artificial intelligence (AI) market. Of course, this race didn't just get started; it's been underway for years. However, AI has really taken center stage in recent months.

This newfound attention is primarily due to OpenAI's launch of ChatGPT. The rapid adoption of the chatbot caused some to speculate that Alphabet's (GOOG -1.96%) (GOOGL -1.97%) Google Search could be threatened. Amazon (AMZN -1.65%) wasn't spared from concerns that it could be left behind in the AI competition.  Microsoft's (MSFT -2.45%) investment of $10 billion in Open AI and its integration of ChatGPT with the Bing search engine only added fuel to the fire.  

Alphabet, Amazon, and Microsoft are all viable contenders to win the AI race. But which is the best AI stock to buy right now?

AI printed on a cloud that's on top of a circuit board.

Image source: Getty Images.

Sizing up the AI race

If we sized up the AI race only based on public relations, Microsoft would be the clear winner at this point. The company's partnership with OpenAI was an exceptionally shrewd move for the tech giant. Alphabet would probably be in second place even with its embarrassing introduction of its Bard chatbot. (Bard's incorrect answer to a question went viral.) Amazon almost seems like an also-ran from a PR perspective, with significantly less media attention on its AI efforts.

But the generative AI (where apps generate original content) part of the AI race is far from over. Microsoft's new ChatGPT-powered Bing had its own share of problems, giving bizarre and even belligerent responses in some cases. Alphabet hasn't launched Bard yet, but that could work to the company's advantage after Bing's missteps. Meanwhile, Amazon CEO Andy Jassy said in a recent interview with the Financial Times that his company has been working on generative AI "for a long time and is pursuing partnerships with smaller AI developers as well. 

It would be shortsighted to only focus on generative AI, though. Each of these three companies is also working on many other AI initiatives.

Alphabet's Google is widely viewed as a key leader in AI. It even developed the framework for neural network transformers -- the "T" in ChatGPT. Alphabet uses AI extensively throughout its products, including Google Search, YouTube, and Google Cloud. The company's Waymo unit is also a pioneer in AI-powered self-driving car technology.

Amazon's AI virtual assistant Alexa is now used by millions across the world. The company's Amazon Web Services (AWS) cloud-hosting business created SageMaker, a platform that enables developers to build, train,and deploy AI machine-learning models in the cloud. Amazon Rekognition can identify people, objects, text, and more in images and videos.

Microsoft has incorporated AI into its Azure cloud-hosting service. Its business intelligence tools use machine learning to analyze data. The company's GitHub Copilot uses AI to suggest code for programmers. Microsoft also has its own AI virtual assistant called Cortana.

Beyond AI

Those are just a few examples of what Alphabet, Amazon, and Microsoft are doing in AI. Of course, the companies are doing a lot beyond AI that investors should consider as well.

Alphabet remains the biggest player in search. YouTube is still the top video-sharing platform despite the rise of TikTok. YouTube TV continues to make inroads in the streaming TV market. Google Cloud is growing faster than both AWS and Microsoft Azure. Alphabet's famous "other bets" segment includes Waymo, Nest (which markets smart home products), and Calico (a unit focused on extending human longevity). 

Amazon is the 800-pound gorilla in e-commerce. Even with Google Cloud gaining ground, AWS remains the No. 1 cloud-hosting platform by far. Amazon has moved into new markets in recent years, including grocery stores, online pharmacy, and primary healthcare. Its pending acquisition of iRobot could make the company an even bigger player in home automation. Amazon also has a self-driving car unit plus a major stake in electric vehicle maker Rivian

Microsoft's dominance with its Windows operating system continues. Its Azure is a top rival to AWS and Google Cloud. Microsoft Office and Dynamics products remain juggernauts in business productivity. The company's Xbox enjoys widespread adoption. 

The best pick

I think that Alphabet, Amazon, and Microsoft are all great AI stocks. My personal portfolio includes all three. I predict that all of these stocks will be successful in the AI race. It's impossible, in my view, to know at this point which company will be the biggest winner of all, though.

What isn't impossible to evaluate, however, is the three stocks' valuations. Alphabet is clearly much cheaper based on earnings valuation metrics than Amazon or Microsoft are. It also has a bigger cash stockpile than either of its rivals (although Microsoft isn't too far behind). 

In my opinion, many investors are underestimating Alphabet's strengths in the wake of Microsoft's AI moves. I really like all three of these stocks, but if I had to pick the best right now it would be Alphabet.