Vector Search RaG
1.0.0
ベクター検索とRAG(検索拡張生成)機能を使用した洗練された映画の推奨システム。
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の$vectorSearch集約を使用しています。
.envファイルを安全に保ち、バージョン制御にコミットしないでくださいnumCandidates: 100を使用しますgit checkout -b feature/AmazingFeature )git commit -m 'Add some AmazingFeature' )git push origin feature/AmazingFeature )このプロジェクトは、リポジトリに含まれるライセンスファイルの条件に基づいてライセンスされています。