This repository contains a comprehensive Semantic Search and Recommendation Engine built entirely within a single Jupyter Notebook. It integrates advanced techniques including embeddings, vector stores, and Retrieval-Augmented Generation (RAG) to dynamically retrieve relevant products and services.
- Semantic Search: Powered by fine-tuned Sentence-BERT embeddings for precise context-aware matching.
- Vector Database (Pinecone): Efficient storage and fast retrieval of embeddings for similarity search.
- Retrieval-Augmented Generation (RAG): Utilizes LangChain and ChatGroq (LLaMA3) to provide coherent and contextually accurate recommendations.
- Dynamic Query Handling: Includes metadata-based filtering (e.g., product or service, gender, category).
- Natural Language Processing (spaCy): Contextual extraction and filtering based on query content.
- Single Jupyter Notebook: End-to-end implementation covering data ingestion, preprocessing, embedding creation, semantic search, and RAG-powered recommendations.
- Python
- Jupyter Notebook
- LangChain
- ChatGroq (LLaMA3)
- HuggingFace Embeddings (Sentence-BERT)
- Pinecone Vector Store
- spaCy
-
Setup Environment:
pip install -r requirements.txt
-
Configure API Keys:
- Create a
.env
file with yourGROQ_API_KEY
andPINECONE_KEY
.
- Create a
-
Run Jupyter Notebook:
jupyter notebook
- "Show me men's blue jeans"
- "I need painting services"
- "Find women's jeans"
- "Recommend a product"
- "I need automotive services"
Ideal for e-commerce platforms, knowledge bases, and recommendation systems where accurate semantic retrieval and personalized recommendations are critical.
Feel free to fork, modify, and enhance this project. Contributions are always welcome!
Distributed under the MIT License.