Skip to content

Netflix RecSys | A modular, Netflix-style movie recommendation engine using FastAPI, Sentence-Transformers, ChromaDB, LangChain, and TensorFlow. Local-first, vector search & reranking, LLM-powered explanations. Contributions welcome!

Notifications You must be signed in to change notification settings

rashmin-gajera/Netflix-RecSys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netflix RecSys - By Rashmin Gajera

Author Open for Suggestions

Project Prototype
Project Prototype

🚀 Overview

Netflix RecSys is a modular, local-first Netflix-style movie recommendation system. It features:

  • FastAPI backend
  • Sentence-Transformers for embeddings
  • ChromaDB for vector storage
  • Reranking (cosine similarity, TensorFlow cross-encoder)
  • LangChain for LLM explanations
  • Simple HTML/JS frontend

🛠️ Tech Stack

FastAPI Sentence Transformers ChromaDB TensorFlow Numpy Selenium LangChain

Directory & File Structure Overview

Top-Level

  • README.md
    This file. Project overview, file walkthrough, and credits.

  • RUN_INSTRUCTIONS.md
    Step-by-step guide to running, training, and extending the system locally.

  • docker-compose.yml
    Docker Compose setup for ChromaDB, API, and frontend services.

  • data/

    • processed/sample_movies.jsonl
      Sample movie dataset (JSONL format) for ingestion and testing.

services/

api/

  • requirements.txt
    All Python dependencies for the API service.

  • app/

    • main.py
      FastAPI app entrypoint. Loads API routes and health check.
    • api.py
      Registers and includes all API routers.
    • routes/recommend.py
      /api/recommend/query endpoint: Accepts a query, retrieves candidates, reranks, and returns recommendations.

embeddings/

  • embedder.py
    Embedding pipeline using sentence-transformers. Also provides a CLI for ingesting data into ChromaDB.
  • requirements.txt
    Dependencies for embedding and ingestion.

retriever/

  • chroma_client.py
    ChromaDB client for upserting and searching movie vectors.
  • requirements.txt
    ChromaDB dependency.

reranker/

  • model.py
    Lightweight in-memory reranker using cosine similarity.
  • tf_crossencoder.py
    TensorFlow-based cross-encoder reranker (trainable, optional).
  • requirements.txt
    Numpy dependency for reranking.

scraper/

  • selenium_scraper.py
    Selenium-based IMDB plot fetcher (stub/example).
  • requirements.txt
    Selenium and requests dependencies.

langchain/

  • rag.py
    LangChain-based RAG pipeline for LLM-powered recommendation explanations.

frontend/

  • index.html
    Simple HTML/JS frontend for demoing the recommendation API.

How It Works

  1. Ingest Data:
    Use services/embeddings/embedder.py to encode movie plots and store them in ChromaDB.

  2. API Service:
    services/api/app/main.py launches a FastAPI server exposing /api/recommend/query.

  3. Retrieval & Reranking:

  4. Frontend:
    services/frontend/index.html provides a simple UI to test recommendations.

  5. Optional Extensions:


Contributing

This project is open for suggestions and improvements!
Feel free to open issues or pull requests.


Credits

Made by Rashmin Gajera.


About

Netflix RecSys | A modular, Netflix-style movie recommendation engine using FastAPI, Sentence-Transformers, ChromaDB, LangChain, and TensorFlow. Local-first, vector search & reranking, LLM-powered explanations. Contributions welcome!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published