Sai Mamunuru
← writing

Recommendation systems for dummies

Every time you open Instagram and the first reel makes you laugh, stop, and watch till the end and that is not luck. That is a recommendation system doing its job quietly in the background.

A recommendation system is an algorithm that predicts what you will like based on what you (and people like you) have done before. Netflix uses it to suggest shows. Spotify uses it for your Discover Weekly. Instagram uses it to keep you scrolling for "just five more minutes" at 1am.

At its core, the system is asking one question: "Given everything I know about this user, what content should I show them next?"

The brain behind the feed

There are two main approaches recommendation systems use.

1. Collaborative Filtering

This approach groups users by behavior. If you and 10,000 other users all watched similar reels about street food, and those users also heavily engaged with travel content, the algorithm figures you might like travel reels too, even if you have never interacted with one.

Mathematically, the system represents users and content as vectors in a shared space. The similarity between two users u and v is computed using cosine similarity:

similarity(u, v) = (u · v) / (||u|| × ||v||)

-- u · v  : dot product of their preference vectors
-- ||u||  : magnitude of user u's vector
-- Result 1  means identical taste
-- Result 0  means completely different taste

2. Content-Based Filtering

This approach looks at the features of the content itself: audio type, visual style, hashtags, duration, subject matter. If you've consistently engaged with 15-second cooking reels with upbeat music, the system learns those features correlate with your attention.

Modern systems like Instagram's use a hybrid of both. Collaborative filtering finds your tribe, and content-based filtering fine-tunes individual recommendations from there.

The engagement score

The algorithm does not just track what you watch. It tracks how you watch it. Every interaction gets an implicit score. A simplified version looks like this:

Engagement Score =
    (w1 × watch_ratio)
  + (w2 × replay)
  + (w3 × like)
  + (w4 × comment)
  + (w5 × share)
  - (w6 × skip_speed)

watch_ratio  →  how much of the reel you watched (0.0 to 1.0)
replay       →  did you watch it again?
skip_speed   →  how fast you swiped away (fast = strong negative)
w1...w6      →  weights Instagram assigns to each signal

The weights are not public, but research suggests watch time and replays carry the highest weight of all passive signals. The algorithm trusts behavior more than buttons.

The scenarios you're actually curious about

Scenario 1: You accidentally skip a reel and come back to it

Your thumb slips and you swipe past a reel before it even starts. But then you scroll back.

What the algorithm sees: a brief skip (low-weight negative signal), then a deliberate return, which reads as a strong positive signal of intent, followed by your actual watch behavior.

Net Signal = -0.1  (fast accidental skip)
           + 0.8  (return scroll, strong intent signal)
           + 0.9  (full watch after return)
           = +1.6  →  Strong Positive

Coming back overrides the accidental skip almost entirely. The algorithm reads a return scroll as you actively seeking that content. If you then watch fully or replay it, the creator benefits too. That reel gets flagged as content worth distributing further.

Strong positive impression on the algorithm

Scenario 2: You watch a reel while continuously scrubbing through it

You're swiping forward within the reel, watching bits and pieces but not the whole thing.

What the algorithm sees: you stayed on the reel (soft positive), but the watch ratio is low at around 20 to 30 percent, and the forward scrubbing suggests the content did not hold consistent attention.

Net Signal = +0.2  (stayed on reel, did not skip away)
           + 0.1  (partial watch)
           - 0.3  (low watch ratio + scrubbing behavior)
           ≈  0.0  →  Neutral / Weak

The reel will not get boosted in your feed, but it will not disappear either. If many users behave this way with the same reel, it gets flagged as front-loaded. Interesting start, weak middle. That limits how broadly Instagram distributes it to new audiences.

Weak signal. No significant boost.

Scenario 3: Full watch, but no like or comment

No like. No comment. No share. You watched the whole thing and kept scrolling.

What the algorithm sees: watch ratio close to 1.0, which is one of the strongest signals available. A complete watch tells the system you genuinely consumed the content even without explicit action. You will see more content of this type, often within the same session.

A full watch without a like still counts as a strong positive

Scenario 4: Quick double-tap, then keep scrolling

A fast like with low watch time. Instagram knows people often like content out of habit. combination of like plus low watch time actually weighs less than a full watch with no like at all. The algorithm trusts what you do more than what you tap.

Positive, but weaker than a full watch alone

The feedback loop

Every engagement teaches the algorithm something. It builds a user embedding, which is a mathematical fingerprint of your taste. Over time it gets more confident, shows you more of what you have engaged with, and the cycle repeats. This is how a filter bubble forms.

User Profile Content Shown Engagement Updated Profile Repeat

To break it deliberately, engage with something outside your usual patterns. The algorithm treats that as an exploration signal and starts blending new content into your feed.

The cold start problem

What happens when you are a brand new user with no history, or a new creator with zero views? The algorithm has no data to work with. This is called the cold start problem.

For new users, Instagram falls back on trending content in your region, accounts you followed first, and broad signals like age and language. For new creators, the system runs a small experiment. It shows your reel to a tiny test audience of a few hundred people. If that group engages well above average, distribution widens. If not, the reel gets throttled. This is why early engagement on a new post matters so much.

Recommendation systems are not magic. They are math wearing a clever disguise. Next time you go back to a reel you accidentally skipped, the algorithm already noticed.