Vector Search RaG
1.0.0
نظام توصية فيلم متطور يستخدم إمكانيات البحث المتجه وقدرات RAG (الجيل المعزز للاسترجاع) ، مدعومًا بمحولات الجملة في Huggingface و 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 في دليل الجذر مع بيانات الاعتماد الخاصة بك: MONGODB_URI = your_mongodb_connection_string
HUGGING_FACE_TOKEN = your_huggingface_token hf_connection.py )sentence-transformers/all-MiniLM-L6-v2 لتوليد التضمينmongo_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 () يستخدم النظام تجميع MongoDB's $vectorSearch للبحث الدلالي:
.env الخاص بك numCandidates: 100 لتغطية البحث الواسعةgit checkout -b feature/AmazingFeature )git commit -m 'Add some AmazingFeature' )git push origin feature/AmazingFeature )تم ترخيص هذا المشروع بموجب شروط ملف الترخيص المدرج في المستودع.