Wall Street is fired up about generative artificial intelligence (AI), a technology that uses simple prompts to automate the creation of media content like images and videos. Goldman Sachs says generative AI could add almost $7 trillion to the global economy over the next decade by boosting labor productivity, and countless analysts have revised price targets higher across the stock market to account for expected workflow efficiencies.

Fortunately, the market is still very early in its adoption of generative AI, so opportunities abound for patient investors. If I were to invest $5,000 in AI stocks right now, I would split my money 70/30 between Amazon (AMZN 3.43%) and Datadog (DDOG 4.95%), respectively.

Here's why.

Amazon: A leader in cloud AI developer services

The first artificial intelligence (AI) stock I'd buy is Amazon (AMZN 3.43%). Its investments in AI over the last two decades have already had a material impact on the business. Amazon leans on AI to provide relevant product recommendations on its marketplace and to optimize robotic picking routes in its fulfillment centers. Similarly, Amazon Web Services (AWS) has the broadest and deepest suite of AI capabilities in the cloud, and consultancy Gartner recently recognized its leadership in cloud AI developer services.

Amazon hopes to build on that momentum with recently introduced generative AI products Bedrock and CodeWhisperer. The Bedrock service connects developers with pretrained large language models (LLMs) that form the foundation of generative AI applications, helping them build software that can create novel text and images. Similarly, CodeWhisperer is a generative AI application that accelerates software development by automating portions of the coding process.

Those products should help Amazon capitalize on the growing demand for AI software, but the investment thesis is much broader: Amazon dominates the e-commerce market in North America and Western Europe, and its market share is actually expected to rise in 2023. Amazon is also the third-largest adtech company in the world, and AWS has been the gold standard in cloud computing for 12 years and counting.

In short, Amazon has a strong competitive position in three markets -- e-commerce, adtech, and cloud computing -- and all three are forecast to grow at roughly 14% annually through 2030. Amazon should be able to match that pace at a minimum, which makes its current valuation of 2.5 times sales look quite cheap. That's why I'd allocate 70% of a $5,000 investment to this AI stock right now.

Datadog: A leader in AI for IT operations

The second AI stock I'd buy is Datadog. Its observability and security software helps organizations keep their applications and infrastructure running smoothly, and its AI engine Watchdog automates workflows like anomaly detection and root cause analysis to accelerate incident response times. Powerful AI has helped Datadog separate itself from the pack. Forrester Research recently recognized the company as a leader in AI software for IT operations.

Datadog hopes to build on that momentum with two new AI products: LLM Observability and Bits. LLM Observability helps clients optimize generative AI applications by continuously monitoring the performance of the underlying large language models. Meanwhile, Bits is a generative AI assistant that allows IT teams to query performance monitoring data in natural language, and it recommends remediations to streamline incident management.

Those products should help Datadog capitalize on growing demand for generative AI software. In fact, Wolfe Research strategists recently told clients that "generative AI tailwinds could make [Datadog] the fastest-growing software company." But there is more to Datadog than AI, and investors should understand the entire business.

Datadog offers dozens of observability and security products, allowing clients to monitor every level of the technology stack from a single platform. That comprehensive strategy is resonating with the market. CEO Olivier Pomel says 82% of Datadog customers use at least two products and 21% use six or more products. But quality is what really matters, and glowing reviews from industry analysts suggest the company is providing clients with quality products.

Beyond AI for IT operations, Datadog has been recognized as a leader in other observability verticals, including application performance monitoring, log monitoring, and network monitoring. That puts the company in a good position. Demand for observability and security software should intensify in the coming years as organizations continue to invest in cloud migration and other digital transformation projects, all of which contribute to IT complexity. For that reason, Datadog expects its addressable market to grow at 11% annually to reach $62 billion by 2026.

Shares currently trade at 15 times sales. That's not a cheap valuation, but it's a bargain compared to the three-year average of 36.2 times sales, and a reasonable price to pay given the growth prospects. That's why I would allocate 30% of a $5,000 investment to this growth stock today.