The tech industry is in the midst of a monumental shift given recent advancements in generative artificial intelligence (AI). And perhaps no two companies could be more impacted than Microsoft (MSFT 1.82%) and Alphabet (GOOG 9.96%) (GOOGL 10.22%).

Microsoft jumped into the race in a big way last year when it invested in OpenAI, the creator of ChatGPT. Microsoft's initial involvement with the company actually goes back to 2019, when it made a $1 billion investment in the AI specialist, but after ChatGP went live and gained a lot of attention, Microsoft significantly increased its investment and went all-in on OpenAI's technology.

Alphabet, meanwhile, has been spending on AI for years, but didn't really jump into using the technology until after Microsoft made its big push. At the moment, Microsoft is emerging as a clear AI leader, while investors are a bit more skeptical about AI's impact on Alphabet. Here's why they shouldn't be.

AI and search

The biggest worry for Alphabet investors is the effect of AI on search. This skepticism showed up when the tech titan announced its most recent results. While Alphabet handily topped analysts' revenue and earnings estimates, the stock nonetheless fell after its strong report. The reason was that Google's 11% advertising revenue growth came in just shy of expectations. This fed into the narrative that its dominant position in search could be at risk.

Dig slightly under the surface, however, and revenue from Google Search and YouTube, which are both part of this segment, was quite strong. Their sales rose nearly 13% and 16%, respectively. The weakness came from Google Networks, its targeted ad service that serves ads to customers' websites and apps, which saw revenue decline 2%. Overall, Alphabet's core Google Search and YouTube properties performed quite well.

Despite some investor concerns about the impact of AI on Google Search, the reality is that the company is embracing the technological shift. It has been heavily investing in AI for years, and at the end of 2023, it launched a new series of Gemini AI models. It has already been experimenting with these models in search in the U.S. and has seen a big reduction in latency.

While there is a fear that AI could disrupt Google Search, it is much more likely it will be a huge benefit for the company. Why? Because Alphabet will find new ways to profit off of AI queries.

Surprisingly, Google displays ads at the top of its search results only about 20% of the time. These are generally searches where someone is actively looking to buy something, and they will likely continue to best be served by traditional linked-based search results that will only improve with AI. However, with the use of AI, Google will also be able to answer questions directly that are not designed for search, and it will have an opportunity to monetize these queries (something it hasn't been doing). It can create new types of ads that can be served to users looking for answers from AI, which would create a new revenue source for the company and a lot of potential growth.

Microsoft's Bing, meanwhile, has a much smaller share in search than Google, and it isn't a big part of Microsoft's overall business. On its fourth-quarter earnings call, the only mention of Bing from executives was that it took share, but nothing else was said. AI can only help Bing, but right now it does not look like much of a threat to Google. If Bing were making big strides, Microsoft's management would have talked much more about its search engine.

AI and cloud services

Microsoft's most successful deployment of AI thus far has been via its cloud service, Azure. Its OpenAI offerings are leading to both new customer additions and more AI consumption. Azure has a pay-as-you-go model, so as organizations use the feature more, Microsoft generates more revenue. That helped lead to outstanding 30% growth in Azure sales in fiscal Q2 (which ended in December).

Google Cloud, meanwhile, had also been benefiting from AI. Cloud revenue soared 26% in the fourth quarter, which only slightly trailed the growth that Azure saw in the period. Alphabet credited AI features for helping Google Cloud win and expand a number of deals in Q4. Meanwhile, the company will continue to invest in AI to drive further cloud services growth.

Other AI innovations

Another area where Microsoft has seen good results has been with adding AI chatbots and assistants called Copilots to its various products. GitHub, its developer tool, has seen huge uptake following the introduction of a Copilot to its platform. In fiscal Q2, the platform's paid subscribers increased 30%, while GitHub revenue surged 40%.

The company also said that its Microsoft 365 Copilot was seeing strong adoption. The product helps with tasks like summarizing documents. It's still early, but Microsoft is excited by its initial reception, which appears to be much better than the response users gave its first assistant program, Clippy, when it was introduced back in 1996.

Meanwhile, Alphabet has recently introduced a number of new AI advancements, including a music creation tool called MusicFX and an image creation tool called ImageFX. These offerings differentiate themselves from the competition through keyword suggestions that let users move into adjacent categories.

Both stocks will be AI winners

Overall, I think Microsoft and Alphabet are attractive ways to play the AI revolution. And while they compete with each other in several areas, they can both be winners with AI.

Alphabet may not have the first-mover advantage in AI, but it also didn't have the first-mover advantage in search, either. What it did was get the technology right and become the dominant player in the space. Look for history to repeat itself.

Microsoft, meanwhile, has been at the forefront of AI. It's improving its products, with Azure and GitHub leading the way. However, it is incorporating AI throughout its offerings, and it has opportunities with the technology in other areas as well. For example, it will be fun to watch what the company does in the future with AI in the video gaming realm, where it is already a leader and just completed an acquisition of game publisher Activision Blizzard. This is an exciting time for Microsoft given its leadership and investment in OpenAI. Expect it to continue to ride the current AI trend to solid revenue growth in the years to come.

Between the two stocks, though, I prefer Alphabet. The reason: Its valuation is much cheaper. Microsoft trades at a trailing price-to-earnings (P/E) ratio of 37, while Alphabet sports a P/E of 25. Investors are also more skeptical of Alphabet, which means expectations are lower. Low expectations and a relatively cheap valuation are a nice combination when looking for attractive investments.