The launch of OpenAI's next-generation chatbot, ChatGPT, in November 2022 has proved to be a golden moment for artificial intelligence (AI) stocks. While the current investor interest in all things AI may seem to be bordering close to frenzy, it is not completely without substance.

According to Ark Investment Management's Big Ideas 2023, AI software could generate up to $90 trillion in enterprise value in 2030. Given that AI is all set to be the next big thing for the coming decade, long-term investors may benefit by picking these three stocks now.

1. MongoDB

The first AI stock to buy now is cloud-native database specialist MongoDB (MDB -2.23%). The company's document database continues to benefit from the increasing use of non-relational databases in various applications across industries.

Additionally, the increasing adoption of AI in our daily lives, coupled with more AI-driven coding tools for developers, is expected to dramatically boost the development and deployment of new software applications. Since many of these applications rely on large amounts of unstructured data stored across disparate sources, MongoDB's scalable and distributed database design, combined with easy querying capabilities, will benefit from these tailwinds.

MongoDB has delivered an impressive performance in the first quarter of fiscal 2024 (ended April 30, 2023), with revenue and earnings crushing consensus analyst expectations. Revenue rose year over year by 29% to $368.3 million, while adjusted net income almost tripled to $45.3 million in the same time frame. Although not yet generally accepted accounting principles (GAAP) profitable, the company is gradually inching toward that goal.

MongoDB's cloud-based subscription offering, Atlas (database-as-a-service), is the fastest-growing part of the company. In Q1, Atlas' revenue was up 40% year over year and accounted for 65% of the company's total sales. Atlas ended Q1 with 41,600 customers, up from 33,700 in the same quarter of the previous year. Despite the difficult macros, Atlas consumption trends were better than expected.

MongoDB is definitely not cheap at 17.7 times next year's sales. However, considering the company's rapidly improving financial metrics, robust consumption trend for Atlas, and AI tailwinds, the premium valuation seems justified.

2. Splunk

The second AI stock to buy now is machine learning (ML, a subfield of AI) software player Splunk (SPLK). Long before AI was a buzzword, this leading security and observability company was deploying advanced ML models to ingest and analyze huge amounts of machine data to derive actionable insights. The company helps clients in areas such as information technology operations, search, analytics, and security. Splunk enables real-time performance monitoring and analysis of enterprise infrastructure and applications, as well as helps mitigate cyber risk by detecting, investigating, and responding to cyber threats rapidly.

Splunk delivered blowout results in the first quarter of fiscal 2024 (ended April 30, 2023), with revenue and earnings handily beating consensus estimates. Revenue jumped 11% year over year to $752 million, while cloud revenue grew at a much faster pace of 30% year over year to $419 million. Customers spending at least $1 million annually on Splunk's cloud-based products grew year over year by 32% to 433, while total customers spending $1 million annually on the company's products (cloud and on-premises) were up by nearly 17% year over year to 810.

On the other hand, operating expenses were down by 2% year over year in the first quarter. These numbers are impressive, considering that customers continued to delay cloud spending in the first quarter. Improving revenue mix toward higher-margin cloud business and optimal expense management can further push up profit margins in the coming quarters.

Additionally, Splunk reported a free cash flow of $486 million in Q1, up 253% on a year-over-year basis. Thanks to the solid business momentum, the company revised its revenue and free cash flow guidance higher for fiscal 2024.

Splunk estimates its total addressable market to be more than $100 billion. Considering the company's solid financials and an annual run rate of only $3.7 billion, there is much scope for future growth for this ML stock.

3. Pinterest

The third AI stock to pick now is social media company Pinterest (PINS -2.02%). The company's entire business model depends on the use of powerful AI algorithms for visual search (searching for images using other images instead of text) and for making personalized recommendations based on patterns associated with past user activity and the relationships between saved pins.

Thanks to an in-depth understanding of its user base, Pinterest has also been quite useful for marketers in crafting effective and targeted advertising strategies. Since users come to the platform in search of new ideas and with shopping intent, the relevant advertisements do not feel like an intrusion and instead help improve the overall user experience.

After struggling for the past few quarters, new CEO Bill Ready seems to have finally brought Pinterest back into growth mode. In the recent quarter (Q1 fiscal 2023 ended March 31, 2023), the company's revenue climbed 5% year over year to $603 million, ahead of the consensus estimate of $592.6 million. The company also saw a 7% year-over-year increase in the number of monthly active users (MAUs) to 463 million.

Pinterest is now focusing on improving engagement and monetization per user by increasing overall actionability on the platform. To do that, Pinterest is increasing shopping advertisements and engagement on shoppable pins. The company has also partnered with Amazon to bring more products and an improved consumer buying experience to the platform. And the company recently introduced mobile deep linking to redirect users to the advertiser's website.

Pinterest is not yet a profitable company. However, with management focusing on increasing average revenue per user, share prices may also grow rapidly in the coming quarters.