This repository demonstrates how to vectorize the data using the Amazon SageMaker Jumpstart models.
MongoDB Atlas Databse with Sample Data
update the ATLAS_URI value in template.yaml and .env files.
Generate the vector embedding(egVector) for fullplot field in sample_mflix.movies collection
cd mdb_lex_lambda2/mdb_lex_lambda/util
python3 mongodb_vectorization_search.py
Create the Vector Search Index for the egVector field created in the previous step.
{
"mappings": {
"dynamic": true,
"fields": {
"egVector": {
"dimensions": 384,
"similarity": "euclidean",
"type": "knnVector"
}
}
}
}
cd ..
sam build
sam package
sam deploy
Refer to the Cloudformation Event for any errors