How aryanchougule/youtube_video_recommender_system works
ReelRank is a session-based video recommender: the API accepts watch history, search, or request controls; the engine retrieves candidates, ranks them for configurable objectives, applies page-level policy, and returns recommendations with explanations. The graph also preserves catalog and interaction-data generation, session intent, and counterfactual evaluation. Edges are limited to README statements, excerpted calls, and SOURCE INDEX references; some implementation details of unsampled modules are therefore not expanded.
Main entry points: engine.py Recommendation engine · artifacts.py Loaded model artifacts · app.py Recommendation API · blend.py Recall fusion
Components 21
Catalog and behavior data
- Catalog sources
src/recsys/data/catalog.py - Synthetic catalog
src/recsys/data/synthetic.py - Watch simulator
src/recsys/data/simulator.py - Interaction schema
src/recsys/data/schema.py
Recommendation runtime
- Recommendation engine
src/recsys/engine.py - Text representation
src/recsys/features/text.py - Content retrieval
src/recsys/recall/content.py - Collaborative retrieval
src/recsys/recall/cf.py - Recall fusion
src/recsys/recall/blend.py - Session intent
src/recsys/intent.py
Ranking and policy
- Ranking features
src/recsys/rank/features.py - Objective ranker
src/recsys/rank/multitask.py - Ranker
src/recsys/rank/ranker.py - Page policy
src/recsys/policy/rerank.py
API and serving
- Recommendation API
src/recsys/api/app.py - Demo interface
src/recsys/api/static/app.js - Loaded model artifacts
src/recsys/artifacts.py - Serving export
src/recsys/serving/export.py
Evaluation
- Counterfactual evaluation
src/recsys/counterfactual.py - Recommendation metrics
src/recsys/metrics.py
Other components
- Viewer
Connections 25
- Viewer → Demo interface: uses
- Demo interface → Recommendation API: sends requests
src/recsys/api/static/app.js - Recommendation API → Recommendation engine: calls
src/recsys/api/app.py - Recommendation API → Loaded model artifacts: loads
src/recsys/api/app.py - Recommendation engine → Loaded model artifacts: uses
src/recsys/engine.py - Recommendation engine → Recall fusion: orchestrates retrieval
src/recsys/engine.py - Recommendation engine → Session intent: uses
src/recsys/engine.py - Recommendation engine → Page policy: applies
src/recsys/engine.py - Recommendation engine → Recall fusion: fuses candidates
src/recsys/engine.py - Recall fusion → Content retrieval: includes source
src/recsys/recall/blend.py - Recall fusion → Collaborative retrieval: combines sources
- Content retrieval → Text representation: queries vectors
src/recsys/recall/content.py - Loaded model artifacts → Content retrieval: loads
src/recsys/artifacts.py - Loaded model artifacts → Collaborative retrieval: loads
src/recsys/artifacts.py - Loaded model artifacts → Ranking features: builds
src/recsys/artifacts.py - Loaded model artifacts → Ranker: loads
src/recsys/artifacts.py - Recommendation engine → Objective ranker: ranks by objectives
- Recommendation engine → Ranker: scores candidates
- Ranking features → Ranker: provides features
src/recsys/rank/ranker.py - Ranking features → Objective ranker: provides features
src/recsys/rank/multitask.py - Recommendation engine → Page policy: diversifies page
src/recsys/engine.py - Catalog sources → Synthetic catalog: loads when configured
src/recsys/data/catalog.py - Watch simulator → Interaction schema: coerces interactions
src/recsys/data/simulator.py - Recommendation API → Serving export: uses exported bundle
- Counterfactual evaluation → Recommendation metrics: computes measures
src/recsys/counterfactual.py