As second-quarter earnings season winds down, RBC Capital Markets is looking back at some companies that experienced the biggest earnings surprises due to the latest technology trend transforming the globe. Artificial intelligence-related investing has proven to be the trend to play in 2023, as Wall Street bets on the growing use cases for generative AI. Nvidia shares have more than tripled on the promise of AI, while a handful of popular technology stocks such as Apple and Microsoft contributed to the bulk of the market’s gains in the first half. “Artificial Intelligence remains a key focus for many companies, with significant investments in AI technologies and services,” wrote RBC analyst Jonathan Atkin. “AI is seeing integration into multiple aspects of business operations, including cloud platforms, datacenters, and even on the [operating expenditures] side (in both sales and marketing, as well as R & D).” AI discussion dominated the earnings of companies across industries, including technology, with some companies posting strong quarterly surprises as a result of the trend. OpenAI-backer Microsoft was notable. Shares fell post-earnings despite reporting strong results, as commentary from management fueled concerns that AI tailwinds may take longer than expected to translate into profits. Even so, RBC sees long-term potential in Microsoft’s plan, noting that AI services contributed one percentage point to the calendar second-quarter growth in Azure and other cloud services revenue. Analysts view increased capital expenditures through 2024 to invest in datacenters, servers and graphics processing units as a sign that Microsoft is working to meet growing demand for AI workloads. AMZN 1M mountain Amazon shares over the last month Amazon was another name that surprised Wall Street at least in part due to AI, with RBC calling the e-commerce seller’s “clear AI strategy” coupled with Amazon Web Services growth and retail EBIT expansion “compelling.” In its latest earnings, Amazon touted some of its AI plans, including custom AI chips and its Bedrock platform . The company also plans to increase infrastructure spending to support generative AI and large language models. “Amazon’s Q2 report was excellent, with many positive developments for investors,” RBC said. “AWS is recovering, retail EBIT is increasing, and the company’s AI strategy is becoming more defined.” Intel was another beneficiary of AI demand. The chipmaker’s segment revenues exceeded consensus expectations 7% due to heightened demand for its Xeon Scalable processors for AI workloads. Overall, Intel posted a surprise earnings beat and better-than-expected revenue. RBC called Meta Platforms its favorite long-term AI name, due to its “attractive product cycle story” as it boasts customer engagement market share and better conversion to revenue due in part to AI. The company last month popped on slightly better-than-expected results for the second quarter, and as it issued optimistic third-quarter guidance. Many Wall Street analysts have cheered the Facebook and Instagram parent’s recent cost-cutting initiatives and AI investments, in addition to a rebound in its advertising business. Oracle was another name with an AI-related upside surprise, RBC said. — CNBC’s Michael Bloom contributed reporting.