Most stocks related to artificial intelligence (AI) have been on quite the run in 2024, and many have crossed over into territory that investors might deem "overvalued." However, some of these companies are still fairly priced, and poised for bull runs of their own that could get their values caught up with those of their peers.

I see two AI stocks in particular I think investors would be wise to scoop up now before the rest of the market catches on.

Alphabet

Alphabet (GOOG 9.96%) (GOOGL 10.22%) has been at the forefront of AI for a long time. The problem is it keeps tripping over its own feet. The tech giant has made one blunder after another in this arena, which is the reason its stock no longer receives the respect it once did.

Alphabet trades at 20.8 times forward earnings, while the S&P 500 and Nasdaq-100 trade at ratios of 21.4 and 28.7, respectively. Because Alphabet is tech-focused, comparing its valuation to the tech-heavy Nasdaq-100 is the most logical comparison. The S&P 500 is much broader, with many components in the banking, materials, and industrial sectors, which tend to trade at lower valuations. This pulls its average forward price-to-earnings (P/E) ratio downward, yet Alphabet is still valued below the S&P 500.

The market conveys that it doesn't respect Alphabet, but that's a big mistake.

Alphabet is amid a turnaround in two areas. First is its advertising business. Regardless of what the news headlines say about Alphabet's AI prowess, it is primarily an advertising company. In the fourth quarter, 76% of its revenue came from ad-related sources, and its total revenue rose by 11% year over year. Management is bullish on the ad market and is seeing greater returns on ads that utilize its AI models.

This flies in the face of what many hear about Alphabet's AI products. Alphabet is struggling to produce a consumer-facing generative AI model that won't directly generate revenue, but it's likely succeeding in its development of business-facing AI systems used for advertising and other models.

As a result, Alphabet should continue to post strong revenue and earnings growth through 2024, making the cheap stock look even cheaper. To me, this makes the stock a screaming buy, especially because its valuation is far cheaper than any of its "Magnificent Seven" peers.

UiPath

UiPath (PATH 0.26%) is a much smaller company than Alphabet, but it is still making waves in its industry. Its robotic process automation software allows its clients to automate repetitive tasks, freeing their employees to do other tasks that require more original and creative thinking.

While there are many tasks that robotic process automation software can take over, bringing the power of AI to bear is expanding that list significantly. By using AI to scrape information from emails, reports, or data flows, UiPath's products become more powerful.

UiPath has seen tremendous demand for this software. In its fiscal 2024's fourth quarter, which ended Jan. 31, annual recurring revenue rose 22% year over year to $1.46 billion. It's also working toward becoming a fully profitable company, and posted an operating profit of $15.1 million in Q4.

These are traits of a business that should be respected in the market, but UiPath isn't. Instead, it trades at a price-to-sales ratio of 10.5, while many of its AI peers sport valuations greater than 20 times sales.

PATH PS Ratio Chart

PATH PS Ratio data by YCharts.

UiPath is just as successful as its peers, and sometimes even more so. But because it isn't purely focused on AI, it isn't receiving the same respect from the market. Because of that, I think UiPath is a great stock to buy as it could be slated for a bull run.