Demand for artificial intelligence (AI) products is poised to skyrocket in the coming years. Grand View Research estimates that annual spending across AI hardware, software, and services will soar 820%, from $197 billion in 2023 to $1.8 trillion in 2030. That implies an annual growth of 37% over that time frame.

Investors can capitalize on that opportunity by purchasing individual AI stocks. But that strategy requires quite a bit of work. Before buying a stock, investors should thoroughly research the underlying business. Additionally, investors must keep tabs on all the companies they own over time to ensure their investment theses remain sensible.

Alternatively, investors can buy AI index funds. It's a strategy that requires much less work. Index funds are ready-made portfolios that spread capital across many different companies. While it simplifies the work, investors must still investigate any index funds they want to own to ensure their capital is spread across the right companies at a reasonable price.

To help in that research, here is one AI index fund worth buying, and three AI index funds to avoid.

One surefire artificial intelligence index fund to buy

When investors think about artificial intelligence (AI), I doubt an S&P 500 index fund is the first thing that comes to mind. However, the Vanguard S&P 500 ETF (VOO 1.00%) is an excellent way to capitalize on the growing demand for AI because it has a more favorable risk-reward profile than most index funds.

How does the S&P 500 relate to AI? A total of 152 S&P 500 companies discussed AI during third-quarter earnings calls, according to FactSet. Not all of them will use AI in a way that creates value for shareholders, but some will undoubtedly monetize the technology to great effect.

Consider the five largest holdings in the Vanguard S&P 500 ETF and the percentage share of the overall fund:

  1. Apple: 7%
  2. Microsoft: 7%
  3. Alphabet: 3.8%
  4. Amazon: 3.4%
  5. Nvidia: 3%

Of those five companies, four are very well-positioned to monetize AI. Amazon, Microsoft, and Alphabet are the largest cloud services providers in the world. That means all three should benefit as businesses provision cloud infrastructure to develop AI applications. Moreover, all three have introduced generative AI assistants that extend their ability to monetize AI.

Similarly, Nvidia's graphics processing units (GPUs) are the gold standard in machine learning. The company has also expanded its ability to monetize AI by branching into data center networking equipment, central processing units (CPUs), subscription software, and cloud services -- all purpose-built for AI.

Another reason the Vanguard S&P 500 ETF is a compelling investment is that very few index funds beat the benchmark over time. In fact, just 20% of large-cap funds outperformed the S&P 500 over the last three years, and just 13% outperformed over the last five years, according to S&P Global.

Finally, the S&P 500 has been a surefire moneymaker for patient investors. The index has produced a positive return over every rolling 20-year period in history, and it has never failed to recover from any correction, bear market, or recession. Moreover, the S&P 500 returned 241% over the last decade, compounding at 13% annually. At that pace, $100 invested weekly in the Vanguard S&P 500 ETF would have grown into more than $100,000.

Three expensive AI-related index funds to avoid

When selecting an index fund, investors should ask themselves two questions. First, has the index fund in question consistently outperformed the S&P 500? If the answer is no, think twice about buying it. Settling for underperformance is nonsensical in most cases.

Second, is the index fund in question expensive? The Vanguard S&P 500 ETF bears an ultra-low expense ratio of 0.03%, meaning investors would pay just $3 per year in fees on a $10,000 portfolio. It would be silly to pay much more unless the index fund has handily outperformed the S&P 500 in the past.

With that in mind, investors should avoid the following index funds.

The Global X Robotics & Artificial Intelligence ETF (BOTZ 2.52%) measures the performance of 42 stocks. Its two largest holdings, Nvidia and Intuitive Surgical, account for 20% of its weight. The index fund underperformed the S&P 500 over the past one, three, and five years. It also bears an above-average expense ratio of 0.69%.

The Ark Autonomous Technology & Robotics ETF (ARKQ 2.52%) measures the performance of 36 stocks. Its two largest holdings, Tesla and UiPath, account for 20% of its weight. The index fund underperformed the S&P 500 over the past one, three, and five years. It also bears an above-average expense ratio of 0.75%.

The iShares Robotics and Artificial Intelligence Multisector ETF (IRBO 1.98%) measures the performance of 111 stocks. Its two largest holdings, Nvidia and Meta Platforms, account for just 3% of its weight. However, the index fund still underperformed the S&P 500 over the past one, three, and five years. It also bears an above-average expense ratio of 0.47%.

Investors can buy an S&P 500 index fund and individual AI stocks

Investors need not choose to hold just index funds or individual stocks. A blended strategy is perfectly acceptable. In other words, investors could split their money between an S&P 500 index fund and a select group of AI stocks. That strategy is attractive because it leaves room for outperformance but it also limits downside.

Specifically, an investor would beat the S&P 500 if their individual stocks outperformed. But their portfolios wouldn't fare too badly even if their stocks underperformed, provided they allocated enough money to an S&P 500 index fund. Remember, the S&P 500 returned 13% annually over the past decade. It also returned 10% annually over the past three decades.

Personally, I prefer the blended approach. Buying individual stocks lets me take a little extra risk, but I balance that risk with the Vanguard S&P 500 ETF.