Two tech themes have taken Wall Street by storm so far this year. One is the return of semiconductor stocks , as demand bounces back for chips; the other is artificial intelligence, following the buzz surrounding chatbot ChatGPT. In fact, the two are connected, with semiconductors playing an essential role in artificial intelligence. One way to play the themes is via a diversified ETF, rather than individual stocks, in an effort to limit risk after a bumpy few years. CNBC Pro screened for the highest-rated ETFs with exposure to semiconductor and/or AI-related stocks (among others) using Morningstar data. The resulting funds all received a four- or five-star rating by Morningstar, and have performed well over the past three years. The screen included four ETFs focused only on semiconductor stocks — all with a five-star rating. All four have had steady performance over the past three years, with three-year total returns of 20% or more. Analysts also gave these funds decent upside of more than 15%. Three of the funds — the VanEck Semiconductor ETF , SPDR S & P Semiconductor ETF and iShares Semiconductor ETF — have Nvidia as their highest-weighted stock. Over 11% of the total weighting of the VanEck ETF is invested in the stock as of Feb. 23. Analysts are very bullish on Nvidia right now, identifying it as a stock that’s set to cash in big on the AI trend. The Defiance Quantum ETF also showed up on the screen, standing out as one fund with a play on both semiconductors and AI stocks, specifically quantum computing and machine learning. Analysts gave it average upside of nearly 20%. The Invesco DWA Technology Momentum ETF also has a mix of semiconductor stocks (at 32% of the ETF) as well as other stocks with exposure to AI. These include Super Micro Computer , which develops AI system technology, and is among the top ten holdings. Tech giants Microsoft and Alphabet also appear in a number of the ETFs among their top holdings. The Technology Select Sector SPDR ETF stood out as having a very high weightage on Microsoft — about 21% — relative to other ETFs. Analysts have been debating whether Microsoft or Alphabet has the edge in the AI race . Alphabet hastily launched its own chatbot Bard after Microsoft’s success in backing ChatGPT. In early February, Microsoft doubled down on the tech, announcing new AI versions of its Bing search engine and Edge browser. — CNBC’s Michael Bloom contributed to this report.