Investors want to have artificial intelligence (AI) stocks in their portfolios. It's arguably the most significant technology breakthrough since the internet, infiltrating all walks of life for consumers and enterprises. Experts believe generative AI alone could add up to $4.4 trillion in annual economic value.

That potential growth could be why C3.ai (AI 3.02%) is such a popular stock this year, up almost 200% since January. The company's name, its AI software, and its ticker symbol scream "AI stock" to investors. But there are concerns with C3.ai's fundamentals, headlined by a lack of profits.

Fellow software company Palantir Technologies (PLTR 3.73%) could be an excellent alternative for AI-focused investors. Palantir is making strides in AI and has a clear road to long-term earnings growth.

Here is what you need to know.

Customers are flocking to Palantir's AIP platform

Palantir has long been in the data analytics space. Its Gotham and Foundry platforms help government and enterprise clients analyze and find trends in data, allowing people to make decisions in real-time. Earlier this year, Palantir released AIP to an initial group of customers. CEO Alex Karp discussed AIP's rapid success in Palantir's third-quarter earnings call.

Karp said more than 300 organizations have tried AIP in the five months since its launch. For reference, the company reported 181 U.S. commercial customers as of the third quarter, so AIP's 300 interested parties are a potential influx of growth. He credited AIP as a contributor to the company's accelerating revenue increases in the third quarter compared to the second quarter:

PLTR Revenue (Quarterly YoY Growth) Chart

PLTR revenue (quarterly YoY growth); data by YCharts. YoY = year over year.

Karp also said that multiple customers are saying how much AIP has increased their productivity. For example, the Cleveland Clinic uses AIP to schedule procedures, improving the hospital's efficiency.

The CEO said that he expects AIP's impact on Palantir to intensify, so growth could accelerate. AIP looks like a blockbuster and game changer that could elevate the business and embellish its investment thesis.

Being a contender versus a pretender

Investors should scrutinize any stock's valuation when shares have almost tripled in under a year. This is where companies like C3.ai and Palantir are different from one another.

C3.ai has risen roughly the same as Palantir this year. However, the former company's lack of profits and its questionable growth prospects could imply that shares have risen more because of broader excitement over AI.

Meanwhile, Palantir's revenue growth has accelerated as AIP gains early traction with customers. The business turned consistently profitable this year under generally accepted accounting principles (GAAP). It is getting stronger, so the share price increase makes sense.

That doesn't mean that C3.ai won't improve and eventually justify its higher price, but it arguably makes it a riskier stock.

Could Palantir be cheap despite its meteoric rise?

Analysts are increasingly optimistic about Palantir's path forward, evidenced by rising expectations for earnings growth. Looking for 72% annual earnings growth is setting a high bar, but the stock is still a great buy today if the company's results come anywhere close to that.

PLTR PE Ratio (Forward) Chart

PLTR PE ratio (forward) data by YCharts; EPS = earnings per share.

At a forward price-to-earnings (P/E) ratio of 73, Palantir's price/earnings-to-growth (PEG) ratio is roughly 1. That means the stock is a potential bargain today if the company delivers on its expected growth. But that valuation has some cushion, even if earnings growth comes up slightly short of estimates. I generally like PEG ratios under 1.5 since I'm a long-term investor.

Being a long-term investor is the ultimate safety net. If AIP is the real deal -- and it looks good so far -- then Palantir should be worth a lot more in 5 to 10 years than it is now.