Warren Buffett has steered the Berkshire Hathaway investment portfolio to market-beating returns for over 50 years, and he has done so with a relatively simple strategy. 

He primarily invests in profitable companies with steady growth, especially if they have good management teams at the helm. But most importantly, Buffett lets time do the heavy lifting by often holding stocks for decades. 

Most technology stocks don't fit Berkshire Hathaway's strategy, but the conglomerate holds a handful of quality names in the sector. Buffett has certainly never invested in a company due to its presence in the emerging artificial intelligence (AI) space -- in fact, his right-hand man, Charlie Munger, recently said AI is overhyped!

But Buffett and Munger are poised to benefit substantially from the technology, because almost half of Berkshire's $335 billion portfolio of publicly listed securities is invested in two stocks with a growing focus on AI. Here's why investors might do well to buy them, too. 

Warren Buffett smiling while surrounded by people holding cameras.

Image source: The Motley Fool.

1. Apple: 47.2% of Berkshire Hathaway's portfolio

Apple (AAPL -0.35%) is the world's largest company, with a valuation of $2.7 trillion. Buffett's confidence in the tech giant is made clear by the fact it accounts for 47.2% of Berkshire's portfolio all on its own. Apple produces some of the world's most popular consumer electronics, led by its flagship iPhone. The company is quietly weaving AI through its entire product portfolio to elevate the user experience.

Several of the software features embedded in its devices are already leaning on AI. Its Siri voice assistant, for example, employs advanced conversational AI. The predictive text built into each Apple keyboard is also powered by AI. Plus, many applications rely heavily on the technology. Take Apple Music, for example, which uses AI to learn what each listener enjoys the most and autonomously curates playlists for them to boost engagement.

But AI development wouldn't be possible without specialized computing hardware -- namely, semiconductors (chips). Apple has designed its own chips since 2010, starting with the A-series inside the iPhone and iPad mobile devices (and the iPod before it was discontinued). But AI applications present a new challenge, because they demand far more processing power from semiconductors. 

Apple released its new A17 Pro chip alongside the iPhone 15 Pro in September, which is the smartphone industry's first 3-nanometer CPU. Apple has packed 19 billion transistors into the new chip compared to just 6 billion in its predecessor, the 5-nanometer A16 Bionic. It enables the smartphone or tablet device to process machine learning and AI workloads without connecting to the cloud via an external data center, which results in a substantially faster user experience.

Now, according to a report by Bloomberg, Apple is jumping into the world of generative AI with both feet. The company has allegedly developed a large language model called Ajax, which powers its very own chatbot dubbed Apple GPT. It's designed to compete with other AI chatbots like ChatGPT, which is responsible for most of the AI functionality across Microsoft's product portfolio. 

Bloomberg suggests Apple is investing about $1 billion annually in its generative AI technology. Starting next year, it could be embedded in Siri to transform the voice assistant's capabilities, and also included in Apple's Xcode tool to allow app developers to create products more quickly. 

Artificial intelligence probably wasn't on Buffett's mind when Berkshire began accumulating shares of Apple in 2018, but it could become as synonymous with the company as the iPhone in the future. 

2. Amazon: 0.4% of Berkshire Hathaway's portfolio

Amazon (AMZN 3.43%) is a tiny holding for Berkshire compared to Apple, accounting for just 0.4% of its portfolio. But since the company's first purchase of Amazon stock in 2019, Buffett has often expressed regret for not understanding the e-commerce titan's potential sooner. He might feel progressively worse as time goes on, because Amazon is moving forward with a very aggressive AI strategy.

Amazon Web Services (AWS) is Amazon's industry-leading cloud computing division, which manages an estimated 125 data centers worldwide, and it's also home to many of the company's AI projects. Last month, Amazon invested a whopping $4 billion in generative AI developer Anthropic, which marked the second-largest investment in an AI start-up behind Microsoft's $10 billion bet on ChatGPT creator OpenAI. 

The deal should help Amazon execute on its three-pronged approach to the AI arena. First, it has developed data center chips called Inferentia and Trainium, which were designed as substitutes for chips made by Nvidia. Anthropic will be using Amazon's chips to develop and train future models for its chatbots, which could accelerate adoption of the hardware by enticing other AI start-ups to consider Amazon over industry leader Nvidia.

Second, AWS is delivering large language models (LLMs) as a service to its customers. It requires mountains of data and significant financial resources to develop an LLM from scratch, so most businesses prefer to adopt ready-made alternatives they can build upon. AWS already offers several third-party LLMs including those it built in-house, but Anthropic will be required to place all of its future models on the AWS platform. 

Finally, AWS is delivering ready-made AI applications like its CodeWhisperer tool to help customers develop software more quickly and increase their productivity overall. 

AI is poised to add somewhere between $7 trillion and $200 trillion to the global economy by 2030, depending on which Wall Street forecast you rely upon. But its financial potential is clearly staggering even at the low end, and AWS is positioning itself to be a key distributor of the technology. 

Amazon could prove to be Berkshire's best AI holding over the long term, even though it only represents a tiny fraction of its portfolio.