Meta, Facebook and Instagram's parent firm, has reported a profit of $5.7bn (£4.6bn) for the first quarter of this year, surpassing expectations for a period in which many jobs were cut.
It said artificial intelligence (AI) was "driving good results" across its business.
Total revenue was $28.6bn, while the number of people on Facebook every month rose to just under three billion.
"Our community continues to grow," said chief executive Mark Zuckerberg.
"We're also becoming more efficient so we can build better products faster, and put ourselves in a stronger position to deliver our long-term vision," he said.
'No longer behind in building AI'
Meta sees "an opportunity to introduce AI agents to billions of people in ways that will be useful and meaningful," Mr Zuckerberg told investors.
While offering few details, he said that Meta was "exploring chat experiences in WhatsApp and Messenger, visual creation tools for posts in Facebook and Instagram and ads, and over time video and multimodal experiences as well."
The company intends to commercialise its privately-run generative AI, joining Google in finding practical applications for the tech - because the industry is awash with hype around its capabilities.
Meta established Facebook's AI Research laboratory in 2013, but has not made big inroads in this area yet, as some other big tech firms - such as Microsoft - have done.
But Mr Zuckerberg insisted Meta was "no longer behind in building our AI infrastructure" and said generative AI Meta products, which can instantly create sentences and graphics, would be released in the coming months.
He added the move would not be at the cost of the metaverse, Meta's virtual reality project.
Meta's Reality Labs division reported a net loss of $4bn last quarter, and the company said it expected "operating losses to increase year over year in 2023".
However, Mr Zuckerberg said the "narrative that has developed that Meta is moving away from the metaverse" was "not accurate", adding it still planned to reveal the next Quest VR headset later this year.
Cost-cutting pays off
The positive financial figures coincide with a period where Meta has slashed jobs and projects. The aim was to turn 2023 into "a year of efficiency," said Mr Zuckerberg.
Meta has been the most aggressive US big tech firm when it comes to downsizing, shedding almost a quarter of its global workforce, more than 20,000 jobs, in just a few months.
"The year of efficiency is off to a stronger than expected start for Meta," said Insider Intelligence principal analyst, Debra Aho Williamson.
"In this economic environment - and after the disaster that was 2022 - 3% year over year revenue growth is an accomplishment," she added.
Mr Zuckerberg has called 2022 "a humbling wake-up call" and said it would be wise to "prepare ourselves for the possibility that this new economic reality will continue for many years".
Ben Barringer, from investment management firm Quilter Cheviot, said: "You have to take your hat off to Mark Zuckerberg and Meta given the transformation of the business over the last six months.
"The 'year of efficiency' Zuckerberg likes to talk about is bearing fruit. These results are a strong beat on the expectations and, given the improving macro backdrop, Meta should continue to recover well."