As artificial intelligence (AI) has made its way to the mainstream, it's no wonder investors have an increased interest in adding AI stocks to their portfolios. The good thing about AI is that it's broad enough to have a sizable number of companies in the industry approaching it from different angles.

If you're looking for AI-related companies to invest in, here are three great examples.

1. Microsoft

Considering ChatGPT is largely responsible for the recent AI hype, it only feels right to include Microsoft (MSFT 0.37%). In 2019, Microsoft invested $1 billion in OpenAI, the creator of ChatGPT and AI image generator Dall-E. This year, Microsoft doubled back with another $10 billion investment.

The Microsoft-OpenAI partnership shows Microsoft is serious and taking tangible steps to incorporate AI capabilities into its suite of services, starting with its cloud service, Azure, which is second in global cloud market share behind Amazon Web Services (AWS) and an increasingly important part of Microsoft's business. 

Microsoft's move to incorporate OpenAI's products within its platform should help Microsoft become the preferred platform for companies looking to develop AI models or integrate them into their business. I believe Microsoft building AI tools as platforms will be a good strategic decision because it can help expand its (already impressive) enterprise customer base.

2. Upstart

Upstart (UPST 0.79%) is a fintech company that uses AI to make lending decisions incorporating nontraditional factors like education and employment. After going public in December 2020 at $20 per share, its stock price was around $390 just 10 months later. It's now down over 94% since its October 2021 peak. To call the last few years a roller coaster for investors would be an understatement.

Upstart's business relies heavily on generating new loans, so higher interest rates have been taking a toll on its business as people shy away from taking out loans. In Q1 2023, Upstart's lending partners originated 78% fewer loans than in Q1 2022, and its $102.9 million in revenue was down 67% year over year. 

I led with the negative because I don't want to sugarcoat the outlook for Upstart in the near future. However, brighter days should be ahead, with the company announcing a $2 billion funding deal that should help it weather this storm.

From a technical standpoint, Upstart has been a pioneer in AI-based underwriting and lending, revolutionizing an outdated (by my standards) model. Although its stock price hasn't reflected it, there's still lots of potential for its technology and incorporating AI into financial services.

At current prices, the potential upside seems to far outweigh the downside. Still, investors should be ready to stomach some volatility as the company's performance fluctuates with the cyclical nature of interest rates and loan demand.

3. Nvidia

Nvidia (NVDA -3.33%) is a leader in producing graphic processing units (GPUs), which are an important part of AI for various reasons. Large language models and AI applications like ChatGPT require a lot of computing and data processing, and Nvidia's chips help make this process faster and more efficient. The data centers that much of AI relies on are filled with Nvidia's chips.

Nvidia's successful chip business helped mask the weaknesses in its PC business as of late, but there's still a chance it will eventually take a toll on its top line. Considering the margins the company makes from its chips, it shouldn't be enough to throw the company off track, though. Many of Nvidia's top chips used for AI cost tens of thousands of dollars. 

Amid the AI boom, Nvidia's stock has increased more than 100% year to date (as of May 17), realistically placing it in the overvalued territory by most measures. The stock may be risky short term at current prices, but it's well worth putting on the radar from investors with time on their side. The GPU market was worth around $40 billion last year and is projected to grow to $400 billion by 2032, according to Global Market Insights -- a compound annual growth rate of 25%. 

There's no doubt that Nvidia will continue to play a huge role in developing and expanding AI capabilities. Without the company's chips, most consumer-facing AI tools would be far less advanced. And the demand likely isn't slowing anytime soon.