What happened

Palantir Technologies (PLTR 3.47%) reported a slight beat in its most recent quarter, and said it expects to be profitable for the rest of the year, thanks to strong demand for its artificial intelligence (AI) software. Investors are cheering the results, sending Palantir shares up 20% on Tuesday morning.

So what

Predictive software is Palantir's calling card, so it is no surprise to see the company among the beneficiaries of the AI trend. Palantir makes advanced data analytics tools that help corporate and government customers sort through data, and is famously credited for helping the Pentagon locate Osama bin Laden.

The company reported first-quarter earnings of $0.05 per share on revenue of $525.2 million, beating Wall Street expectations for a $0.04 per-share profit on sales of $505.6 million. The company was profitable on a generally accepted accounting principles (GAAP) basis for the second consecutive quarter, a trend management expects to continue through the rest of 2023.

"We now anticipate that we will remain profitable each quarter through the end of the year," CEO Alexander C. Karp wrote in a letter to shareholders. "The depth of engagement with and demand for our new Artificial Intelligence Platform (AIP) is without precedent."

Commercial revenue grew 15% year over year in the quarter, while the company's larger government division grew revenue by 20%. Palantir's customer count was up 41% year over year, and up 7% since the end of the last quarter.

Now what

Palantir sees second-quarter revenue of between $528 million and $532 million, which is slightly below the $536 million Wall Street is expecting. For the year, Palantir expects sales of between $2.185 billion and $2.235 billion, compared to expectations for $2.2 billion.

Profitability is understandably the focus, and Palantir is moving in the right direction. But this stock has a history of getting ahead of itself, and investors need to be cautious about overreacting to one quarter. Palantir shares soared 300% above its offer price in the initial months after its September 2020 initial public offering, only to give back all those gains in the months that followed.

The issue for investors continues to be how to value Palantir. With the stock at about 10 times sales, Palantir trades at a discount to commercial-oriented comparables like Snowflake but well above other government IT companies like Booz Allen Hamilton.

The hope for investors is that over time, commercial revenue will outpace government and Palantir will be able to better justify a Snowflake-like multiple. But with government revenue growing faster in the quarter, there is no indication that will happen anytime soon.

Even with Tuesday's move, Palantir shares are still below their $10 offer price from late 2020. The quarterly results are a sigh of relief for investors worried about the pace of growth and the move toward profitability, but the bigger questions about the company remain unanswered.