Famed investor Warren Buffett isn't known as a technology guru; his reputation comes from opportunistically buying and holding longtime blue chip stocks in Berkshire Hathaway, his holding company, which is worth nearly a trillion dollars today.

However, Berkshire Hathaway's portfolio is sneakily invested very heavily, I might add, in artificial intelligence (AI). The top four AI stocks by position size represent nearly half the total portfolio!

So, feast your eyes on Buffett's top four AI stocks:

1. Apple

Warren Buffett isn't afraid to let a winning investment become a large piece of Berkshire's portfolio. Look no further than iPhone maker Apple (AAPL -0.35%). The stock, which Buffett first bought in 2016, has grown to 44.2% of the portfolio. Nonetheless, Apple is a bonafide AI stock, and Buffett has only sold minimal shares despite sitting on tremendous unrealized gains today. Why? Buffett has credited fierce customer loyalty, quipping that people would give up their second car for an iPhone.

Tech companies, Apple included, are investing in AI and combining it with their consumer-facing products. Apple has already implemented AI into the iOS experience for creature comforts, like Siri assistance, facial recognition, content recommendations, and more. However, Tim Cook recently shared at an event that Apple is prioritizing investments in generative AI. It recently shut down its electric car project and will shift employee resources to Apple's AI division. Buckle up for the future.

2. Moody's

Corporate credit and analytics firm Moody's (MCO 0.25%) is more similar to Buffett's known style. Berkshire has owned Moody's stock since 2000, and it has been a very successful investment over the years. It's a much smaller piece of Berkshire's portfolio at 2.5%, but then again, Moody's is a much smaller company than Apple. Berkshire's stake represents 13.5% ownership in the company.

Moody's analyzes data to rate corporate credit and sell market research. Artificial intelligence is a natural progression for a company like Moody's. The business possesses invaluable data from decades of operations and uses OpenAI and Azure to build models for that data. Moody's evolution to more tech-driven data analytics is critical to maintaining its stellar reputation in the financial markets. Moody's has grown revenue for 64 consecutive quarters, a testament to the company's durability.

3. Amazon

Tech giant Amazon (AMZN 3.43%) is a stock Buffett got into late; he didn't add shares to Berkshire's portfolio until 2019. However, the stock has more than doubled since then, showing that it's hardly ever too late to invest in great businesses. Amazon has built a reputation as an innovator. After becoming the dominant e-commerce company in America, Amazon has since built a leading cloud platform and streaming service and is now leaning into AI.

Like Apple, Amazon is using generative AI in its consumer-facing businesses. E-commerce customers can view a product, and AI will summarize buyers' product reviews into shortened summaries to save time. In AWS, Amazon is amassing massive resources, including Nvidia chips and its own, to give cloud customers the tools to build AI applications. Amazon's ability to tie AI into its business could support long-term growth in e-commerce and cloud -- industries with gas left in the tank.

4. Snowflake

Data cloud and analytics company Snowflake (SNOW 3.69%) is a unique Buffett AI stock in that it's the only one Berkshire Hathaway has been invested in since day one. The holding company participated in Snowflake's public offering in 2020 and has held the stock since. It's also the smallest position of the companies on this list and represents just 0.3% of Berkshire's portfolio.

Snowflake could become an enormous company in the AI era. The company's cloud platform stores and organizes data, allowing customers to easily search and integrate it with third-party apps, all through the cloud. Additionally, Snowflake operates a data marketplace where customers can share data and buy access to third-party data sets to combine with their own.

Data is fundamentally the building block of AI as it's all trained on data. That makes Snowflake a potentially crucial party to AI moving forward, and it's noteworthy that Berkshire jumped into the stock early.