After a stock market sell-off in 2022, excitement over tech this year boosted many companies. The debut of OpenAI's ChatGPT last November put all eyes on artificial intelligence (AI), sending many tech stocks soaring.

The generative technology has the potential to bolster countless industries. As a result, the AI market is projected to expand at a compound annual growth rate of 37% through 2030 (per Grand View Research). Despite investors rallying to the industry this year, there is still massive potential for companies that were slightly late to the market. 

Here are two artificial intelligence stocks that could make you a fortune over the long term. 

1. Amazon

Amazon (AMZN 2.94%) started 2023 at a low point, having lost 50% of its stock value in 2022 when it suffered steep losses in its e-commerce segments. However, the company enjoyed a solid recovery this year, with its stock up 59% since Jan. 1 thanks to its growing potential in AI.

Microsoft's position as the leading investor of OpenAI made Amazon appear behind in the burgeoning industry. However, the company has been hard at work in recent months to change that.

In June, Amazon's cloud platform Amazon Web Services (AWS) unveiled several AI-enabled tools. A service called Bedrock runs on a similar language model to ChatGPT's and helps customers build chatbots and image generators. Meanwhile, CodeWhisperer is geared toward software developers, and HealthScribe to healthcare professionals. 

Moreover, Amazon is diversifying its position in AI by becoming one of the first cloud companies to venture into chip development. The company designed two chips meant to compete directly with Nvidia's offerings, promising the best price-to-performance ratio. 

Despite Amazon's recent rally, its stock remains down 29% from its all-time high in July 2021, indicating solid growth prospects. With the power of the world's biggest cloud service in AWS and a swiftly growing library of AI services, Amazon's stock could make investors a fortune as the market develops. 

2. Intel

Intel's (INTC 0.58%) investors haven't had it easy in recent years. Its stock has fallen 30% since 2018, brought down by a burdened PC market and the loss of the company's role as the leading supplier of chips to Apple after the iPhone company began producing its own in 2020. Intel seemingly lost its way. Buts its recovery could provide massive gains to stockholders.

The tech giant pivoted its business to AI, with Intel CEO Pat Gelsinger saying in the company's second quarter of 2023 earnings call that it plans to "build AI into every product that we build."

However, Intel is playing the long game. The company will launch a new AI chip in 2025, when Nvidia is expected to debut its next generation of AI hardware. Intel's coming chip will add to its Falcon Shores lineup and have 288 gigabytes of memory and support 8-bit floating point computing, crucial specifications for running AI services like ChatGPT.

According to data from TrendForce, ChatGPT utilized 20,000 graphics processing units (GPUs) in 2020, with that figure expected to soon hit 30,000. As more companies launch similar AI services, demand for chips will continue to soar. If Intel can match or exceed the power of Nvidia's hardware, it could profit substantially over the long term. 

Additionally, Intel's price-to-earnings ratio of 16 is significantly lower than Nvidia's 244 and Advanced Micro Devices' 483. The figures indicate that Intel is the best-valued stock among these AI chipmakers. As a result, Intel's recent challenges could be investors' gain over the long term. Its developing position in AI looks likely to be a massive win in the coming years.