U.S. venture capital funding surged to $55.6 billion in the second quarter, marking the highest quarterly total in two years, according to PitchBook data published on Wednesday.

The latest figure shows a 47% jump from the $37.8 billion U.S. startups raised in the first quarter, largely driven by significant investments in artificial-intelligence companies, including $6 billion raised by Elon Musk's xAI and $1.1 billion raised by CoreWeave.

The ongoing excitement around building AI technology since the launch of OpenAI's ChatGPT chatbot has fueled the recovery of venture capital (VC) funding as investors place substantial bets on startups. The hope is that revenue from AI adoption will yield significant returns.

"Investors assign a premium to everything AI - the capital intensity of most AI businesses requires outsized funding," said Casber Wang, partner at Sapphire Ventures.

"As we discover stronger commercial use cases for AI, more AI companies are showing real revenue."

After reaching a record high $97.5 billion in the fourth quarter of 2021, U.S. VC funding had been steadily declining. It hit a recent low of $35.4 billion in the second quarter of 2023, amid a high interest-rate environment and a sluggish exit market.

The recent influx of capital into AI startups has reversed the downward trend, as investors double down on AI foundation model companies as well as applications from code generation to productivity tools.

Despite the increase in deal activity, exits remain challenging, the data shows, as small deals generated about $23.6 billion in exit value in the second quarter this year, down from $37.8 billion in the first quarter. The initial public offering market has struggled to gain momentum, even after companies, such as cloud data management firm Rubrik RBRK.N, went public.

Emerging VC fund managers may have already felt the pressure of a lack of proven returns, with only $37.4 billion in commitments raised through the first half of the year. Large firms dominated the fundraising, with Andreessen Horowitz alone closing new funds with more than $7 billion.

Some are expecting the M&A market for AI startups to pick up in the second half, as tech companies with capital or sought-after stock, from Nvidia NVDA.O to Databricks, have been acquisitive.

"They put venture dollars down first and watched how it evolved and started to shake out. Now I think they're more serious about which pieces of the puzzle they want to own as they're starting to see the emerging winners," said Andrew Harrison, CEO at VC firm Section 32.

(Reporting by Krystal Hu in New YorkEditing by Jamie Freed and Matthew Lewis)