Stock market volatility can be nerve-wracking. What's worse, it can cause normally clear-thinking investors to make snap decisions they later regret.

So, given the recent volatility within the artificial intelligence (AI) sector, now is a good time to take a closer look at two prominent names within the space, and ask: Is now the time to sell Palantir Technologies (PLTR -2.52%) and buy Alphabet (GOOG 0.18%) (GOOGL 0.21%)?

A large question mark on top of a stock chart.

Image source: Getty Images.

What's going on with Palantir?

First, let's take a quick look at Palantir. After posting an excellent quarterly report on Aug. 4, shares have experienced a steep pullback, dropping by more than 16% (at the time of this writing).

As always with Palantir, there are concerns about the stock's high valuation -- it sports an eye-popping price-to-sales (P/S) ratio of more than 115x. Yet, the big reason for the decline seems to be a short-seller report. In this report, the short sellers gave a $40 price target for Palantir, roughly one-quarter of its price as of this writing.

Needless to say, it's a bombshell report that claims Palantir's business model is overvalued. However, there is one crucial fact investors should know: The source of the report is not neutral. Citron Research, the organization that released the report, has a short position in Palantir -- meaning it profits as the price of Palantir stock declines.

That doesn't mean their arguments are invalid, but it is worth noting.

How Alphabet stock has performed

Now, let's turn to Alphabet. While Palantir stock has tumbled of late, Alphabet shares have steadily improved. As of this writing, shares are up 8% over the last month, whereas Palantir shares are up only 3%.

So, how has Alphabet dodged the torpedo that has sunk Palantir shares and brought down many other high-flying AI stocks? I chalk it up to Alphabet's diversified business model. Granted, Alphabet has plenty of exposure to the AI ecosystem. Its cloud services division is highly levered to AI spending; it sells smart devices powered by AI; and it has its own AI-focused division, called "Google Deepmind."

Yet, Alphabet also has the world's largest digital advertising business (Google Search), which generates about $200 billion in annual revenue. In addition, its YouTube business generates a further $40 billion per year. In other words, Alphabet isn't an all-or-nothing AI stock.

Is it time to favor Alphabet stock over Palantir?

So, the question remains: Is now the time to dump Palantir for Alphabet? Obviously, each individual investor will have to answer this question for themselves, based on their particular circumstances and risk tolerances. However, in general, I view the recent pullback in Palantir shares as an opportunity for long-term investors.

Remember, the argument over Palantir's current valuation largely misses the point. True, if Palantir never grew from its current size, its stock would be massively overvalued at its current price. However, the company is growing like a weed -- and no one really knows how large the company could eventually become.

What is known is that customers are racing to sign up with Palantir. In its most recent quarter (for the three months ending on June 30, 2025), the company reported a 43% year-over-year increase in its customer count. U.S. commercial revenue skyrocketed by 93% to $306 million.

Those figures give me confidence that Palantir's growth trajectory remains intact, meaning that Palantir remains an attractive option for long-term, growth-oriented investors.