flix.app: Real-Time Film Recommendations with AI
flix.app uses RAG to find movies that match your vibe. Just describe what you're in the mood for in natural language - from 'dark time travel sci-fi' to 'feel-good comedy with strong female leads' - and discover your next watch.
Inspiration
We are both movie buffs and wanted to build something we would love to use. Traditional search engines rely on exact keywords, genres, or years, which is pretty limiting. We wanted to create something where users can describing the kind of movie they're craving, just like they would describe it to a friend.
en.app - an AI-based book recommender was also a big inspiration.
What it does
flix.app allows users to search for movies using natural language queries. Want a "dark cyberpunk movie with philosophical themes"? Or maybe a "heartwarming coming-of-age story set in the 90s"? The app leverages voyage-multilingual-2 text embeddings and RAG to understand these nuanced requests and matches them with relevant films, considering plot, genre, reviews, and ratings. Users can explore movie details and build their personal watchlist within the app.
How we built it
- Data: We used the BrightData/IMDb-Media Hugging Face dataset and the Cinemagoer API to create a movie database of 55k+ movies, including plots, synopsis, ratings, and metadata.
- Backend: Snowflake for data storage and Snowflake Cortex for AI capabilities, we used voyage-multilingual-2 text embeddings to embed the synopsis / storyline and retrieve the top 100 most similar movies to the query, and used mistral-large-2 to rerank the results based on IMDB rating, genre, director, release year and the synopsis.
- Frontend: Streamlit for the web interface
Challenges we ran into
- Optimizing search results by effectively combining embedding similarity with LLM reranking - response time for mistral-large-2 on Snowflake is quite large even for short input prompts.
- Getting structured outputs from Mistral
- Balancing between quick response times and comprehensive search results
- Managing state and user interactions in Streamlit while keeping the app snappy
Streamlit community deployment - We create a snowflake session only once for the streamlit app and we found it difficult to handle expired Snowflake sessions when deploying on the community cloud. We tried various session management and per query session creation and closure + deletion strategies but they all yielded multiple active sessions errors. If you run into an session expired error, simply click on Manage app tab on lower right and click on reboot app.
Accomplishments that we're proud of
- Built an app we like so much that we are planning to deploy it permanently for our personal use
- Built a responsive, clean UI that makes movie discovery enjoyable, and supports watchlist functionality
- Achieved fast search response times while maintaining result quality
What we learned
- How to effectively combine embedding search with LLM reranking, and which embedding models work the best.
- Streamlit's capabilities and limitations for building interactive web apps
What's next for flix.app
- Integration with Letterboxd
- Personalized recommendations based on public Letterboxd watchlist
- Add movies directly to your Letterbox watchlists (with API key inputs)
- Social features to share and discover movie lists
- Integration with streaming service availability data
Built With
- mistral
- python
- snowflake
- streamlit
Log in or sign up for Devpost to join the conversation.