Shares of big data software company Palantir (PLTR -3.64%) rallied 47.5% in the first half of 2024, according to data from S&P Global Market Intelligence.

Palantir got a tremendous boost after reporting its fourth quarter 2023 earnings in February, causing the stock to rise to levels not seen since late 2021.

The recovery has been a promising one for Palantir, which not only beat revenue guidance but also posted its first profitable year, on both a GAAP and non-GAAP basis.

Palantir beats estimates amid AI enthusiasm

In the first half of 2024, the enthusiasm over generative AI boosted many tech stocks, but mostly in the semiconductor sector, with many software companies struggling.

Palantir was an exception, though, as it has come to be regarded as an AI pioneer. Started back in the early 21st century as a big data platform to help the U.S. government fight the war on terror, Palantir's software has more recently been adopted by commercial companies. And with the AI craze taking hold over the past 18 months, more and more enterprises are experimenting with and adopting Palantir software.

In its fourth quarter 2023, Palantir dazzled with 19.6% revenue growth, beating analyst estimates, and marking an acceleration over the prior quarter. While $0.08 in adjusted earnings per share was only in line with estimates, investors were apparently OK with that, since Palantir is the rare newly public software company that has reached profitability.

Likely to have been fueling the bullishness was Palantir's strong adoption by commercial customers. In Q4, Palantir's commercial revenue grew 32%, making up 47% of revenue, compared with just 11% growth in the government segment. Getting even more granular, U.S. commercial revenue was up a whopping 70%, with the number of U.S. commercial customers growing 55% over the prior year.

The acceleration in commercial adoption led to a lot of enthusiasm, but Palantir stock ended the quarter roughly where it was immediately after its February earnings report, as some analysts came to question its rather high valuation following the surge.

Furthermore, the company's Q1 2024 earnings release in early May didn't generate the same kind of enthusiasm, despite revenue that once again beat analyst estimates while management raised its full-year guidance.

The possible reason for the lack of enthusiasm is that the Q1 beat came from an acceleration in government revenue, which went from 11% to 16% growth between Q4 and Q1, while commercial revenue decelerated to 27%, with U.S. commercial revenue slowing to 40%. With investors seemingly focused on the much larger commercial addressable market, that deceleration may have caused some mild consternation.

Where Palantir stands now

Palantir has had solid performance this year, but the stock is expensive at 28 times sales. While Palantir does have a substantial $3.9 billion cash pile and no debt, that would lower its valuation by only about about 6% when factoring in the cash.

As we can see from the muted reaction to its otherwise solid first-quarter earnings, Palantir will have to really dazzle for the stock to justify this level and continue going higher -- especially the commercial segment. Palantir is no doubt a very interesting company seeing increased commercial adoption, but investors shouldn't feel the need to chase the stock here.