Palantir Technologies (PLTR 0.68%) has been one of the standout performers on the stock market in 2023, with huge gains of 180% so far. Artificial intelligence (AI) has been one of the key reasons behind the stock's terrific surge, as the company is expected to win big from the fast-growing adoption of this technology.

However, Palantir's revenue growth has been impacted this year by a slowdown in government spending, which may be a point of concern for investors given the stock's rich valuation. Does this mean that Palantir stock isn't a worthy investment anymore? Or, will artificial intelligence accelerate its growth and help justify the valuation?

The stock is richly valued, but that's half the story

Palantir is now trading at an expensive 19 times sales, which is nearly triple the company's price-to-sales ratio at the end of 2022. Also, its trailing earnings multiple stands at 262. However, the surge in the company's stock price has mostly been driven by its prospects in the AI software market, not by its financial growth, which slowed in 2023.

Palantir's revenue in the first nine months of 2023 increased 15% year over year to $1.6 billion. The company forecasts 2023 revenue to land at $2.22 billion, which would be a 16% jump over 2022's top line. That would be slower than the 24% jump in Palantir's revenue in 2022.

PLTR PS Ratio Chart

PLTR PS Ratio data by YCharts

Palantir's growth this year has been affected by a slowdown in government spending. The company got 55% of its revenue in the third quarter by selling its software platform to government agencies. However, Palantir's government-related revenue increased just 12% year over year to $308 million. The company's total revenue during the quarter was up 17% year over year to $558 million.

The good part is that Palantir management expects government spending to pick up. Management pointed out on the company's November earnings conference call that it has started winning new government contracts, thanks mainly to the growing adoption of AI and machine learning.

A study by Stanford University notes that the U.S. government spent $3.3 billion on AI contracts in 2022, up 22% from the previous year. Looking ahead, global spending on AI hardware, software, and services is anticipated to jump to $300 billion in 2026 from this year's estimate of $154 billion. As a result, Palantir could land more federal contracts as governments around the globe integrate AI into their functions.

The growth of the AI software market will also have a positive impact on Palantir's commercial business. The company's commercial revenue was up 23% year over year in Q3 to $251 million. Palantir's total customer count increased an impressive 34% last quarter to 453, driven by a 45% year-over-year jump in the number of commercial customers to 330.

AI can help Palantir sustain the growth in its customer base thanks to the rapidly growing adoption of its Artificial Intelligence Platform (AIP). Management remarked on the earnings call that Palantir "almost tripled the number of AIP users last quarter, and nearly 300 distinct organizations have used AIP since our launch just five months ago."

With the AI software market set to grow at an annual rate of 31% through 2027, Palantir could witness an acceleration in growth as it attracts more customers looking to use AI, while also benefiting from higher spending from its existing customers.

All this explains why Palantir's growth is expected to accelerate over the next couple of years.

PLTR Revenue Estimates for Current Fiscal Year Chart

PLTR Revenue Estimates for Current Fiscal Year data by YCharts

What should investors do?

AI played a central role in Palantir's surge this year, and it could continue to be a catalyst for the stock as it is considered to be one of the leading players in AI software. So, investors who already hold Palantir stock could continue to hold it in anticipation of that boost. But if someone is looking to buy the stock now, they will have to pay a rich multiple to do so.

However, an acceleration in Palantir's growth should help justify the company's valuation, which is why its forward-looking multiples are lower than the trailing multiples.

PLTR PS Ratio (Forward 1y) Chart

PLTR PS Ratio (Forward 1y) data by YCharts

What's more, analysts are expecting Palantir's earnings to increase at an annual rate of 85% over the next five years. That would be a huge improvement over the past five years, when the company's bottom line has shrunk at a rate of almost 8% a year. Growth-oriented investors can still consider buying Palantir despite its valuation since it seems built for more upside -- thanks to a big catalyst in the form of AI.