The success of OpenAI's ChatGPT might have been the launching pad to bring artificial intelligence (AI) to the masses. It could accelerate investment in AI software, hardware, and services, which was already projected to reach $153 billion this year and grow 27% per year through 2027, according to International Data Corp. (IDC).  

Virtually all industries and companies will be involved in using AI in some form over time. But if you're looking for undervalued tech stocks benefiting from this technology, you shouldn't overlook Alibaba (BABA 2.32%) and Meta Platforms (META -1.01%)

Let's look at how Alibaba and Meta Platforms are using AI and why investors shouldn't hesitate to buy these two stocks now.

1. Alibaba

Share prices of Alibaba tumbled over the last few years over intense regulatory scrutiny of big tech platforms in China and a slowing economy. Last year, Alibaba also faced the threat of being delisted from trading in the U.S., which accelerated the stock's fall. But with China's economy starting to show signs of recovering, and the regulatory clouds and delisting risks also fading, the stock could be one of the cheapest AI stocks to buy right now.

Alibaba is the leading e-commerce company in China, with over 1 billion Chinese customers. The company's AliExpress platform also helps Alibaba reach a global customer base, doubling its global reach to 2 billion customers. It's also the leading cloud services provider in China, although the cloud business currently generates very slim margins and doesn't contribute much profit to the whole company. 

Alibaba's Taobao and Tmall e-commerce marketplaces are the main profit generators. Over the last four quarters, Alibaba generated $22 billion of free cash flow on $128 billion in revenue. It is clearly a very profitable business, and it's been investing in AI for a long time.

Alibaba's platform for artificial intelligence (PAI) gives the company an opportunity to develop "large-scale commercial use of AI," as the company explains in its annual report. The company uses its AI capabilities to gather insights about its customers across e-commerce and cloud services. On the consumer side, it uses AI-powered insights to deliver personalized recommendations and optimize its supply chain. 

In response to ChatGPT, Alibaba is also investing in generative AI. As AI becomes more widely used on the consumer and enterprise side, it will generate a massive wave of demand for computing power. As a leading cloud provider, that will bring enormous growth for Alibaba's cloud business, which currently comprises 8% of its total revenue. 

Ahead of these opportunities, the stock looks like an absolute steal, trading at a price-to-earnings multiple of just 11.9 based on this year's consensus earnings estimate. That is a genuine bargain relative to the S&P 500's average P/E of 21.

2. Meta Platforms

After rebounding 65% year to date, shares of the Facebook owner are still 46% off their all-time high. The macroeconomic headwinds last year were brutal on advertising spending, which generates the bulk of Meta's revenue. But while Meta's revenue growth stalled, it is still a very profitable business, with opportunities for more growth.

The company generated $19 billion in free cash flow on $116 billion of revenue last year. In a year when Meta has had to scale back spending budgets, shrink its real estate footprint, and reduce its workforce over slowing growth, one area it is not scaling back is AI.

Over the last year, Facebook and Instagram have shifted to generating more content recommendations for users from AI. In the second quarter of 2022, management noted that 15% of the content in a person's Facebook feed was recommended by AI. That percentage was expected to double by the end of the year.

But AI is impacting many other areas. In response to the weak ad market, management is rightsizing the company's cost structure. This includes deploying more AI tools to assist Meta's software engineers in writing code faster. 

AI will undoubtedly have a tangible impact on Meta's bottom line over time. For example, in the ad business, Meta reported a 20% increase in ad conversions year over year last quarter. Combined with a lower cost per user acquisition, this has driven higher returns on ad spending. Management credited these improvements to investments in AI.

Even after the stock's rebound year to date, it still looks undervalued from a long-term perspective. The stock currently trades at a forward P/E of 20.7, which is in line with the S&P 500. I believe this is a bargain for a cash-generative business that is investing heavily in this revolutionary technology.