Palantir Technologies (PLTR 1.00%) regained its footing in 2023, fueled by a rebound in technology stocks and recent advances in artificial intelligence (AI). Shares of the data mining and AI specialist gained 167% last year, nearly seven times the 24% gain of the S&P 500.

Furthermore, Palantir stock surged 52% just in the past week in the wake of a strong financial report. These moves were in stark contrast to 2022 when the stock lost more than 64%.

Recent evidence suggests there could be more to come, as Palantir is leveraging its decades-long experience in cultivating AI algorithms. As the demand to implement AI solutions accelerated, the company pivoted quickly to apply its expertise to generative AI -- and the results are telling.

What does this mean for investors who sat out Palantir's recent rally? Should they buy the stock despite its (seemingly) frothy valuation or turn their gazes to other opportunities?

A person typing on a laptop with various AI icons displayed above.

Image source: Getty Images.

A brief history

There were high hopes for Palantir when the company went public in late 2020, more than 17 years after it was founded. In the months following its debut, the stock soared as much as 310% before leveling off.

However, investors soon were forced to reset their growth expectations. The worst business and economic conditions in more than a decade sent companies scrambling to cut discretionary spending, and the adoption of Palantir's data mining and AI services was put on the back burner.

The news wasn't all bad. On the strength of the company's government contracts, revenue grew 24% in 2022. Perhaps more importantly, management set the stage for last year's surge by focusing on costs and steering Palantir toward profitability.

The company is now enjoying the fruits of that strategy, as Palantir has delivered five successive quarters of GAAP profitability. Management expects that trend to continue.

Now, two decades after its founding, Palantir's knowledge in the field of AI is in high demand. Its track record of developing custom solutions for the U.S. government and its allies gives the company the experience and credibility that businesses are looking for to implement AI.

At the crossroads of experience and innovation

The accelerating adoption of AI is providing the secular tailwinds necessary to drive Palantir to new heights. But it's the company's rapidly improving financial picture that has attracted investor attention.

In the fourth quarter, Palantir's revenue grew 20% year over year (and 9% quarter over quarter) to $608 million, well ahead of Wall Street's expectations -- but that only tells part of the story. U.S. commercial revenue surged 70% -- driven by demand for AI.

Overall, commercial revenue grew 32% and now accounts for 47% of sales. This means that Palantir is less reliant on lumpy government revenue, which has long been a sticking point for some investors.

It's the company's go-to-market approach for its Artificial Intelligence Platform (AIP) that should have investors most excited. The company's Boot Camp sessions allow new and existing users to create customized AI solutions "from 0 to use case in five days or less," according to Palantir. Perhaps as importantly, the company's generative AI solutions can sit atop Palantir's existing AI solutions, providing users with even more functionality.

CEO Alex Karp pointed to "both the strength of our software and the surging demand that we are seeing across industries and sectors for artificial intelligence platforms."

How to view Palantir stock now

I'd be remiss if I didn't address the elephant in the room. At first glance, Palantir's valuation might look a bit frothy at 76 times forward earnings and 25 times forward sales -- but those metrics fail to take into account the company's impressive growth. However, its forward price/earnings-to-growth (PEG) ratio -- which factors in Palantir's expected growth rate -- is less than 1, the benchmark for an undervalued stock.

In the wake of its blockbuster fourth-quarter financial performance, Palantir earned a couple of upgrades and a host of price-target increases as Wall Street scrambled to update its models based on the growing demand for Palantir's services.

Given the company's decades of expertise in the field and the growing demand for AI solutions, Palantir could ride these secular tailwinds for the foreseeable future. That, combined with its surprisingly modest valuation, illustrates why Palantir Technologies stock is a buy.