Whenever I open Instagram these days, it feels like I’m being watched. The minute I follow a new person or double tap a landscape or cat pic, the photo-sharing app—to which I’ve long been addicted—picks up on it and starts showing me remarkably similar images. It’s almost creepy.

As it turns out, Instagram’s algorithms are indeed keeping an eye on me, busily drawing a complex map of my likes, follows, and other in-app behavior, and that of the people I follow as well. As the app learns, its Explore tab gets better at recommending photos and videos to me. I can’t help but take the bait. Next thing you know, I’m barreling down some new visual rabbit hole and following six more people.

The Explore tab is essentially one giant recommendation engine. But the ever-evolving methodology Instagram uses to sort through one of the world’s largest networks of photographs, comments, and likes is far more complex than your standard, “If you like that, you’ll like this” logic. And, surprisingly, Instagram says that despite the image recognition capabilities of parent company Facebook, there’s no machine vision involved.

Explore, the section of Instagram designated by a little magnifying glass, is where the app suggests images and videos you might appreciate, and allows you to search for more by tag, username, or place. This infinite and constantly refreshing grid of imagery does its best to reflect your interests. Mine shows a blend of musical instruments like drums and synthesizers, various animals, hazy film photography, tattoos, weird psychedelic art, food, beach scenery, and the occasional meme. You might see political rallies, yoga poses, makeup tutorials, shirtless Justin Bieber pics, corgis, vintage cars, and whatever it is you happen to be into—even if you didn’t know that you were.

For either of us, a few of the suggestions may seem oddly off-base. But for the most part, they’re increasingly likely to draw us in. And a week or two from now—depending on how much you swipe and tap your way through Instagram—this page could look totally different. With tens of millions of images being shared on Instagram in a typical day, how does the Explore tab figure out what to show us?

The process is twofold. First, the algorithms embark on a content quest known within the company as “sourcing.” To machete its way through Instagram’s massive jungle of image uploads, the system uses a blend of your own behavior—which pictures you’ve liked, who you follow, what kinds of images you share with others, and data about the people you follow, including what types of posts they like, for example—to narrow millions of images down to just a few hundred. It even analyzes the activity of people who follow the same accounts you do. Aided by Instagram’s machine-learning prowess, the process gradually gets more sophisticated and, for many users, eerily spot-on.

“You base [the predictions] off an action, and then you do stuff around that action,” says Layla Amjadi, a product manager at Instagram who works on Explore. “Following is an explicit action. Liking is another explicit action. You have all these different permutations of what you can look at.”