A user-friendly, interactive book recommendation system that leverages large language models (LLMs), semantic embeddings, and NLP techniques to provide precise content-based recommendations. Users can filter by category and emotional tone, enabling nuanced book discovery beyond keyword matching.
- Project Overview
- Features
- Technologies Used
- How It Works
- Setup & Installation
- Usage
- Challenges & Solutions
- Outcome & Learnings
- Future Improvements
- Credits
This project builds a semantic book recommender using modern NLP techniques and LLMs. Book descriptions are transformed into vector embeddings, allowing users to find books that closely align with their interests. The system incorporates:
- Semantic search via vector embeddings
- Zero-shot classification for category normalization
- Sentiment/emotion analysis for mood-based filtering
- Interactive dashboard using Gradio
- Semantic Book Search: Find books based on meaning rather than exact keywords.
- Category Filtering: Standardized via zero-shot classification.
- Emotion Filtering: Filter books by emotional tone using sentiment/emotion analysis.
- Interactive Dashboard: Real-time exploration of recommendations with thumbnails, descriptions, and author info.
- User-Friendly Interface: Designed for non-technical users.
- Data Processing: Python, Pandas, NumPy
- LLM & Embeddings: OpenAI embeddings, Hugging Face Transformers
- Vector Database & Retrieval: LangChain + Chroma
- Classification & Sentiment Analysis: Hugging Face Zero-Shot Classifiers, fine-tuned RoBERTa
- Dashboard / Interface: Gradio
- IDE / Tools: PyCharm
Why: Transformers provide contextual embeddings; LangChain + Chroma enable semantic search; zero-shot classification simplifies messy book categories; Gradio creates a practical interactive dashboard.
-
Data Acquisition & Cleaning:
- Dataset: 7K Books Kaggle Dataset
- Cleaning includes handling missing descriptions, standardizing categories, and creating a combined title/subtitle field.
-
Embeddings & Vector Database:
- Book descriptions are converted into embeddings using Transformer-based models.
- Embeddings are stored in a Chroma vector database for fast similarity search.
-
Query Handling & Recommendation:
- User input is embedded and compared against stored book embeddings.
- Top-k similar books are retrieved.
-
Filtering & Enhancement:
- Category filtering: via Hugging Face zero-shot classification
- Emotion filtering: fine-tuned RoBERTa model assigns emotional tones to book descriptions
-
Dashboard Display:
- Results presented on a Gradio interface with book thumbnails, authors, and filtered recommendations.
- Clone the repository:
[git clone https://github.com/Sarach-git/Book-Recommendation.git
cd book-recommender