A recent report published by PwC said that artificial intelligence (AI) could add $15.7 trillion to the global economy by 2030, and added that AI is "[T]he biggest commercial opportunity in today's fast changing economy." It's predictions like this that make AI a tempting proposition for many investors. But what if AI doesn't live up to these expectations? Investors who want exposure to the artificial intelligence market, but don't want the volatility of AI pure-plays, should look to Amazon.com (NASDAQ:AMZN) and Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL).

Both companies are taking big steps into AI right now, but each has the added benefit of being involved in so many different businesses that it's unlikely either one will get burned if AI doesn't quite pan out. 

Outline of a person's face with a computer motherboard inside.

Image source: Getty Images.

Amazon's hidden AI play

I know Amazon doesn't seem like an artificial intelligence play at first glance, but the company is already knee-deep into it.

Amazon CEO Jeff Bezos told the company's investors in mid-2017 that they should watch the machine learning space because this form of AI technology is transforming how Amazon suggests products on its e-commerce site, and it's how it develops its Alexa virtual assistant for its Echo smart speakers.

Bezos said in an investor letter that,

"Machine learning drives our algorithms for demand forecasting, product search ranking, product and deals recommendations, merchandising placements, fraud detection, translations, and much more. Though less visible, much of the impact of machine learning will be of this type -- quietly but meaningfully improving core operations."

Aside from using machine learning to improve its internal systems, Amazon is also applying  AI to one of its core businesses, Amazon Web Services (AWS). The company recently teamed up with Microsoft to expand its AI offerings for its cloud services in order to fight off rising cloud competition from Google and prove to developers that it can keep pace with Google's cloud-based AI services

Amazon's AWS is currently the leader in the public cloud computing segment, with about 40% market share, and continues to be a key profit generator for the company. AWS should continue to benefit from the implementation of more AI-building services for developers (from image recognition to chatbots) and help Amazon maintain its lead in the cloud computing market.

But even if cloud-based AI services fall flat for Amazon, the company's online retail dominance, its current AWS profits, expansion into areas like grocery stores, the Internet of Things, and its Prime services will keep this tech and retail giant humming along nicely. 

Alphabet's growing AI dominance

Of course, Alphabet is no stranger to the AI market either. One of the company's most notable forays into artificial intelligence is through its Waymo driverless car company. Waymo's AI software has four million self-driven miles under its belt and its vehicles are now being tested with members of the public in Phoenix, Arizona.

And just like Amazon, Alphabet is also looking to expand its AI position through its cloud computing services. Alphabet's Google only holds 4% of the public cloud computing market right now, but it's using its machine learning TensorFlow software to woo developers to its Google Cloud services. TensorFlow is a powerful machine learning tool that's used in Google Translate, Gmail, Google Maps, and other apps. Google knows that if it can offer better AI-building software for developers it might be able to convince some of them to eventually switch from Amazon and Microsoft to its own cloud services.

Aside from using AI for cloud computing, the company also just announced the second version of its own AI hardware, the Tensor Processing Unit (TPU). The first version of the TPU chip has been used to provide better results for Google's search services and even to beat the world champion in the ancient game of Go.

But the latest version takes the TPU to another level. The new TPUs can handle both deep learning training and inference, allowing companies to tap into powerful artificial intelligence software to solve more complex computing problems and create new algorithms. In short, the AI chip makes Google's cloud prospects even brighter.

If all of that weren't enough, Google is also using its AI prowess to better learn what its users are searching for and serve more relevant ads as a result.

Alphabet's Google still brings in 88% of the company's total sales, nearly all from advertising, so there's not much of a risk here if AI takes longer to grow than expected.

Two safe bets

Both Amazon and Alphabet are pushing ahead quickly in AI, but neither of them run the risk of seeing their stock prices collapse if their artificial intelligence pursuits fall flat. Both companies are entrenched in other segments beyond AI that will help keep their revenues coming in. If you're looking for some solid exposure to artificial intelligence, but you don't want to deal with some of the volatility from smaller companies, then Amazon and Alphabet are two great choices for now, and likely for years to come.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Teresa Kersten is an employee of LinkedIn and is a member of The Motley Fool's board of directors. LinkedIn is owned by Microsoft. Chris Neiger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), and Amazon. The Motley Fool has a disclosure policy.