Movie Recommendation System using AI
Write a movie you loved and get 10 similar movies with an Explanation Card from Ollama AI On-Premise, add to Watch List in one-click.
What did you love?
Examples: "I just saw Inception and was struck by the narrative structure in dreams and questions about reality"
Come utilizzare Recommendation Engine
Describe a movie or content you liked
Describe a movie, TV show, or book you enjoyed. You can also describe specific themes (e.g., "film noir 1940s with private detective") or emotions (e.g., "something tense and psychological like Gone Girl"). The engine will interpret natural language descriptions, not just exact titles.
Start your search and wait for recommendations
Click "Search" to send your query to the backend ML model based on RAG vector. The system compares your request's embedding with a corpus of movies and indexed content, selects the top 10 most semantically similar titles and generates personalized explanations for why each title matches your tastes.
Explore results and use explanations to choose
Every result shows title, year, rating, genre and a specific explanation of the thematic connection to your search. AI model-generated explanations help distinguish between titles that may look similar but have different deep themes. Save interesting titles for later viewing.
Suggerimenti
- Most effective queries combine genre, theme, and emotional tone: "thriller psychological claustrophobic like Black Swan" yields much more targeted results than "dance film". Add references to directors, historical periods, or specific narrative techniques for further refinement.
- The system is optimized for movies with original language and Italian metadata. Queries in Italian produce better results than queries in English because the corpus is indexed with Italian descriptions. If you can't find what you're looking for, try rephrasing your query using different or more specific terms.
- This tool is also a concrete example of how to implement an RAG system in production: embedding with sentence-transformers all-MiniLM-L6-v2, vector store Redis Stack HNSW, re-ranker cross-encoder, generation with Ollama on-premise. The source code for the ML microservice is available in the repository for those who want to study the architecture.
Domande frequenti
How does the recommendation engine work?
The system uses Retrieval-Augmented Generation (RAG): your query is converted into a numerical vector (embedding) through a sentence-transformer model. This vector is compared with precomputed embeddings of a movie corpus using cosine similarity search on Redis Vector Search (HNSW). The most similar movies are retrieved and the Ollama (llama3.1:8b, on-premise) model generates personalized explanations of thematic connections.
Is the service available if the backend is offline?
No. The recommendation engine requires a connection to the Spring Boot backend and the ML FastAPI microservice. If the service is not available, the tool displays a set of predefined mock results (10 example movies) with the note "AI not available" to allow you to explore the output format anyway. The mock data is not personalized to your query.
Why do results change between different sessions?
The Ollama model generates explanations in a non-deterministic way (temperature > 0): the same query can produce slightly different explanations between sessions. The retrieved movies from the vector search are deterministic (same query → same movies in HNSW order), but the explanatory text varies. To get more stable results, you can ask the team to reduce the model's temperature or cache explanations for frequent queries.
Are my search data saved or sent to external services?
No. The query is processed by the backend and self-hosted ML microservice (Ollama on-premise, no external cloud provider). No persistent server profiling: local search history remains in your browser. No text is sent to OpenAI, Anthropic or other third-party services.
How many movies have been built into our recommendation system?
The indexed corpus covers a curated film catalog with Italian descriptions and metadata, precomputed as embeddings and stored in the Redis HNSW vector store. It's not an exhaustive database of all existing films: if a niche or very recent title is missing, it's because it hasn't been included in the indexed corpus yet. Reformulating your query with broader topics and genres helps you still get relevant suggestions.