Artificial intelligence (AI) stocks have many attractive growth opportunities. But there are also many risks that come with these types of investments, especially as valuations are getting out of control.

While Warren Buffett's Berkshire Hathaway owns shares of multiple tech companies, including Apple, Amazon, and Snowflake, you probably won't see the value-oriented investor making any new investments solely because of AI any time soon. Still, investors can learn a lot from the Oracle of Omaha since he has seen his fair share of volatility and bubbles over the years.

Are investors repeating mistakes from the past?

Stocks are technically in a bull market, but that largely has to do with the bubble that has formed in AI. There has been lots of excitement surrounding businesses that are working on AI chatbots or that have launched products and services related to AI.

Pure-play AI stock C3.ai (AI 3.02%) is up 200% this year. Data analytics company Palantir (PLTR 3.73%), which recently launched a new AI platform, soared 125%. Shares of trillion-dollar tech giant and OpenAI investor Microsoft (MSFT 1.82%) popped 39% -- a huge return for a company that size. 

Fears that a possible bubble is forming or that it has already formed aren't unfounded, given this hype. In recent years, it was blockchain and metaverse hype that led to short-lived rallies for some stocks, and now it could be AI's turn.

Buffett has just about seen it all, and one thing he knows is that people often repeat the same mistakes: "What we learn from history is that people don't learn from history."

Why Buffett's words could prove ominous

Last year, shares of Palantir and C3.ai crashed by around 64%. Microsoft fell by 29%. A combination of a bear market and sky-high valuations led to a crash in tech stocks. And while Palantir and C3.ai haven't gotten back to the highs they hit in 2021, there's still the danger of another sell-off.

The reason is that while there are opportunities in AI for these businesses, it's over the long term, and it could take years for these companies to capitalize on that potential. One or two underwhelming quarters, and these stocks could soon be in sell-off mode again.

C3.ai, for example, recently provided underwhelming guidance of only 15% growth for its 2024 fiscal year (ending in April).While that may prove to be a conservative forecast, it underscores why investors might want to slow down right now: Sales and profits for AI companies may not take off right away. There is, after all, still a possible recession looming this year.

AI is coming, but it could take a while for it to lead to significant growth opportunities for businesses. And in the meantime, a lot can change.

Different companies might emerge; different areas of AI could prove to be more lucrative and promising than just AI as a whole. And simply being involved with AI doesn't guarantee success; companies still need to have strong financials so that they can invest in new opportunities and build out their operations.

Just as every tech stock of the past few decades hasn't been a success, not every AI stock will be a winner, either.

Investors should consider the risk that comes with AI stocks

C3.ai, Palantir, and Microsoft are great examples of AI stocks because they all come with varying levels of risk:

  • Microsoft is a hugely profitable company that comes with minimal long-term risk because its operations are robust and future earnings growth looks probable. The downside is that at 36 times earnings, it's already trading at a hefty premium; the S&P 500 averages a multiple of just 19. 
  • Palantir is a bit riskier since it has only recently become profitable, projecting that 2023 will be the first year that it is in the black.
  • C3.ai, which is purely focused on AI, is the riskiest of the three because while it expects its financials to improve, it only expects to be profitable on an adjusted earnings basis by the end of its current fiscal year. At 4 times revenue, the stock is trading at a cheaper valuation than Palantir, which investor are paying 7 times sales for, but that might not be enough of a discount to justify the added risk.

It's important to consider which investment is the most suitable for your level of risk tolerance. While a stock like Microsoft provides the most stability, it might not have as much potential upside as a smaller stock like C3.ai offers.

But the danger of ignoring valuations and risk and simply buying stocks that are soaring is that investors could find themselves repeating mistakes and buying into a bubble that could be due to pop in the near future.