Artificial intelligence (AI) has become an overwhelmingly hot topic on Wall Street this year. Companies can't stop talking about AI on earnings calls, and investors are piling into AI stocks, trying to grab a piece of the future.

Finding a good deal can be tricky during times like this, but it's not impossible. Arguably, two companies critical to AI's growth over the coming years could still have room to run and are hiding in plain sight. One pick-and-shovel AI stock and an unloved tech giant could level up your portfolio. Here's why.

Taiwan Semiconductor: 31% potential upside

Training and operating AI models is a tremendous undertaking. ChatGPT requires a staggering amount of computing power. Just running the model costs approximately $700,000 each day. AI's long-term growth will almost assuredly create a lot of demand for semiconductor chips, and Taiwan Semiconductor (TSM 2.71%) is the world's largest chip manufacturer.

The company manufactures over 12,000 chips for more than 500 customers, generating nearly $76 billion in annual revenue. Taiwan Semiconductor accounts for more than half of global foundry (chip manufacturing) revenue and has a reputation for building many of the industry's most advanced chips. Taiwan Semiconductor will probably see a lot of the world's AI-driven chip demand flow through its business.

Wall Street analysts have issued price targets for the stock, from as low as $85 to as high as $126. The median estimate, $111.50, implies a 31% price upside. From an earnings standpoint, the stock trades at a price-to-earnings ratio (P/E) of 16, below the broader market, despite analysts calling for an average of 20% annual profit growth moving forward.

So why is the stock lagging? It could be that investors are wary of the company's proximity to China during a time of high political tension. Warren Buffett recently admitted that this played a role in his decision to sell Berkshire Hathaway's stake in the business. Additionally, semiconductors are sensitive to the economy, and a potential recession could hit the economy in the next few quarters. These concerns are noteworthy, but it's hard to deny the long-term growth ahead for Taiwan Semiconductor, especially as AI flourishes.

Alphabet: 20% potential upside

If AI is the world-changing opportunity many believe it is, big tech companies will understandably be involved. While Microsoft's partnership and investment in ChatGPT creator OpenAI look like a genius move now -- don't underestimate Alphabet (GOOGL -1.97%) (GOOG -1.96%). Google search is the technology conglomerate's most prominent business, responsible for just over half its $284 billion in annual revenue.

Google is the world's most trafficked website and dominates global search queries with a 93% market share. Following the buzz around Microsoft's AI-infused Bing search, Alphabet has begun making countermoves. It recently unveiled a host of AI integrations into core products, giving Google Search generative AI capabilities across searches, shopping, and more. It's also infusing AI with its popular Google Workspace products, such as Gmail, which will write emails based on user requests. Alphabet's entrenched dominance arguably gives it a home-field advantage in that it can quickly roll out features to its massive user base, versus Microsoft, which must take share away from Alphabet.

Wall Street analysts have cast a wide net of price targets, ranging from $100 to $190. The $130 median estimate would mean investors stand to see 20% in potential price gains. Right now, some view AI as a potential threat to Google search, which has pushed the stock's P/E to 20, well below its average P/E of 29 over the past decade.

But Alphabet's growth outlook remains solid. Analysts estimate earnings will grow by an average of 14.5% annually over the next three to five years, and the company just announced a massive $70 billion share repurchase program. AI could hurt Alphabet if it disrupts Google, but it's way too early to make that leap, and Alphabet's strong fundamentals are attractive at this valuation.