“We’re the construction workers in the digital world. Our job is to lay one brick after another,” said Yi Yake, co-founder of a data labeling factory in Jiaxian, a city in central Henan province. “But we play an important role in A.I. Without us, they can’t build the skyscrapers.”

While A.I. engines are superfast learners and good at tackling complex calculations, they lack cognitive abilities that even the average 5-year-old possesses. Small children know that a furry brown cocker spaniel and a black Great Dane are both dogs. They can tell a Ford pickup from a Volkswagen Beetle, and yet they know both are cars.

A.I. has to be taught. It must digest vast amounts of tagged photos and videos before it realizes that a black cat and a white cat are both cats. This is where the data factories and their workers come in.

Taggers helped AInnovation, a Beijing-based A.I. company, fix its automated cashier system for a Chinese bakery chain. Users could put their pastry under a scanner and pay for it without help from a human. But nearly one-third of the time, the system had trouble telling muffins from doughnuts or pork buns thanks to store lighting and human movement, which made images more complex. Working with photos from the store’s interior, the taggers got the accuracy up to 99 percent, said Liang Rui, an AInnovation project manager.

“All the artificial intelligence is built on human labor,” Mr. Liang said.

AInnovation has fewer than 30 taggers, but a surge in labeling start-ups has made it easy to farm out the work. Once, Mr. Liang needed to get about 20,000 photos in a supermarket labeled in three days. Colleagues got it done with the help of data factories for only a couple thousand dollars.