A newer version of the Gradio SDK is available:
6.5.1
metadata
title: Recommendation LLM Explainer
emoji: π¬
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
AI-Powered Explainable Recommendations
This project is a high-fidelity demonstration of how Large Language Models (LLMs) can bridge the "explainability gap" in recommendation systems. It transforms opaque collaborative filtering data into transparent, persona-aligned narratives.
π Overview
Instead of providing a "black box" list of suggestions, this system uses LLMs to synthesize natural language explanations based on user personas and collaborative filtering logic.
Key Features
- Specialist Centroids: Personas built by aggregating top "specialists" for specific genres.
- Layered Re-ranking: Incorporates Genre Affinity Boosts and Recency Bias.
- Narrative Synthesis: Uses LiteLLM to generate 3-sentence explanations in "Logic-Driven" or "Social-Behavioral" styles.
π Tech Stack
- Interface: Gradio
- Recommendation Engine: Python (
pandas,numpy,scikit-learn) - LLM Integration: LiteLLM
- Data Source: MovieLens Latest Small
- Visuals: TMDB API for movie posters.
π Quick Start
- Environment Setup:
Create a
.envfile:HF_TOKEN=your_huggingface_token TMDB_API_KEY=your_tmdb_api_key - Install Dependencies:
pip install -r requirements.txt - Data Preparation:
python data_prep.py - Run the Application:
python app.py
π Acknowledgments & Data Sources
- Dataset: This project uses the MovieLens Latest Dataset - Small provided by GroupLens Research.
- Images: Movie posters are retrieved using the TMDB API. Note: This product uses the TMDB API but is not endorsed or certified by TMDB.
