The rise of generative artificial intelligence (AI) platforms like OpenAI's ChatGPT drove many AI-related stocks to their all-time highs over the past year. But as inflation looms large and interest rates stay elevated, many investors are probably wondering if they should take some profits in those high-flying AI stocks before the market crashes again.

Meanwhile, investors who missed out on the massive rally in AI stocks should probably wait for a market downturn to reduce those valuations to more sustainable levels. If that happens, I'd confidently load up on Nvidia (NVDA 6.18%), Cloudflare (NET 1.44%), and Workday (WDAY -1.19%) as long-term plays on the booming AI market.

Two androids in business suits.

Image source: Getty Images.

1. Nvidia

Nvidia is the world's largest producer of discrete GPUs, which are used to process AI tasks in data centers, render graphics in PC games, and mine certain cryptocurrencies. It experienced a major growth spurt during the pandemic as consumers bought more PCs for remote work, online classes, and high-end games, but its growth cooled off as PC sales stalled out in a post-pandemic market. Tumbling crypto prices also drove disillusioned miners to flood the market with cheap secondhand GPUs.

But over the past year, the explosive growth of the AI market, driven by the surging popularity of generative AI platforms, lit a fire under Nvidia's business again. For its fiscal 2024, which ends next January, analysts expect its revenue to rise 102% to $54.6 billion as its adjusted earnings per share (EPS) surge 222% -- in sharp contrast to its flat revenue growth and 25% decline in adjusted EPS in fiscal 2023.

Nvidia's growth rates are incredible, but the bears believe they will cool off as the AI hype dies down and data centers rein in their purchases of new chips. Its stock also isn't cheap at 41 times forward earnings and 19 times this year's sales.

Those high valuations could set it up for a steep drop during the next market downturn. But if that downturn reduces Nvidia's valuations to more reasonable levels, I'd accumulate more shares as a long-term investment, since I believe it's still a best-in-breed play on the secular expansion of the AI, cloud, and data center markets.

2. Cloudflare

Cloudflare's cloud-based content delivery network (CDN) accelerates the delivery of digital content for websites by storing cached copies on "edge" networks, which are located physically closer to the website's visitors. It also shields websites from bot-based attacks with its cybersecurity services. So if you've ever been asked to prove that you're human while visiting a website, you have likely encountered Cloudflare's defense systems.

Cloudflare believes it will eventually become a "water filtration" system for the modern internet, which reduces the need for traditional cybersecurity services. It already serves data from 300 cities in more than 100 countries, and it processes an average of 46 million HTTP requests each second.

It also recently rolled out a new platform for developing AI apps like chatbots directly on its edge networks instead of in origin servers. 

The business faces some near-term headwinds as companies rein in their spending. But it still expects revenue to grow 32% to nearly $1.3 billion in 2023, compared to its 49% growth in 2022, as its adjusted EPS surges 185%.

Cloudflare runs a great business, but its stock seems too hot to handle at 141 times forward earnings and 16 times this year's sales. If a market downturn compresses those valuations to more reasonable levels, I'd confidently start a new position.

3. Workday

Workday's cloud-based human capital management (HCM) platform bundles staffing, payroll, budgeting, and analytics tools for large companies. To organize all of that data more efficiently, it recently unveiled its Workday AI Marketplace, which hosts a new bevy of AI and machine-learning apps to accelerate and automate certain tasks.

From fiscal 2018 to fiscal 2023 (which ended this January), Workday's annual revenue had a compound annual growth rate (CAGR) of 24%, even as it endured the pandemic and inflationary headwinds. During its latest investor day, it predicted subscription revenue (which accounts for most of its top line) would continue to grow 17% to 19% annually over the next three fiscal years.  

That outlook disappointed some investors, since Workday previously claimed it could maintain a long-term revenue growth rate of more than 20%. However, that's still a solid long-term growth rate, and it expects to expand its adjusted operating margin from an estimated 23.5% in fiscal 2024 to 25% in fiscal 2026.

At 40 times forward earnings and 7 times this year's sales, Workday doesn't look like a screaming bargain yet. But if its valuations cool off during a market downturn, I'd eagerly add more shares of this resilient cloud stock to my portfolio.