Warren Buffett has been at the helm of the Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) investment company since 1965. He has steered the conglomerate to an average annual return of 19.8% during that 58-year stretch, double the return of the S&P 500 index over the same period.

But that doesn't tell the whole story. Thanks to the effects of compounding, a $1,000 investment in Berkshire in 1965 would be worth a whopping $37.8 million today. The same investment in the S&P 500 would be worth just $247,080.

Buffett's investing strategy is simple. He buys stakes in profitable companies with steady growth, especially if they regularly return money to shareholders and have strong management teams.

Warren Buffett smiling, surrounded by cameras.

Image source: Getty Images.

Technology stocks normally don't fit Buffett's strategy

Most technology companies focus on growth over profitability, rarely having spare cash to return to shareholders. That also means very few of them capture Buffett's attention. However, a handful of high-quality tech stocks have found their way into Berkshire's portfolio over the years -- even if Buffett himself didn't make the decision.

Nonetheless, artificial intelligence (AI) is one technology that will likely impact companies across many industries. While Buffett would never base his investment decisions on the potential of AI, it's becoming clear that Berkshire's long-term success might depend heavily on the technology.

Below, I'll highlight five of the best AI stocks in Berkshire's $342 billion portfolio of publicly listed securities.

1. Coca-Cola

Coca-Cola (KO) stock has been in Berkshire's portfolio since 1988. As a result, there's no way AI factored into Buffett's decision to buy. However, the beverage giant is applying the technology in a couple of ways, and it even appointed a global head of generative AI in June.

The company used AI to craft a recent marketing campaign called Masterpiece, which featured a short video created with generative AI content. In September, it also launched a new promotional soda called Coca-Cola Y3000 Zero Sugar, which was formulated by AI. The company collected consumer data relating to how they imagined the future and then fed it into an AI model to produce a drink resembling what Coca-Cola might taste like in the year 3000.

While these initiatives seem gimmicky, they highlight how AI can boost productivity even in a non-technology company. Over the long term, investors should expect more marketing campaigns -- and more products -- to be designed by AI. And Buffett might be glad Berkshire still holds $22.9 billion worth of Coca-Cola stock when that happens.

2. Amazon

Amazon (AMZN 3.43%) is using AI more directly than Coca-Cola. In fact, it wants to be a key distributor of the technology to millions of businesses around the world through its cloud computing platform, Amazon Web Services (AWS).

Amazon hopes to accelerate its objectives in the AI industry with its latest $4 billion investment in generative AI start-up Anthropic. Anthropic will be required to train its future models on Amazon's Trainium and Inferentia data center chips, which could attract more AI developers who currently rely on Nvidia's hardware instead. Plus, Anthropic will use AWS as its primary cloud provider and will make all its future models available on the platform for customers to use.

Berkshire made its first purchase of Amazon stock in 2019, and while Buffett often expresses regret for not identifying the company's potential sooner, he might be very happy to catch this AI phase going forward.

3. Snowflake

Like Amazon, Snowflake (SNOW 3.69%) is a provider of cloud computing services with a growing presence in AI. Its revolutionary Data Cloud technology helps businesses aggregate their valuable data from across different cloud platforms, giving them maximum visibility and powerful analytical insights.

Data is the nectar of any AI model. Without it, AI is simply stagnant and can't be trained for further improvement. Therefore, the technology is a natural fit for Snowflake, given its customers use the platform to house so much of their critical information.

Snowflake has brought Nvidia's NeMo software to its platform, which is a framework for developers seeking to build large language models. Plus, the company recently acquired a start-up called Neeva, which uses AI to allow non-technical employees to search through data using natural language instead of programming language. That means more employees within an organization will be able to draw valuable insights from advanced data analysis.

Finally, Snowflake is developing new programs in-house, like Document AI, which enables customers to rapidly analyze unstructured data in legal contracts or invoices.

Snowflake is a tiny holding for Berkshire, representing just 0.3% of the conglomerate's portfolio, but it could have a significant amount of exposure to AI going forward.

4. Bank of America

As I touched on earlier, AI is going to impact several industries. Banking will likely be one of them because it's filled with repetitive, monotonous processes that could benefit from a productivity boost through automation. Bank of America (BAC -0.21%) is already proving that, and thankfully for Buffett, the stock represents 8.5% of Berkshire's portfolio.

In 2018, Bank of America launched an AI chatbot called Erica, and customers have interacted with it 1.5 billion times for a combined 10 million hours since then. It was designed to reduce traffic to the bank's physical branches and lower the number of incoming customer service phone calls. That ultimately saves Bank of America money on staff costs and boosts customer convenience.

In September, the bank integrated Erica's technology into its CashPro digital banking platform for its 40,000 business customers. It will allow those clients to call upon important information about their accounts quickly and access transaction records. And those capabilities will likely expand over time.

Bank of America plans to invest $3.8 billion in innovation next year, a wise decision, given AI's potential to substantially boost efficiency in the typically slow-moving banking industry.

5. Apple

Apple (AAPL -0.35%) could be described as Buffett's favorite stock. After all, it makes up 46.9% of Berkshire's $342 billion portfolio. The company produces some of the most popular consumer electronics in the world, led by its flagship iPhone smartphone. But now, it's ramping up its focus on AI in a couple of ways.

First, Apple launched its iPhone 15 Pro lineup in September with its new A17 Pro CPU processor, arguably the most powerful smartphone chip on the market. It's capable of handling AI workloads on-device at a faster rate than ever before. The neural engine in the A17 Pro is twice as fast as previous versions, meaning it can accelerate machine learning-driven features like predictive text and the Siri voice assistant.

Second, Apple is rumored to be investing heavily in developing large language models to power its own ChatGPT competitor, which could be capable of generating text, images, and video. Considering Apple's devices are rolling out with AI-enabled semiconductor hardware, the stage is set for the company to deliver waves of AI software in the future to enhance the user experience.

Apple is the world's largest company, with a valuation of $2.7 trillion, and if it wants to stay there, developing AI will be critical. Thankfully for Berkshire, the company appears to be doing exactly that.