Building a Movie Recommendation Engine with Hugging Face and Voyage AI
Blog post from MongoDB
The blog post by Arek Borucki, a Machine Learning Platform & Data Engineer at Hugging Face, introduces a tutorial for building a mood-based movie recommendation engine using various technologies, including the voyage-4-nano model, Hugging Face for model and dataset hosting, and MongoDB Atlas Vector Search. This innovative system allows users to search for movies based on their emotional state rather than traditional filters like genre or title. The tutorial details the use of AI embeddings to match user moods with movie plot descriptions, leveraging the voyage-4-nano model's embeddings, which are truncated to 1024 dimensions to balance semantic quality and storage efficiency. The tutorial also covers setting up a development environment with FastAPI and configuring MongoDB to manage connections and create a vector search index, while illustrating how Sentence Transformers can simplify working with embedding models. The post explains the process of downloading movie datasets, generating fresh embeddings, and implementing a search API that returns movies matching the user's mood, demonstrating how semantic search can capture nuances missed by traditional genre tags. The tutorial concludes with a comparison of embedding dimensions, highlighting how different dimensional settings impact retrieval quality and offering practical recommendations for balancing accuracy, storage, and latency.