Settings

Theme

Show HN: A personalized HN feed that learns from your favorites

hn.shaped.ai

23 points by tullie 3 months ago · 10 comments · 2 min read

Reader

Hi HN,

I've been a daily user here for almost 15 years. Over that time, my interests have shifted. I find I'm now more interested in deep-dive technical posts and personal blogs than the big tech announcements that often dominate the front page. The "top" feed was starting to feel stale, and I was spending more time digging through "new".

So, I decided to build what I wanted: a personalized "For You" feed.

Link: https://hn.shaped.ai

It's a simple concept: you log in with your normal HN credentials, and as you favorite stories, it learns what you're interested in and re-ranks the feed to show you more of that content.

How it was built (a 2-day hackathon):

The Client: I used an AI coding assistant (lovable.dev) to generate the initial React/Next.js client. It was surprisingly effective at getting a functional baseline up and running quickly. The Backend: Since HN's official API is read-only, I set up a lightweight Supabase backend. It uses edge functions to proxy login/voting requests to HN's unofficial API and a Postgres DB to cache posts and user events (favorites, etc.). The Personalization: The ranking is powered by my own company's platform, Shaped. It ingests the posts and your favorite events in real-time.

The core of the ranking logic is a configurable formula. It's essentially the classic HN algorithm with a personalization term multiplied in:

(item.score / score_penalty + content_similarity) / (time_decay)

The content_similarity is calculated by comparing a post's text embedding to an embedding of your recent favorites. The best part is that you can actually play with the score_penalty in the UI to make the personalization stronger or weaker.

This is very much a v1. I'd love to get your feedback. Does the personalization feel right? Any bugs? What's missing that would make you use it daily?

Next on my list are things like collaborative filtering (once there's enough data!), semantic search, and a "similar stories" feature. Here's also a more detailed write-up about how it was built: https://www.shaped.ai/blog/building-a-hackernews-for-you-fee...

Thanks for checking it out!

leakycap 3 months ago

What I like about HN is that it isn't an echo chamber of "my stuff"

I often stumble across articles, blog entries, and even niche industry news that sparks an idea or thought or helps me understand a part of the world I didn't know about

The human curation and upvoting process on HN is one of the best parts if you ask me

  • tullieOP 3 months ago

    Yeah I definitely agree. I think the nuance is that personalization doesn't have to completely overrun the current ranking algorithm, it more just slightly boosts known similar content you might like. Should be the best of both worlds really.

    • leakycap 3 months ago

      I think you're missing what I'm describing: which is that HN is a rare thing for what it is

      And for what it isn't

      Putting a little bit of what something specifically isn't (algorithmic personalization on HN) can change something and your own perception of what "is trending" or what is hot right now

      There are very few corners of the web without this kind of algorithmic feed & maybe not everything needs to be "best of both" when including a little of both completely changes it

  • semi_sentient 3 months ago

    agreed, but looking at the article it looks like you can turn this personalization bit up or down though to find the mama bear/just right level?

    • tullieOP 3 months ago

      Yeah exactly. I was really worried about reducing the serendipity that HN provides (as it's arguably why I've used it for so long as well) but the configurability allows it so that everyone can tweak their level of personalization to get their perfect goldilocks level.

    • leakycap 3 months ago

      What is the just right level when tuning in one's echo chamber?

      • semi_sentient 3 months ago

        shrug maybe the solution on something like this is where every nth post is a personalized one.

        • leakycap 3 months ago

          sneeze I do that by skimming things and clicking on every nth post that interests me

    • rjparton 3 months ago

      the "mama bear/just right level" I love this so much

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection