VoteSF Recommender
Mar 24th, 2024
The VoteSF Recommender is an application developed for the March 2024 primary election in San Francisco. Below is some infomation about the development of the app, but for more details, check out this article on the VoteSF substack.
Problem
Casting an informed ballot in San Francisco, especially in very down-ballot races like the Democratic Central Committee, is too difficult for regular voters. There are too many ballot items and too many candidates to be properly informed. This leads to very high levels of down-ballot drop-off or regretted votes.
Solution
In interviews, voters regularly told me that what they wanted was to answer a few questions about their prolicy priorities and then get recommendations they should vote for. We get recommendations for all kinds of things in our daily lives, like movies, dates, foods, etc. The VoteSF recommender was a project to apply consumer recommendation system approaches to an important of obscure local election.
Technical Architecture
- Next.js and React for the client application
- Sqlite and redis for data persistance and caching
- Python data pipelines for extracting structured data for the recommendation system
- Flask-api and scikit-learn for ML
Implementation Details
The main goal of the app was to provide high quality, explainable recommendations for voters without assuming prior knowledge of candidates or propositions. The only assumption was that users were sufficiently knowledgable of their own preferences on issues relevant to the election.
To accomplish this I manually generated a policy space and then embedded users, ballot items (candidates and propositions), and endorsers in that space. This policy space was defined manually based on a policy spectrum for eight specific issues. Candidate or voter guide positions were inferred using LLMs based on snippets from issue positions, questionnaire answers, or interviews.
Challenges & Learnings
There were many challenges creating these recommendations. I initially tried creating the policy space from the data. I had ingested candidate questionnaires, candidate webites and issues positions, and voter guides and attempted to get the model to define the policy differences between candidates. Though GPT-4 was a capable model, I couldn't get it to reliably capture meaningful differences between collections of candidates.
Results & Impact
About 2,500 users ended up using the application. I paused development on it after switching over to OpenBallot, but I may revisit the project now that models have improve so significantly.