Artificial intelligence (AI) has taken Wall Street by storm in 2023, and it could be a key growth catalyst for some companies that have been struggling over the last year.

While OpenAI's ChatGPT has given us a glimpse of how useful generative AI applications can be, AI models are getting smarter all the time. Companies that are using this technology to improve their products are best positioned for growing demand.

Two of those struggling stocks over the past year are Upstart Holdings' (UPST 3.34%) and Spotify Technology (SPOT 1.46%). And both are perfectly positioned to benefit from this important new technology.

1. Upstart Holdings

Share prices of AI-based lending platform Upstart rallied sharply in recent weeks, roughly doubling after hitting a 52-week low earlier this year. The share price is, however, still down by more than 90% from its peak. After a rough year for the lending industry, investors are starting to see a recovery on the horizon for this sector.

Upstart revenue was down 67% year over year in the first quarter, but the company secured new long-term funding agreements that are expected to add over $2 billion to the platform in the next year. Management anticipates more deals to come that will provide the capital required to build a more resilient and predictable business over the long term. As a result, analysts are starting to warm up to the stock. BTIG analyst Lance Jessurun rated the stock a buy recently with a $42 price target. The analyst noted that banks like the company's user-friendly loan-approval platform and clean pricing structure, which should drive more demand as the economy improves.

Of course, Upstart has a potentially much greater upside over the next several years. At its current price-to-sales ratio of 3.9, Upstart trades at a big discount to other fintech stocks. The market is undervaluing how this AI-based lending platform can drive strong growth again, given that it produces lower loss rates and better yields for its lending partners.

Moreover, Upstart's AI models are getting smarter with more data. This is a clear indicator that the business should see plenty of demand from banks once the lending market heats up again.

Upstart is obviously vulnerable to a weak economy, but that's why investors should consider buying shares now. You won't get the stock this cheap in a growing lending market.

2. Spotify

Spotify is the largest music streaming service, with 515 million monthly active users worldwide, but slowing growth in users last year spooked some investors and made them question the high valuation that investors were placing on the company. The stock has rebounded this year, but it's still trading well off its peak.

Now's the time to consider buying shares, as Spotify is showing signs of turning the corner on growth. The company is seeing strong gains in new users following the rollout of AI DJ, a new music discovery feature. Growth in monthly active users accelerated in the first quarter, up 22% year over year. Management credits the gains to AI DJ, which was released in February and has become popular with users. During the first-quarter earnings call, management noted that growth in monthly active users and subscriptions is still accelerating as they continue to roll out AI DJ in new markets. 

Spotify was already well ahead of Apple Music and other competitors when it comes to delivering personalized recommendations, which contributed to its market share lead. Apple has far more resources to invest, but Spotify's main advantage is the accessibility of its app. Spotify is available on more devices and offers a free ad-supported plan that has been driving most of its growth over the last year.

With management starting to put more focus on improving profitability, the stock could have room to run. The stock has doubled year to date and trades at a price-to-sales ratio of 2.4, which is slightly less than the average stock in the S&P 500 index.  

As profits improve, Spotify's above-average revenue growth could lead to an even higher price-to-sales multiple and fuel market-beating shareholder returns.