~/projects/semantic-books
Semantic Book Recommender
Recommends books by meaning rather than keywords, combining vector search with zero-shot genre classification and emotion scoring.
- Status
- Completed
- Context
- Completed project
- Type
- Applied NLP
SCREENSHOTAdd a capture of the working app here
01Problem
Keyword matching misses books that fit what a reader describes in meaning but not in exact words.
02What I built
- Embedded book descriptions with Sentence Transformers and searched them in ChromaDB.
- Added zero-shot genre classification with BART-MNLI and emotion scoring with DistilRoBERTa.
- Built a Gradio interface for exploring recommendations.
- Fixed a GPU compatibility issue using a PyTorch nightly build with CUDA 12.8 support.
03How it works
- Reader’s description
- Embedding
- ChromaDB search
- Genre and emotion filters
- Gradio results
04Decisions
| Decision | Why | Trade-off |
|---|---|---|
| Search by meaning | Keyword matching misses books that fit a description in meaning but not in wording. | Recommendation quality has not been formally benchmarked. |
| Pretrained zero-shot models | Genre and emotion signals without training my own classifiers. | Limited to what the pretrained models already capture. |
| PyTorch nightly with CUDA 12.8 | Fixed a GPU compatibility issue. | Nightly builds are less stable than releases. |
05Result
Outcome
A working recommender that combines semantic search with genre and tone, built on pretrained models.
Limitations
Uses pretrained models rather than ones I trained. Recommendation quality has not been formally benchmarked.
Stack
PythonLangChainChromaDBSentence TransformersHugging FaceBART-MNLIDistilRoBERTaGradio