It’s not uncommon for comics to test out new material in small clubs before they go on national tours. Aziz Ansari made those comedy workouts a bit more intentional.

In advance of his current “Modern Romance” tour, the 31-year-old comedian/actor best known from NBC’s “Parks and Recreation” cherry-picked audiences for roughly 100-person shows, setting up Internet forms that asked potential crowd members to write in their demographic info.

An idea for a book sprouted from all that tour preparation. Ansari had questions — about love, dating, relationships — but he couldn’t find answers. So he felt compelled to fill in the gaps himself.

“I was like, oh man, I feel like this is all anyone’s dealing with,” he said by phone ahead of stand-up gigs Saturday and Sunday at the Orpheum. “So maybe I can try to write this book.”

The book, due next year, will be informational while retaining Ansari’s signature voice — uniquely energetic, curious and exclamatory.

“I’ve been interviewing all these different, you know, sociologists, social psychologists, anthropologists,” he said. “I’ve interviewed a lot of people in New York and L.A., and smaller towns like Monroe, N.Y., and Wichita, Kan. I went to Japan and interviewed people there. I’m going to Paris next week to interview people there.”

Ansari also took to the social-media service Reddit, asking users to chime in on questions ranging from “Do you ever strategically ‘wait’ to text someone back, in order to make yourself more desirable?” to “Has anyone done an arranged marriage? How did that go?” He explained that the process was an extension of his workshop shows — but for the book, not the tour.

Ansari good-naturedly refused to give up the details of his own dating life, but did offer some insights he’s gained. For one: The overwhelming number of tools available to daters — texting, online dating, etc. — may actually be detrimental.

“Whenever [experts] look at decisionmaking, they find that the more options you have, the hardest it is to make a choice,” he said. “And when you do make a choice, you’re less satisfied.”

Another thing: People tend to waste time on dating apps like Tinder without ever making the crucial moves.

“When I interview the people who are unhappy with online dating, they’re the ones who sit there and send messages all day and never actually meet up with the person,” Ansari said. “You’re not going to fall in love with someone over the course of 10 messages.”

All this is far more ambitious than the typical process for stand-up comedians, assembling their sets from the funniest material they have on hand, cohesion arising only by happenstance.

That once was true of Ansari, who began his stand-up career in 2000 while a student at NYU in New York. His first Comedy Central special, 2010’s “Intimate Moments for a Sensual Evening,” was a hilarious and honest collection of jokes, but that’s exactly what it was — a collection.

While he gains momentum in the world of TV and film, Ansari isn’t neglecting his stand-up chops.

“Stand-up is always going to be an important thing to me, just because I feel like there’s something so special about it,” he said. “I can talk about whatever’s going on in my life, and it’s really me, and I can make something that’s just my own.”