by jacobobryant on 4/12/2025, 1:02:40 PM
by vitus on 4/12/2025, 3:03:59 PM
Hm, I was curious about the biased shuffle, since I was not expecting that particular shape.
It looks like we basically build up the list of bookmarks as follows [0]:
x = rand()
if x < p:
element = first element
else:
element = random element
return [element] + shuffle(rest of list, according to the original order)
In some sense, it's reminiscent of selection sort. Any particular reason for choosing this approach? One "obvious" downside is that this ends up being an O(n*k) algorithm because you end up building a new list each iteration. It's also harder for me to intuitively understand how shuffled the list is based on the parameter, other than at the two extremes.[0] https://github.com/jacobobryant/yakread/blob/bff756c68d86a07...
I'm also curious about the interleaving approach described in the last section:
> If you’ve already scrolled past all your unread bookmarked items several times but you have a bunch of new subscription items, we should probably lean towards recommending the subscription items.
> I do this by comparing the two lists pairwise and selecting an item via weighted random choice based on how many times they’ve been previously skipped (i.e. scrolled past in the For You feed). e.g. if the first bookmark item has been skipped twice and the first subscription item has been skipped once, then there’ll be a 40% chance we select the subscription item and a 60% chance we select the bookmark item.
I thought we wanted to prefer the item that hadn't been skipped as many times (so, prefer the subscription item)?
by andersmurphy on 4/12/2025, 11:52:17 AM
Thank you for sharing. I was hoping you'd eventually publish an article on Yakread's ranking model, I remember you mentioning it tangentially in one of your talks.
Love how concise the code is.
by alexdobrenko on 4/12/2025, 12:55:52 PM
yeaaaaa go jacob go!!! (also hi!)
Fun to see this on the front page! I worked on Yakread full time for about 8 months as an attempted startup, after a few years of other recommender system startup ideas. Now it's a side project that I develop on the weekends after my kids fall asleep, aided by caffeine (me, not the kids). I'm in the middle of open-sourcing/rewriting it. Hopefully will be done in a couple months? Then I can finally get back to adding new features. I talked about some potential ones in my previous post: https://obryant.dev/p/rewriting-yakread/
also I guess a link to the actual app wouldn't hurt: https://yakread.com