It's been a volatile few years for some tech companies. Consider big-data firm Palantir (NASDAQ: PLTR), which has seen it shares soar 152% year to date, and yet it's still down by more than half from a high of almost $39 in early 2021. 

While the Denver-based company has historically struggled with overvaluation, low margins, and profitability, some of these challenges look set to resolve -- especially as artificial intelligence (AI) technology opens up exciting new opportunities.

Let's see what could be next for Palantir.

A history of overvaluation

Founded in 2023, Palantir specializes in big data analytics with much of its business coming from U.S. government clients. Its shares hit public markets through a direct listing in 2020, quickly soaring before collapsing as its high valuation and weak margins eroded investor optimism.

At its peak, Palantir had a stratospheric price-to-sales ratio of about 50, well above the market average of 2.4. And while the valuation has now fallen to 17 times sales, this is still high, especially considering Palantir's modest growth rate and lackluster margins.

PLTR PS Ratio Chart

PLTR PS Ratio data by YCharts. PS Ratio = price-to-sales ratio.

In the third quarter, revenue increased by only 13% to $533.3 million, with a net income of just $28.1 million. Palantir's profit margins are limited by its extreme levels of stock-based compensation, which are shares given to management and employees as part of their payment packages.

This outflow totaled a whopping $114.2 million in the third quarter alone. While this compensation strategy can save cash, it is a real expense because it creates equity dilution, reducing investors' claims on Palantir's future earnings and cash flow.

What could the future hold for Palantir?

Over the next five years, Palantir will need to supercharge growth to overcome the impacts of its dilution. The good news is that AI could help the company achieve this goal. According to CEO Alex Karp, Palantir was "built for this moment." And in August, the company launched its new Artificial Intelligence Platform (AIP), which combines its proprietary machine learning technologies with large language models, a type of generative AI algorithm trained on vast amounts of data.

AI is already highly synergistic with Palantir's existing operations. As a big data analytics and consulting company, it specializes in discovering actionable insights in large amounts of information -- a task that AI can accelerate or even automate. And the company has begun scoring AI-related contracts with its large government clients.

Person looking at data and spreadsheets on a computer.

Image source: Getty Images.

In September, the U.S. Department of Defense (DoD) awarded Palantir a $250 million contract related to yet-unspecified research with artificial intelligence and machine learning. This deal has big implications because it indicates the depth of Palantir's relationship with the government while also serving as a vote of confidence in the quality of its AI tools.

What about the valuation?

With a forward price-to-earnings (P/E) multiple of 61, Palantir stock is substantially more expensive than the S&P 500 average of 24. This is a high valuation, considering its modest growth rate and high levels of stock-based compensation, which introduce shareholder dilution and pressure earnings.

That said, AI technology could potentially transform the company over the next few years. And Palantir's contracts with high-profile clients like the DoD could be the start of an impactful new revenue stream. Investors may want to wait for these trends to play out over a few more quarters of data before taking a position in the stock.