Skip to content

Movie Recommendation System using LLMs: Performed similarity search using Weaviate and LangChain on vector embeddings generated by Sentence Transformer. Summarized movie using Phi-3.

License

Notifications You must be signed in to change notification settings

VivekaAryan/Movie_recommendation_system

Repository files navigation

Movie Recommendation System using LLMs

The Movie Recommendation System is designed to provide users with similar movie recommendations. By entering a movie title, users can receive a top 10 list of movies that are similar to their input. Additionally, the system offers a summary of each recommended movie generated by an LLM (Phi-3).

Overview

  • Movie Recommendations: Input a movie title to receive a top 10 list of similar movies that are ranked on weighted scores and popularity of the movie.
  • Movie Summaries: Generate summaries for each recommended movie by leveraging phi-3, providing a brief overview of the movie's plot.

Workflow

  • Data: The data was taken from Movies Daily Update Dataset available on Kaggle. Extra directors name were scrapped from wikipedia and The Movie DataBase website. The data is ingested and recommendation are provided based on the genre, keywords, cast and director name.
  • Recommendations: Previously I have used Count Vectorization method to get embeddings, which essentially represents text as a vector of word counts. To improve this I have generated embeddings using a Sentence Transformer which captures the context, leading to better semantic understanding and improved performance.
  • Weaviate: Used for storage and performing similarity search.
  • LangChain: This framework was used to integrate weaviate with workflow and also used to create a pipeline to streamline the process of generateing summaries.
  • Fast API: Used to handle movie recommendations and summary generation.
  • Next.js: Used to build the user interface for interacting with the recommendation system.

Technologies Used

Frontend

  • Next.js: A React framework that enables server-side rendering and static site generation.
  • React: A JavaScript library for building user interfaces.
  • Axios: A promise-based HTTP client for making API requests.
  • Tailwind CSS: A utility-first CSS framework for styling the application.

Backend

  • FastAPI: A modern, fast (high-performance), web framework for building APIs with Python.
  • Weaviate: A cloud-native, modular, real-time vector search engine built to scale your machine learning models.
  • HuggingFace Transformers: State-of-the-art Natural Language Processing for text generation and embeddings.
  • LangChain: An open-source framework that helps software developers create applications using large language models (LLMs) to perform natural language processing (NLP) tasks

Usage

  1. Open the application in your browser at http://localhost:3000.
  2. Enter a movie title in the search bar.
  3. Select a movie from the auto-complete dropdown list.
  4. Click "Get Recommendations" to view a list of similar movies.
  5. Click "Summarize" on any recommended movie to generate and view a summary.

API Endpoints

  • /api/movies
    • Method: GET
    • Description: Retrieves a list of all available movies for the auto-complete feature.
  • /recommendations
    • Method: POST
    • Description: Retrieves a list of movies similar to the provided title.
  • /summary
    • Method: POST
    • Description: Generates a summary for the specified movie.

Screenshots

  • Movie Recommendations:

image

  • Movie Summary:

image

Demo

Movie.Recommender.System.Final.480p.mp4

License

This project is licensed under the MIT License.

About

Movie Recommendation System using LLMs: Performed similarity search using Weaviate and LangChain on vector embeddings generated by Sentence Transformer. Summarized movie using Phi-3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published