While artificial intelligence (AI) stocks were all the rage in the first half of the year, they've cooled off since July. This pullback was likely necessary, as the market was trading too much on hype rather than actual results.

Still, there are a few AI stocks worth buying right now, and these three are at the top of my shopping list.

Alphabet

Alphabet (GOOG 9.96%) (GOOGL 10.22%) is one of the best AI investments available. Whether you're looking at it from a search, advertising, or cloud computing perspective, AI plays significant roles in its business. That reflects CEO Sundar Pichai's 2016 statement that Alphabet was going to be an "AI first" company.

The business is also a sleeping giant. In the second quarter, its revenue only grew 7%, but that's because the advertising business is still recovering from the decline in marketing spending caused by recessionary fears. As a whole, the company's ad revenue only increased by 3% in Q2.

But Google Cloud was a different story -- its revenues rose at a brisk 28% pace, making it the fastest-growing cloud computing segment among its primary competitors.

Furthermore, Alphabet's profitability increased slightly in Q2, reflecting the impact of its layoffs and other cost-cutting efforts. Its operating margin rose by 1 percentage point year over year to 29%. That was helped along by Google Cloud's newfound profitability -- the past two quarters were the segment's first in the black. So while the advertising market slowly recovers, Alphabet is still growing its business incrementally. Once ad revenue starts to grow again meaningfully, Alphabet could be the top-performing big tech stock.

With the stock only trading for 23 times forward earnings, it's also a bargain. The combination of Alphabet's dominance in its existing businesses and the potential upsides from its AI investments make it a no-brainer buy right now.

CrowdStrike

Cybersecurity has never been more critical for businesses. With cyberattacks becoming more severe and common, businesses of all sizes must protect network endpoints like servers, laptops, and phones. That's where CrowdStrike (CRWD 2.03%) enters.

CrowdStrike is an AI-first security platform that uses trillions of signals collected weekly across its client base to analyze computing activity. If it detects an anomaly, it can quickly shut down a breach before the incursion does further damage. After an attempted attack happens, information about the activity pattern is shared across the CrowdStrike platform, helping protect other clients from future attacks of the same variety.

CrowdStrike calls this product its Falcon platform, and it deploys a segment of AI known as machine learning that uses new information to adjust and improve the operating model automatically. While endpoint protection is CrowdStrike's bread and butter, the company has more than 20 additional offerings spanning other cybersecurity areas like threat intelligence and identity protection.

CrowdStrike is still relatively young and growing rapidly, as demonstrated by its 42% annual recurring revenue growth rate. However, it is starting to transition into a profitable company. It posted its first positive earnings per share number in its fiscal 2024 first quarter, which ended April 30. While the profit was relatively small -- just $491,000 on $693 million in revenue -- it was a solid start.

With CrowdStrike growing rapidly and becoming profitable, it looks like a top AI stock to buy right now.

Taiwan Semiconductor Manufacturing

You need the most powerful chips available to power all of these AI workloads. If you're looking for the best, look no further than Taiwan Semiconductor Manufacturing (TSM 1.26%). It's far and away the leading third-party contract chip fabricator, making chips for companies including Nvidia, Advanced Micro Devices,  and Apple. While the chips it manufactures using its 5nm (nanometer) and 7nm process technology are the most potent varieties available, it will soon launch production of chips made with 3nm process technology, and these more powerful and energy-efficient chips should be highly valued.

Although the world is in a bit of a chip demand downturn thanks to weaker consumer demand for technology, Taiwan Semiconductor Manufacturing has excellent long-term potential. Wall Street analysts expect its revenue to decline by 12% this year but to rise by 23% in 2024. Furthermore, the 3nm chips will finally start contributing to the top line, where they will balance out all the resources the company spent on R&D for the new process node.

Because TSMC is a cyclical company, its stock trades at a discount to many big tech companies.

TSM PE Ratio Chart

TSM PE Ratio data by YCharts.

With the stock only trading for 18 times forward earnings, it looks like a great buy. However, if you look at the projections for a little bit further into the future, you'll see that the stock trades for 15 times expected 2024 earnings. So by accepting a little bit of short-term pain, you can own a stake in a company that plays a vital role in developing cutting-edge AI technologies. Additionally, with the best GPUs and smartphones being powered by chips made by Taiwan Semiconductor, it's also supported by strong consumer demand.

Taiwan Semiconductor makes for a great buy if you're looking for an AI investment, but you'll have to maintain a long-term mindset (at least three to five years) for the purchase to work out.