As in 2023, investors were once again captivated by the potential of artificial intelligence (AI) in 2024. But not every stock has benefited. Sure, Nvidia and Broadcom have had great years, but not every AI beneficiary was as fortunate.

Why would that be? For one, many traders look at results in the here and now. So, if a company had a near-term slip-up or a slowdown, their stocks were likely punished -- even if AI should provide a long-term tailwind for their business.

The following three examples were laggards in 2024, but looking ahead to 2025, they appear to be excellent pickups on the dips.

ASML Holdings

There would be no AI semiconductors at all without the extreme ultraviolet lithography (EUV) tools provided by ASML Holdings (ASML -0.32%), which has a monopoly on this crucial chipmaking technology. In that light, why would ASML's stock be down about 4% on the year and 35% from all-time highs?

The market appears to be honing in on a few short-term concerns. The first is China, where ASML has seen a surge of older and less-sophisticated deep ultraviolet lithography (DUV) sales in recent years, ahead of more stringent restrictions placed on equipment from China this year. Although ASML will continue selling to China, they will no longer be able to sell or service several types of machines, so that pull-in of China sales this year could lead to ASML's China revenue declining next year.

In addition, while the AI market is booming, larger, mature chip markets, like smartphones and PCs, have continued to languish for longer than expected in their post-pandemic lull. That recently led some foundries to pull back a bit on their near-term spending plans.

However, ASML still projects growth next year, even if it's lower than previously expected. More importantly, at the company's recent investor day, management kept its 2030 revenue and earnings targets intact.

Advanced chip production will now require more EUV machines versus DUV machines, and EUV machines are higher-revenue and higher-margin for ASML. Even better, ASML's higher-priced high numerical aperture (NA) EUV machines, which go for about twice the price of the low-NA EUV machines in use today, have just started selling this year.

The growth and increasing mix of advanced EUV machines should lead to margin expansion, fueling solid profit growth through this decade at least. With the long-term picture intact and ASML's competitive position nearly assured, long-term investors should buy this dip with both hands.

MongoDB

Artificial intelligence applications will have to reference lots of data and make sense of it all incredibly quickly, which will put a lot of importance on how that data is stored in a database. MongoDB (MDB -2.12%) has a disruptive architecture for databases, called a document architecture, which allows for more intuitive organization of unstructured data than the traditional SQL (structured query language) database, which stores data in a more restrictive row-and-column format.

If one thinks about the kinds of data relationships AI agents will have to retrieve and make sense of, MongoDB's document databases look increasingly better. Not only that, AI has recently made it much easier for enterprises to migrate legacy applications from traditional databases to MongoDB. To date, that has been a complex process leading to customer friction.

Despite these positives, MongoDB's stock is down 35% year to date and more than 50% below its all-time high.

The numbers 20 and 25 with an arrow between them painted on a street.

Image source: Getty Images.

Why would that be? According to management, the uncertain macro environment and companies figuring out what to do with AI have caused a slowdown in MongoDB Atlas usage. Basically, while companies are experimenting and learning about AI's potential, very few "killer app" AI software applications have caught on as of yet.

However, as AI improves and companies increasingly figure out how to deploy AI applications, AI app usage should take off. As a majority of MongoDB's revenue comes from its usage-based Atlas database-as-a-service, MongoDB will see the benefit in the building and usage of AI apps. However, we are not quite at that stage.

CEO Dev Ittycheria noted on the recent conference call with analysts that while many AI apps don't yet have good product-market fit, some are beginning to, with Ittycheria highlighting one such app built on MongoDB that has grown 10 times over the course of the year.

As the AI revolution moves from the infrastructure buildout to software applications, MongoDB should see an acceleration in usage. Trading near a historically low price-to-sales ratio of around 10, MongoDB could see a bounce-back year in 2025.

On Semiconductor

Most don't equate On Semiconductor (ON -1.51%) with AI, as its biggest business is in power chips for the automotive industry. Specifically, onsemi is the current leader in producing chips from silicon carbide (SiC), a material that's somewhat difficult to produce but is much more conductive and heat-resistant than traditional silicon.

SiC is thought to be crucial for future electric vehicles (EVs), and given the big slowdown in the EV market, onsemi is down 20% on the year and 40% off its all-time highs.

But with the extreme electricity demands of AI data centers and the latest AI chips generating tons of heat, silicon carbide is now making its way into power control systems for AI data centers, too. This year, onsemi unveiled its EliteSiC 650V MOSFET for AI data centers, and management has invested early to get behind this trend. While AI data centers are a small portion of onsemi's revenues today, look for that to get bigger over time.

Meanwhile, onsemi doesn't just make power chips; it makes sensors, too, especially for intelligent sensing needed in advanced driver assistance systems (ADAS) for modern cars and trucks.

And while 2024 was a down-cycle year for the auto industry overall, onsemi did land several large and important customer wins, including a huge multiyear deal with Volkswagen, the largest automaker in the world by revenue, and deals with Subaru and Denso, the world's second-largest auto systems supplier.

At just 16.5 times bottom-of-the-cycle earnings, look for onsemi to outperform when the auto and EV markets recover and the company's chips make their way into more AI applications.