What a difference a year makes for tech giant Alphabet (GOOGL 10.22%) (GOOG 9.96%). Its stock experienced a decline in 2022, hitting a 52-week low of $83.34 last November, but it's executed an about-face in 2023, reaching a high of over $134 on Aug. 24. The stock's climb is thanks in part to Alphabet's advances in the artificial intelligence arena.

Alphabet CEO Sundar Pichai declared, "AI is the most profound technology we are working on today." To that end, this year the company introduced a form of artificial intelligence called generative AI, which is capable of creating new content on its own.

Alphabet now employs generative AI across many services, including its Google Cloud and Workspace business products, where generative AI helps customers compose emails and draft proposals.

Use of generative AI also extends to Alphabet's vaunted advertising business, which produces most of the company's revenue. Understanding Alphabet's use of generative AI assists investors in evaluating the company's potential as a long-term investment. Here's a look at how the technology helps Alphabet maintain its leadership in digital advertising.

Generative AI's impact on Alphabet

Alphabet's Google Ads business held a 28.4% share of the U.S. digital-ads market in 2022, up from a 27.9% share in 2021, making it the leader in the space. Contrast this to competitor Microsoft's advertising business, which held a 2.1% share in 2022.

But after Microsoft debuted generative AI in its Bing search engine earlier this year, the service saw its traffic and page views increase nearly 16%. If Bing can steal market share from Google, this could affect the latter's ability to grow advertising revenue by taking away consumer eyeballs from Google's ads.

Moreover, when Alphabet unveiled its generative AI chat bot, Bard, in February, Bard's budding capabilities proved underwhelming. As a result, Alphabet stock dropped as much as 9% after the debut.

These kinds of impacts induced by generative AI is a key reason why the technology is important to Alphabet's long-term success and why the company introduced it into its Google search engine in May.

Given the importance of its advertising business, Alphabet also debuted a raft of new generative AI capabilities into its ad products this year.

How generative AI helps Alphabet's customers

Generative AI provides Alphabet's advertising clients with greater efficiency in creating and managing their ad campaigns, as well as improved ad performance. One example is generative AI's ability to scour an advertiser's website, then assemble text and images to automatically create digital ads. AI also automatically improves image resolution in video ads and reformats them to fit various screen sizes from mobile devices to connected TVs.

In June, Alphabet introduced new, AI-enabled ad products, Video View and Demand Gen, which help advertisers by automatically selecting their best-performing video and image ads to show across Alphabet's consumer ecosystem, such as Gmail and YouTube.

Alphabet also delivered generative AI tools specifically for retailers. These include automatically generating product images, which can then be used in product ads appearing on Google's search engine. 

Generative AI also makes it easier for retailers to upload their product catalog to Google by automatically pulling in these products from the merchant's website, replacing the tedious process of inputting each product manually.

But what about Alphabet's financial performance?

Generative AI tools specific to retailers make sense since sales were a key contributor to Alphabet's second-quarter revenue growth. Google's search engine and other advertising sales saw a 5% year-over-year increase in Q2 to $42.6 billion, up from $40.7 billion in 2022.

Overall, Google advertising sales were up year over year to $58.1 billion compared to $56.3 billion last year and comprised nearly 80% of Alphabet's $74.6 billion in Q2 revenue.

More than revenue growth, however, this makes Alphabet a compelling investment. The company generated free cash flow of $21.8 billion in Q2 and ended the quarter with a whopping $118.3 billion in cash, cash equivalents, and marketable securities. This cash hoard helped bring Alphabet's total Q2 assets to $383 billion compared to total liabilities of $115.9 billion.

With rising revenue, excellent financials, and a slew of new generative AI capabilities, it's no wonder Alphabet stock saw its share price skyrocket this year. And the company's AI features are still nascent, so as advertisers continue to adopt these products, generative AI should increasingly contribute to Alphabet's revenue growth and help it remain a leader in digital advertising.

In fact, Google Ads is forecast to maintain its market-leading share of digital advertising through at least 2025. In addition, the global AI market is expected to increase from $142.3 billion in 2022 to $1.8 trillion by 2030, and Alphabet is well positioned to capture a piece of this growth thanks to its generative AI capabilities. These factors make Alphabet a solid AI stock to buy.