There's no shortage of hype over artificial intelligence (AI) this year.

The launch of OpenAI's ChatGPT in late 2022 made it clear to tech CEOs and individual investors alike how powerful and potentially transformative the new generative AI technology is. 

Nearly every tech company seems to be talking up the potential of AI, and AI stocks have consequently skyrocketed this year. In some ways, the impact of the new wave of demand for AI is already being felt. Nvidia's revenue nearly doubled in its most recent quarter on soaring demand for AI chips, and the company posted another round of blowout guidance for its fiscal third quarter. Oracle, meanwhile, is seeing strong growth in its cloud infrastructure division after spending billions on chips to power its superclusters.

However, if you're thinking of dumping your cash into Nvidia or another AI stock, you should think again. This is still a brand-new, emerging industry, and most of the companies touting the potential of AI have yet to see a significant financial benefit.

As AI stocks soar, investors should also be mindful of the dot-com bubble when the introduction of the World Wide Web unleashed a similar transformative technology on the stock market. Many of those tech stocks ultimately went bust, while only a small number went on to be big winners.

Rather than trying to pick a winner in AI, there are better ways to approach the emerging technology.

The basket approach

One of the best ways to get diversification in a particular sector or a class of stocks is through a basket approach, which means buying several stocks so that you're not overly exposed to one particular company. If you'd like to invest a substantial percentage of your holdings in AI, this is a more balanced approach versus buying a single stock.

AI is a broad category, so there are a lot of different ways you could put together a basket. One way to do it might be by taking a few stocks from each of the subsectors that are exposed to AI.

For example, you'll want to invest in semiconductor stocks. Nvidia is an easy one, and you could consider another one or two like Advanced Micro DevicesBroadcom, or even Taiwan Semiconductor to get exposure to semiconductor manufacturing.

Big tech is another subsector that's worth including. Here, Microsoft and Alphabet are obvious choices given Microsoft's partnership with OpenAI and Alphabet's launch of Bard and its other AI investments, including Google DeepMind, its AI research lab. 

Finally, you may want to consider adding stocks that have put AI at the center of their business models, such as Upstart in consumer loans, Lemonade in insurance, or C3.ai in application software.

An easier way to do it

If you'd like to have the work of managing a basket of AI stocks done for you, the easiest way to do that is by buying an AI ETF. The largest AI ETF on the market is the Global X Robotics & Artificial Intelligence ETF (BOTZ 2.52%) with net assets of $2.2 billion.

BOTZ's biggest holding is currently Nvidia with 14.1% of the ETF's assets. Other top holdings include medical device maker Intuitive Surgical (9.7%); ABB, a Swiss company that creates automation and robotics products used in utilities and infrastructure (8.2%); and Keyence, a Japanese company that builds factory automation products like sensors and scanners (6.9%).

Focus on the long term

It's easy to be blinded by the opportunity in AI, but you shouldn't invest in the space without considering the risks. Keep valuations and realistic prospects in mind as you decide which strategy best suits you in the sector, and remember the lessons of the dot-com bubble and other more recent bubbles in the stock market.

While some AI stocks could be big winners, others will almost certainly be busts.