The launch of OpenAI's ChatGPT in November 2022 has put the spotlight on the huge investment potential of artificial intelligence (AI). In fact, according to Ark Investment Management's Big Ideas 2023 report, AI software will rake in revenue of up to $14 trillion in 2030.

Given that AI is becoming deeply entrenched in our daily lives and is driving inventions such as autonomous driving technology, robotic surgery, and autonomous robots, this megatrend can no longer be ignored. To benefit from this opportunity, long-term retail investors may benefit by picking these two stocks now.

1. The Trade Desk

Streaming entertainment is undoubtedly one of the broad secular trends of the current decade. The rapid pace of cord-cutting and the shift in consumer preference from linear television to streaming has also changed the way advertisers reach out to their target audience.

The Trade Desk (TTD 1.67%) has been at the forefront in leveraging this opportunity by programmatically matching buyers and sellers of advertisements on the CTV (connected television, a device or software used to support video content streaming) platform. The company's Koa system analyzes large datasets with machine learning algorithms to help clients design effective and targeted advertising strategies. The company also leverages AI algorithms to optimize ad placements in real-time bidding, thereby ensuring a high return on investment for its clients.

While CTV is a major tailwind, The Trade Desk's omnichannel platform also has a significant presence in areas such as display, online video, audio, mobile, and digital out-of-home. Being an independent demand-side platform with a broad customer base across media formats, The Trade Desk has access to huge amounts of first-party data. The data gives the company a competitive edge since it not only helps clients make optimal decisions but also makes the company's products increasingly intelligent.

Additionally, unlike walled gardens such as Alphabet and Meta Platforms, the company does not own content and advertising inventory. Since there is no apparent conflict of interest, The Trade Desk enjoys a higher level of trust from its clients for its focus on transparency and objectivity.

The Trade Desk also introduced the UID2.0 identity standard (based on the phone number or email address), which enables targeted advertising while ensuring higher user privacy compared to cookies. By making the standard an open solution and encouraging the entire advertising industry to adopt it, the company has been quite successful in making it mainstream.

The Trade Desk is already proving to be a major exception in the advertising industry. Despite a tough economic environment marked by high inflation and rising interest rates, The Trade Desk's revenues soared by 32% year over year to $1.6 billion in 2022. This is almost a four times faster pace as compared to 8.6% year-over-year growth in global digital ad spending in 2022. The company is already profitable and cash-flow positive.

With robust top-line growth, solid financials, and a well-monetized AI-based business model, The Trade Desk can prove to be an attractive AI pick now.

2. Upstart

Upstart (UPST 2.76%) is a consumer loan company that leverages big data and AI algorithms to help financial institutions, banks, and credit unions assess the creditworthiness of loan applicants. The company also uses AI technology to originate and service loans, which are then sold off to banking partners and other financial institutions. The company has been striving to replace the use of the conventional FICO scores from Fair Isaac with its more accurate credit scores -- which can, in turn, help expand credit access to underserved populations.

Upstart claims that its AI models  are far more accurate than traditional lending models used at large U.S. banks and can allow for 173% higher approvals at the same default rate and 53% fewer defaults at the same approval rate.

Despite these pros, Upstart's recent financial performance has been far from encouraging. The top-line growth rates have turned negative, while the once-profitable company has now become loss-making. In the current high-interest environment, banks and other financial partners have been reluctant to directly lend or purchase loans from Upstart. Since the company earns the bulk of its revenue from fees paid by banks and financial partners for loans processed on its platform, Upstart saw a steep revenue decline in the past few quarters. Subsequently, the stock price cratered by rouhgly 90% from its all-time high in mid-2021.

However, things may now be on the verge of improvement. While the company currently caters to the personal and auto loan market, Upstart is gearing up to enter the home loans market with home equity line of credit (HELOC) products in late 2023. The company currently has 99 lending partners, up from 50 a year ago. Upstart has also been focusing on improving its cost structure and has reduced its headcount by 30%, which will help boost margins even at low loan volume.

All these improvements have been reflected in Upstart's better-than-expected second-quarter revenue (ending June 30, 2023) and adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) guidance. The company expects $135 million in revenue in the second quarter, which is up by 31% on a sequential basis. Upstart also expects a net loss to be $40 million, which is also a significant improvement from the loss of $129.3 million in the previous quarter.

Considering the pros and cons, Upstart now seems to be on the verge of a turnaround, especially since the Federal Reserve seems to be close to ending interest rate hikes. Hence, it makes sense for investors to pick up a small position in this AI stock.