Guide: How to implement Simple Ranking Algorithm

This is a post about a Julius interaction in which it helped me quickly generate a ranking algorithm for a list of movies.

Every Sunday night I watch a movie selected at random from a list of recommendations that I update regularly. Each movie has 3 industry scores (IMDb, Rotten Tomatoes and Metacritic), the date on which it was added to my list and the number of recommendations (really the distinct number of people that suggested I add it to my list).

I liked the randomness of selection but I wanted it more weighted, so that the older the movie is, the higher it’s likelihood for selection.

Now, I knew I wanted to weigh the scores somehow in an order of importance (where I care about the number of recommenders the most, followed by IMDb, then by Metacritic and finally by Rotten Tomatoes, the least reliable of the bunch in my opinion). But for the recency score I figured I wanted some exponential growth but I really didn’t know what rate to pick for it. This is where Julius helped instantly by quickly generating a sample plot with a few different growth rates that I could select from:

Together, we quickly arrived at a scoring function and Julius implemented it instantly. Then I described how I wanted it still to retain some randomness and the final selection was made from a score-weighted list.

I’m watching Frailty (2001) tonight and you can see the entire conversation here!

Happy ranking!

6 Likes

Wow! this is a really cool and fun use of Julius.

In your prompt I really like how you break the task into simple language instructions. That’s a neat and useful trick.

Prompt:

I have a dataset of movies that were recommended to me, where I noted the movie name, date I added it to the list, the number of recommendations it received (as in the distinct number of people that recommended it to me), IMDb score, Rotten Tomatoes score and Metacritic score.
To begin with, I would like to talk to you about a ranking approach that would help me select a movie from that list to watch this evening (and going forward). Can you help me develop an algorithm?

Thanks for sharing Antonio! :heart:

2 Likes

Yeah I’ve noticed much better results if we kinda discuss what I want done along the way, as a series of simpler steps. Of course, one downside is you can eventually lose the conversation start from the context window after which you risk nonsensical answers or confusion. Best so far has been simpler steps and every once in a while restating what is being worked on as the conversation grows longer.

2 Likes

That’s a really useful tip! Regarding context window, we try to do our best to preserve as much as we can using an AI summarization approach for longer conversation, however this is still in the early phases of being built. Your current approach is totally the right way to use Julius until context summarization is nailed :smile:

3 Likes