You might not be excited about using new generative artificial intelligence (AI) applications like ChatGPT in your day-to-day workflow, but your boss probably is.

Despite higher interest rates, and fear of a recession they could trigger, companies of all sizes still appear eager to subscribe to services that can boost employee efficiency. Recently, C3.ai (AI 3.02%) and UiPath (PATH 0.26%) reported results from the three-month period that ended on July 30 and sales are up by a double-digit percentage for both.

Which one of these AI-driven software providers is best positioned to turn the tidal wave of demand for productivity solutions into stock market gains for your portfolio? Let's examine the case for each in light of their recent performances.

The case for C3.ai

Founded under the name C3 in 2009, this company developed some of the core components of what is now the C3 AI Platform over a decade ago. In 2013, the company began jamming different buzzwords into its name, including "energy" and "Internet of Things" before settling on "AI" in 2019.

Shares of C3.ai have fallen from their previous peak but they're still up about 87% this year. Investors are thrilled with the increase in demand for enterprise AI that drove fiscal first-quarter revenue 10.8% higher year over year to $72.4 million.

In March, C3.ai released the C3 Generative AI service and it's already reporting record demand. The company signed eight new agreements during the fiscal first quarter across a slew of different industries. Its generative AI customers include the U.S. Department of Defense (DoD), Koch Industries, and Bank of America.

Demand for C3.ai's services could rise even further in the quarters ahead. Earlier this month, C3.ai launched a new generative AI suite with dozens of industry-specific solutions and its pipeline of generative AI sales opportunities exceeds that of any product it's introduced in 14 years.

The case for UiPath

UiPath is a leader in the robotic process automation software niche. It doesn't have AI in its name, but AI is at the heart of the communications-mining and document-understanding tools it offers.

In a nutshell, UiPath helps companies build software robots that can automate repetitive tasks and accomplish more with fewer employees. Fiscal second-quarter sales rose 18.6% year over year. That's faster than C3.ai grew, but this figure hardly tells the whole story. 

UiPath's services are practically selling themselves amid a relatively tricky economic environment for software companies. Subscription service sales rose sharply even though the company significantly reduced spending on sales and marketing.

UiPath's fiscal second quarter 2024 income statement visualized.

The direct costs of generating sales didn't rise nearly as fast as sales did, which resulted in a healthy 83% gross margin during its fiscal second quarter.

UiPath is still losing money, but its bottom line is moving in the right direction. The company reported a 10% adjusted operating margin in its fiscal second quarter, which was a huge improvement from the negative 5% operating margin it reported in the previous-year period.

UiPath is targeting a 20% long-term operating margin and clients eager to deepen their relationship are helping it get there. The number of customers contributing over $1 million in annual revenue jumped up to 254, a 30% increase year over year.

The better buy?

In its latest report, C3.ai said more than three-fifths of fiscal first-quarter sales came from partners like Google Cloud, Amazon Web Services, Microsoft, and Booz Allen Hamilton. Unfortunately, it looks like those partners are extracting a heavy toll to drive business in C3.ai's direction.

C3.ai's cost of providing services jumped, which caused its gross margin to drop to just 56% in the fiscal second quarter. Management is boasting about record levels of demand for AI services, but this doesn't jibe with subscription service revenue that rose just 7.6% year over year.

C3.ai income statement visualized.

Despite pulling in roughly one-fourth as much revenue, C3.ai reported an operating loss similar in size to UiPath's during the three months ended July 30. 

UiPath significantly reduced its operating loss over the past year. C3.ai's operating loss expanded slightly over the same time frame even though the company lowered its pace of investment in research and development.

During the three months ended July 30, UiPath raised its investments in research and development while narrowing its operating loss. Moreover, the company is confident enough about its ability to produce sustainable profits in the quarters ahead that its board of directors recently approved a $500 million share buyback program.

UiPath is clearly outperforming C3.ai but the stock market actually has higher expectations for the latter. C3.ai shares are trading for 11.5 times trailing sales while UiPath is trading for just 9.2 times trailing sales. With a much better financial performance and a better valuation, UiPath is clearly the better AI stock to buy right now.