Movie Explorer
I wrote a small, very simple prototype for a movie recommender system: Movie Explorer. It is a variation of an item-item recommender called an Example-Critiquing System. It is directly inspired by the system Movie Tuner, which is described in The Tag Genome: Encoding Community Knowledge to Support Novel Interaction.
Movie Explorer allows users to search for a movie and then see a list of other similar movies. The movie the user searched for can also be used as an example to “critique” to change the results.
For example: you could search for Lost In Translation (2003) and see similar movies:
You could then apply the following critique:
- Less midlife crisis, less Japan
- More future, more androids
And see a slightly different set of results:
Or you could apply a slightly different critique:
- Less midlife crisis, less Japan
- More road-trip
And get different results again:
Why write it in SQL?
Implementing the system using SQL ticked many boxes for me:
- The implementation is very simple
- The results are directly interpretable
- Interpretable results allowed me to exercise much finer control in improving the overall quality of the recommendations
- The app can run in Streamlit (with some assistance from DuckDB) and doesn’t require any additional servers for database or compute
Squeezing great results from simple tools
My current home coffee setup consists of a plastic Hario V60 Dripper, which costs R120, a Hario kettle and a 1zpresso hand-grinder. Between these tools there isn’t much going on: something to grind the coffee, something to hold the grinds, something to pour water.
The difference in brewed coffee is a product of ingredients (beans, water), recipe (bean-to-water ratio, water temperature, pour structure) and operator technique. This simple setup offers very direct control over the process and is capable of sublime results when used well1.
I find myself drawn to the SQL approach for the same reason I am drawn to V60: there is great satisfaction to be had in getting the best results possible from the careful use of simple tools.
Quality of recommendations
I have found the results to be quite good in general. Recommendations are generally in the right ballpark. However, there are many challenges in assessing the results. Movie similarity is an artificial concept and there is no ground truth to which the results can be compared. What counts as a good recommendation lies in the eye of the beholder.
I wrote this tool because I wanted to use the results to solve a frequent, personal problem: finding something to watch for the night. I am a movie enthusiast and I have a good base knowledge of movies. As a result, I place higher value on results that introduce me to movies that are entirely new to me. Obvious results are less useful to me because I’m already aware of them.
Everybody who uses the tool will have a different set of references for prior movie knowledge and a very different idea of the obviousness of results.
Maybe one day I will add extra settings to allow users to express their preferences for novelty and vibe.
Try it out
If you find yourself wondering what to watch perhaps Movie Explorer can help you find something.
-
I can’t claim to have achieved such sublime results yet but whenever I am served amazing pour-over coffee I am reminded that the difference lies in personal skill rather than expensive gear. ↩︎