Have you been investing long enough to remember the non-fungible token craze of 2021? How about the cannabis stock fad?

Hardly a year goes by without at least one big investing trend pushing lots of related stocks higher. The latest "next big thing" on Wall Street -- artificial intelligence (AI) -- is getting heaps of attention thanks to the advent of new generative AI applications such as ChatGPT.

An investor presentation.

Image source: Getty Images.

AI is going to play an increasingly important role in an array of things that are important to you -- your job, your car, your search engine, and many others. The global AI market swelled to $137 billion last year, and Grand View Research forecasts that it will grow by 37.3% annually through 2030. 

Billionaire money managers eager to ride this mega-trend have been buying up AI stocks left and right. Here are two that some of the world's most successful investors haven't been able to get enough of lately.

Nvidia

Nvidia (NVDA -10.01%) made its name as a developer of graphics processing units (GPUs) to support video games -- chips that also happen to be really good at handling AI applications. As the lead provider of new chips built for AI applications, this company is an obvious choice to invest in, and billionaire money managers are buying its shares hand over fist.

In the first three months of 2023, Israel Englander and his fund, Millennium Management, raised its Nvidia stake by 1.3 million shares. Also, Ken Griffin and Citadel Advisors bought another 1 million shares of the chip designer.

Companies are racing each other to apply generative AI to every product, service, and business process imaginable. One thing they all have in common is a reliance on Nvidia's chips. During Nvidia's fiscal first quarter, which ended on April 30, Amazon Web Services, Alphabet's Google Cloud, Microsoft Azure, and Oracle Cloud Infrastructure all offered new products based on Nvidia's powerful H100 Tensor Core GPU.

Nvidia's dominance in the AI hardware arena pushed its data center sales up 14% year over year and helped it blast past Wall Street's expectations. Now that the stock is up near its all-time high, though, it may be too risky for most investors.

Nvidia shares are currently trading at 83 times forward earnings expectations, and those expectations are already high. If the famously cyclical chipmaking industry hits another slowdown as it did in 2022, investors who bought at recent prices could face significant losses.

UiPath

UiPath (PATH -1.52%) markets a software platform that businesses use to automate repetitive tasks. It's a leader in the robotic process automation (RPA) space, and it intends to stay on top by making it easy for office workers who couldn't code their way out of a paper bag to incorporate AI and machine-learning models into their own applications.

Billionaire investors who expect soaring demand for RPA tools that incorporate generative AI applications bought UiPath hand over fist during the first three months of 2023. Englander's Millennium Management fund acquired another 1.8 million shares, bringing its position to 5.8 million shares. Coatue Management, led by Philippe Laffont, added 1.2 million shares raising its UiPath position to 2.9 million.

Since its beginning, the UiPath platform has employed AI to read and understand an endless variety of documents and user interfaces. The recent proliferation of generative AI applications such as ChatGPT led to record participation at the company's latest AI Summit. All the excitement has also been driving new customers to UiPath during what has been a difficult time for most software vendors.

Fear of a potential recession this year is causing companies all over the globe to dial back spending on their least-favorite productivity tools, but UiPath appears to have come through the belt-tightening thus far unscathed. It reported a 122% dollar-based net retention rate during its fiscal first quarter, which ended on April 30. Its ability to retain old customers and add new ones during this difficult time for software vendors suggests UiPath's customers recognize that they are getting a great return on their investments.

Right now, UiPath is trading for around 60 times forward earnings expectations. This is a more reasonable multiple than Nvidia's, but this stock is still super risky at the moment.

The billionaires on this list bought millions of shares of UiPath and Nvidia this year, but they still kept those positions as relatively small parts of their portfolios. If you're going to buy these stocks for your own portfolio, be sure to do the same.