Last year, tech stocks largely rebounded after the challenges of 2022, as evidenced by the fact that the tech-heavy Nasdaq Composite outperformed the two other major U.S. stock market indexes. Naturally, many tech stocks performed in line -- or even better -- than the Nasdaq, but others weren't so lucky.

Google parent Alphabet (GOOG 9.96%) (GOOGL 10.22%) was one of those that did well, while the online learning specialist Chegg (CHGG 3.20%) wasn't so fortunate in 2023. Investors should expect more of the same for these companies this year, which is why Alphabet looks like a solid buy and Chegg is best left alone.

GOOG Chart

GOOG data by YCharts

The case for Alphabet

Alphabet faced several issues entering 2023. First, the advertising market -- where it makes most of its money -- was struggling. Second, the rise of OpenAI's ChatGPT and Microsoft's attempt to challenge Google's dominance in online search by creating an artificial intelligence (AI)-powered Bing put downward pressure on Alphabet's stock price. However, the tech giant was able to handle these issues.

As the year went by, the advertising space started rebounding, as did Alphabet's revenue growth rates. Further, Microsoft's ChatGPT-powered Bing did little to disrupt Google's empire. Alphabet should maintain much of that momentum in 2024. Analysts predict that the advertising market will rebound even faster this year, which should help propel the company's revenue even higher.

Beyond this year, Alphabet boasts several important long-term growth opportunities. The first is in streaming through its video-sharing platform, YouTube. Streaming has gained significant ground on cable in recent years. And as the shift continues, companies like Alphabet will benefit. Second, Alphabet is a leader in cloud computing, another high-growth industry.

Third, the tech giant is no stranger to the world of AI. Alphabet has used AI for years, notably in its various Google updates. It released a ChatGPT competitor named Bard last year. The fact that it could do so relatively quickly speaks volumes about Alphabet's abilities in this field. Further, the company benefits from a strong competitive advantage from multiple sources.

Alphabet has one of the strongest brand names in the world, and some of its platforms, including YouTube and Google, display the network effect. So, even beyond this year, Alphabet can continue to deliver market-beating returns for a long time, which makes it a stop tech stock to buy today.

The case against Chegg

Chegg's business is struggling due to the rise of generative AI applications like ChatGPT. The company offers various forms of help to students, including homework solutions, textbook solutions, and more. However, ChatGPT can perform a lot of those tasks and does so in mere seconds. That's why Chegg's stock dropped like a rock early last year, and it hasn't even come close to recovering fully.

Chegg does have a solution to this problem, namely an AI-powered (specifically, GPT-4) study helper called CheggMate, an early version of which became available to students in May 2023. As the company argued, a survey it conducted found that most students wanted a mix of help from AI and actual human experts. So, CheggMate could be the solution to Chegg's problems, but the market isn't sold yet -- and with good reason.

It's hard to say whether CheggMate will be successful enough to fend off the threat from generative AI or whether Chegg's subscription and sales will stall or perhaps even decrease from here on out. In the third quarter, Chegg's revenue decreased by 4% year over year to $157.9 million. It ended the period with 4.4 million subscribers, a decrease of 8% compared to the year-ago period.

That was not due entirely, or perhaps even primarily, to AI. Chegg has been struggling to keep subscribers since the worst of the pandemic ended -- its service became highly popular in the early days of the outbreak. Still, that problem, coupled with the AI challenge, does not bode well for Chegg's future, so it's best to avoid the stock for now.