Vector Search RaG
1.0.0
A sophisticated movie recommendation system using Vector Search and RAG (Retrieval Augmented Generation) capabilities, powered by HuggingFace's sentence transformers and MongoDB Atlas.
Vector-Search-RaG/
├── apps/
│ └── semantic_search/
│ ├── __init__.py
│ ├── hf_connection.py # HuggingFace API connection
│ ├── mongo_connection.py # MongoDB connection handler
│ └── movie_recs.py # Movie recommendation logic
├── ragenv/ # Virtual environment
├── LICENSE
└── README.md
git clone https://github.com/yourusername/Vector-Search-RaG.git
cd Vector-Search-RaGpython -m venv ragenv
source ragenv/bin/activate # On Windows: ragenvScriptsactivatepip install pymongo requests python-decouple.env file in the root directory with your credentials:MONGODB_URI=your_mongodb_connection_string
HUGGING_FACE_TOKEN=your_huggingface_tokenhf_connection.py)sentence-transformers/all-MiniLM-L6-v2 model for generating embeddingsmongo_connection.py)movie_recs.py)from apps.semantic_search.movie_recs import search_movies
# Search for movies with a specific plot description
query = "A group of bandits stage a brazen train hold-up"
search_movies(query)from apps.semantic_search.movie_recs import fetch_and_update_movies
# Fetch and update movie information
fetch_and_update_movies()The system uses MongoDB's $vectorSearch aggregation for semantic search:
.env file secure and never commit it to version controlnumCandidates: 100 for broad search coveragegit checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the terms of the LICENSE file included in the repository.