The artificial intelligence (AI) market has exploded this year, with the launch of OpenAI's ChatGPT last November reigniting interest in the technology. Countless stocks have benefited from the sector's growth, leading the Nasdaq-100 Technology Sector index to soar 50% year to date.

Nvidia (NVDA -1.52%) has been one of the biggest winners amid all of the AI excitement. Its years of dominance in graphics processing units (GPUs) perfectly positioned it to profit substantially from the market's growth as the chips are crucial to developing AI models. As a result, Nvidia shares have skyrocketed 237% since Jan. 1, alongside soaring earnings.

While Nvidia has been one of the best investments in 2023, there are better options going into the new year. Investors interested in AI might be better off now buying stocks in companies that are at earlier stages in their AI expansions and have more room for growth over the long term.

So forget Nvidia. Here are two AI stocks that are much better buys right now.

Alphabet: The best bargain in AI

While chipmakers like Nvidia are attractive ways to invest in AI, software companies developing the platforms that will get the technology into billions of consumers' homes should not be overlooked. As the home of potent brands such as YouTube, Android, and the many products under Google, Alphabet (GOOG -0.25%) (GOOGL -0.18%) is an attractive option.

This year, competitors such as Amazon and Microsoft have slightly overshadowed the company in AI. However, the chart below shows that Alphabet's stock is now one of the biggest bargains in AI, with its lower price-to-earnings ratio offering far more value than these companies -- and Nvidia.

NVDA PE Ratio Chart

Data by YCharts

Alphabet isn't new to AI, with CEO Sundar Pichai reiterating in May that the tech giant is seven years into its "journey as an AI-first company." However, Alphabet has ramped up its expansion in the market in 2023. The company is currently focused on developing Gemini, a large-language model based on massive data sets. It is expected to launch in the first quarter of 2024 and be highly competitive with other models on the market.

Moreover, Alphabet is an attractive AI stock given its ability to use the technology to boost multiple areas of its business. As Alphabet is one of the biggest names in advertising, AI will likely help the company better serve ads on Google Search and YouTube. Meanwhile, AI can improve user experience on popular platforms like Gmail, Google Docs, Maps, Chrome, and more.

The company also has a solid position in the cloud market with Google Cloud, where demand for AI services is soaring as businesses seek tools to integrate the technology into their daily workflows.

Alphabet's annual revenue has soared 107% over the last five years, with operating income up 130%. The company has proven its reliability over the years and could go far with the help of AI. Given the endless opportunities to eventually monetize its AI offerings, Alphabet stock is an attractive alternative to Nvidia.

AMD: A plan to challenge Nvidia's dominance

After Nvidia, Advanced Micro Devices (AMD -0.63%) has been one of the highest-soaring chip stocks this year -- rising 86% since Jan. 1. While that barely holds a candle to Nvidia's growth, the company is still in the early stages of its AI expansion, which could offer new investors more gains over the next year.

AMD has a stellar outlook in 2024 as it prepares to ship a new AI chip and benefit from a recovering PC market. In June, the company unveiled the next installment in its MI300 line of chips, which it described as its most powerful GPU ever. The new chip will launch next year and is designed to challenge Nvidia's offerings.

Alongside new hardware, AMD has made two acquisitions in 2023 to push its AI software further. Over the last few months, the company has purchased start-ups Nod.ai and Mipsology, which will likely become critical to its data center business and allow it to offer AI developers a top-tier experience when utilizing its GPUs.

AMD suffered steep declines in its business last year as macroeconomic challenges hit the entire tech market. However, it's benefiting from a gradual recovery in the PC industry, which saw its client segment return to profitability in Q3 2023 and post revenue growth of 42%. The company is heading into the new year with exciting prospects in multiple parts of its business and could be one of the best investments this month.

Nvidia's market capitalization soared to over $1 trillion this year, while AMD's currently sits at about $195 billion. Despite often being compared, these companies are at vastly different stages in their development. AMD's lower market cap could indicate it has much more room for growth and could be a far more lucrative AI stock over the long term.