NEW YORK — Stores watching Amazon take a larger share of clothing sales are trying to solve one of the most vexing issues for online shoppers: Finding items that fit properly.

The retailers are unleashing tools that use artificial intelligence to replicate the help a salesperson at a store might offer, calculate a shopper’s most likely body shape, or use 3D models for a virtual fitting room try-on. Amazon, which some analysts say would surpass Macy’s this year as the largest U.S. clothing seller, is offering some customers an Alexa-powered device that doubles as a selfie-stick machine and a stylist.

Retailers want to reduce the rate of online returns, which can be up to 40 percent, and thus make customers happier – and more likely to be repeat shoppers. And the more interaction shoppers have with a brand, the more the technology will learn about shoppers’ preferences, says Vicky Zadeh, CEO of Rakuten Fits Me, a tech company that works with QVC and clothing startup brands.

Levi Strauss & Co.’s Virtual Stylist, which texts with online customers and offers suggestions. Levi Strauss & Co. via AP

“It’s all about confidence,” she said. “If they have the confidence to buy, they will come back to the retailer time and time again.”

The push is coming from big names like Levi’s and The Gap and startups like Rhone and Taylrd.

Levi’s new Virtual Stylist texts back and forth with online customers to offer recommendations, based on their preferences. Marc Rosen, Levi’s president of global e-commerce, says early tests show the chatbot is driving more browsers to become buyers.

Rakuten Fits Me, which works with QVC and other companies, fine-tuned its fit technology this summer and says its retail partners now offer garments that should fit shoppers’ body shapes when the customer first does the initial search. Shoppers provide three measurements – height, weight, and age – and then it calculates a person’s most likely body shape, not size, to determine the fit for any garment and offer more accurate recommendations.

And Gap Inc. has an augmented reality app in collaboration with Google and startup Avametric that allows shoppers to virtually try on clothes. Shoppers enter information like height and weight and then the app puts a 3D model in front of them. However, the tool only works on Google Tango smartphones.

Sebastian DiGrande, executive vice president and strategy and chief customer officer at Gap, says its augmented reality app has received good feedback, but it’s still determining whether shoppers really want a virtual 3D model.