Skip to content

katiavas/Recommander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“š Book Recommendation System

A machine learningโ€“powered(LLM) recommendation system that suggests books based on metadata and semantic embeddings. Built with LangChain, Chroma vector database, and OpenAI embeddings, this project combines classical data analysis with modern NLP techniques.

Example of UI : image image

๐Ÿš€ Features

Content-based recommendations using vector embeddings of book descriptions.

Integration with LangChain + Chroma for efficient similarity search.

Supports semantic querying (beyond exact keyword matches).

Exploratory Data Analysis (EDA) with visualizations to understand book metadata.

Modular pipeline for future extension to collaborative filtering or deep learning models.

๐Ÿ“‚ Dataset

Source: 7k Books with Metadata (Kaggle)

Cleaned dataset (books_cleaned.csv) with standardized categories and enriched descriptions.

๐Ÿ› ๏ธ Installation

Clone the repository

git clone https://github.com/your-username/book-recommender.git cd book-recommender

Create a virtual environment

python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Dependencies include:

pandas, numpy, matplotlib, seaborn

langchain-community, langchain-openai, langchain-chroma

dotenv for API key management

๐Ÿ”‘ Environment Setup

Create a .env file in the project root.

Add your OpenAI API key:

OPENAI_API_KEY=your_api_key_here

๐Ÿ“– Usage

Run the Jupyter notebooks to reproduce results:

jupyter notebook

Rec System AI.ipynb โ†’ Data loading, cleaning, and EDA

recom.ipynb โ†’ Embedding generation, vector database setup, and recommendation engine

Example: from langchain_openai import OpenAIEmbeddings from langchain_chroma import Chroma

Generate embeddings for book descriptions

embeddings = OpenAIEmbeddings() db = Chroma(persist_directory="chroma_store", embedding_function=embeddings)

Query similar books

results = db.similarity_search("space adventure with strong female lead")

๐Ÿ“Š Results

Successfully builds a content-based recommender leveraging embeddings.

Demonstrates meaningful semantic similarity between books.

๐Ÿ”ฎ Future Work

Add collaborative filtering (matrix factorization, nearest neighbors).

Experiment with transformer-based models for richer embeddings.

Build a lightweight web app (e.g., Streamlit) for interactive recommendations.

๐Ÿค Contributing

Contributions are welcome! Please fork the repo and submit a pull request. Inspired by freeCodeCamp. ๐Ÿ“œ License

MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published