The new wave of generative artificial intelligence (AI) is sparking what may be a revolution in business technology. Companies that are leading the transformation are capturing investor enthusiasm. Consider the gains of stocks like Amazon (AMZN -2.33%), Microsoft, Alphabet, and Nvidia compared with the S&P 500:

^SPX Chart

^SPX data by YCharts

As the second-largest company in the U.S. by sales, Amazon has a lot to gain from implementing AI across its operations. Here are five ways it's harnessing the opportunity.

1. Product recommendations 

This is probably the most common use of AI over the past few decades. Amazon, like many companies, uses AI to provide all of the product recommendations that it gives to customers as they search, such as the "other customers bought," "you might also like," and "frequently bought together" categories. It has been using AI for these capabilities for 25 years, and management believes that gives it an edge as more companies jump on the AI bandwagon. For example, it already has decades of data for its machine learning, and since it's built into its operating model, it's cheaper to run than building out new systems.

2. Determining fastest and cheapest fulfillment

Amazon has a global fulfillment system, and optimizing costs for a such a large-scale program can be complicated. In the U.S., it also needs to optimize for its commitment to one-day shipping. It needs sophisticated algorithms to determine the fastest and cheapest path from its broad logistical network that includes warehouses, distribution centers, and delivery systems.

Amazon recently restructured from a national fulfillment strategy to eight regional networks, but they all need to "speak" to each other, which requires these data-driven algorithms.

3.  Analyzing shopping trends

It also uses AI to predict what customers will be buying and uses these predictions to manage inventory. Many companies use AI for these purposes, which helps them order the right merchandise and the right amount. In Amazon's case, it also helps it have the right inventory in the right warehouses based on consumer shopping trends.

4. AI product development

Amazon has already been selling the Alexa line of personal assistant products for a decade. The technology, which includes the Amazon-branded Echo line, also works with other companies' Alexa-enabled products. Amazon opened up its Alexa APIs to outside developers, who can create their own connected products, or work with an Amazon developer to connect their products. These products, such as earphones and watches, connect to Alexa and allow users to do things like play music, control their smart home products, and get news or information through voice prompts.

5. Generative AI in AWS

Amazon is making a big bet on large language models and how that will impact customer spending in the cloud. CEO Andy Jassy said he thinks companies are underestimating the opportunity and how these generative AI models will reinvent the cloud experience. He predicts this will generate incredible cloud spend. To that end, Amazon is heavily investing in generative AI for Amazon Web Services (AWS), which offers cloud computing services.

He explained that building the models takes time and could be very expensive, and most companies won't be able to, or won't want to, put in that investment. But they'll use Amazon's models and pay for them.

One example of a tool already in use is Code Whisperer, a generative AI product that improves developer productivity by providing coding suggestions. It works like a standard prompt; the developer could say something like, "I want to build a video hosting website," and the program will create the code. That's a groundbreaking tool with incredible possibilities.

Is Amazon's AI better than anyone else's? Jassy summed it up when he said on the earnings call: "I think when people often ask us about Alexa, what we often share is that if we were just building a smart speaker, it would be a much smaller investment. But we have a vision, which we have conviction about, that we want to build the world's best personal assistant." That's Amazon's approach to whatever it does, and although it sometimes produces duds, in general it produces hits. Investors should expect AI to be an important contribution to Amazon's growth in the coming year.