There's an argument to be made that 2023 is the year of artificial intelligence (AI). ChatGPT -- the creation of tech start-up OpenAI -- helped ignite the fervor by amassing more than 100 million monthly active users just two months after its debut.

ARK Investment Management co-founder and CEO Cathie Wood stoked the flames with the release of the firm's Big Ideas 2023 report, which found that AI would accelerate productivity gains among knowledge workers by "more than fourfold by 2030." Furthermore, the report estimated that AI software could generate sales of as much as $14 trillion by 2030.

These factors started a mad dash by investors to add AI-related stocks to their portfolios. While the stampede is understandable, it's also fraught with risk. Not all AI stocks are created equal. With that as a backdrop, let's look at one AI stock to buy hand over fist and one to avoid like the plague.

A person looking at graphs and data on a see-though computer display.

Image source: Getty Images.

1 AI stock to buy hand over fist: Nvidia

If there's a single company that provides much of the backbone of AI, it's Nvidia (NVDA -3.33%). More than a decade ago, the company bet the farm that the future of computing technology would be dominated by AI -- and Nvidia is finally reaping the rewards of the seeds it has sown.

Nvidia graphics processing units (GPUs) were among the first processors to be used to develop modern AI systems. The chips enabled parallel processing, or the ability to run a multitude of complex mathematical computations simultaneously, making them a perfect workhorse for the complex and rigorous requirements of AI.

The company didn't stop there, however, developing and bundling open-source software libraries so developers and AI researchers didn't have to reinvent the wheel. Nvidia also offers a collection of more than 600 pretrained AI models that help developers create AI systems more quickly and eAI'sciently.

Just last month, Nvidia d a turnkey solution: the DGX cloud AI supercomputing service. This offering resides in the cloud, providing enterprise companies with everything they need to develop advanced AI models -- with only a web browser. The solution is already available on Oracle Cloud and will soon debut on Microsoft Azure and Alphabet's Google Cloud, with additional cloud infrastructure providers coming soon.

Some might balk at paying 22 times next year's sales, but consider this: Over the past decade, Nvidia stock has increased more than 8,000%, driven by revenue gains of 534%. So investors shouldn't be penny-wise and pound-foolish. Besides, you can't spell Nvidia without "AI," and it's one AI stock I'd buy hand over fist.

1 AI stock to avoid like the plague: C3.ai

To say AI stocks have been on fire this year might be an understatement. C3.ai (AI 0.09%) might be the poster child for this phenomenon, with shares up 59% in 2023. But that only tells part of the tale.

At one point, shares of the enterprise AI specialist were up more than 200% year to date, driven higher by the surge in interest in AI. The company's market cap of less than $2 billion is partially to blame for the stock's volatility, but there are other factors at play that make C3.ai far riskier than your average AI stock.

In early April, Kerrisdale Capital issued a short report on C3.ai, citing a number of red flags. While many of the matters raised should be taken with a grain of salt, two in particular raised issues for me as a potential investor.

First, the report details "an unhealthy amount of executive turnover." Wall Street dislikes the uncertainty that accompanies the departure of any C-suite executive, but C3.ai has "cycled through five CFOs since 2019. While there might well be a reasonable explanation for these transitions, it does raise the question of why so many so quickly.

The second -- and perhaps as alarming -- issue is the company's dependence on its largest customer, Baker Hughes, which represents about 30% of C3.ai's annual revenue through 2025. While the company has "noncancellable revenue commitments" with Baker Hughes, Kerrisdale noted a number of downward revisions over the past several years that cut those commitments significantly, sometimes by as much as half. I previously raised questions about C3.ai's heavy reliance on Baker Hughes, particularly if the revenue commitments are subject to significant modifications.

Combine these risks with the company's mounting losses and ongoing cash burn, and C3.ai is one AI stock I would avoid like the plague.