Spaces:
Sleeping
Sleeping
|
Download README.md from d-e-e-k-11/Retail-Product-Assistant: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/spaces/d-e-e-k-11/Retail-Product-Assistant/resolve/main/README.md
- Command line
-
hf download hf://spaces/d-e-e-k-11/Retail-Product-Assistant/README.md
-
curl -L -o README.md https://huggingface.co/spaces/d-e-e-k-11/Retail-Product-Assistant/resolve/main/README.md
1.45 kB
metadata
title: Retail Genius Assistant
emoji: 🤖
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
Retail Product Knowledge Assistant (RAG Model)
This project builds a Retrieval-Augmented Generation (RAG) model using retail product data (Kindle reviews and details). It uses a vector database to store product information and an LLM to answer questions naturally.
Tech Stack
- LLM: Google Gemini (via
langchain-google-genai) - Embeddings: HuggingFace (
all-MiniLM-L6-v2) - Vector Store: ChromaDB
- Framework: LangChain
Setup
- API Key: Add your Google Gemini API Key to the
.envfile:GOOGLE_API_KEY=your_actual_key_here - Build Knowledge Base:
Run the following command to process the data and build the vector database:
(It will automatically detect if the database needs to be built).python main.py
Usage
Run main.py and ask questions about the products, such as:
- "Which Kindle model has the best resolution?"
- "What do users say about the battery life of the Paperwhite?"
- "Is the Kindle Voyage worth the extra money?"
Files
7817_1.csv: Raw product data.preprocess.py: Cleans and formats data into JSON.rag_model.py: Contains the logic for the RAG pipeline.main.py: Interactive CLI for user queries.chroma_db/: Directory where the vector store is persisted.