Amazon DocumentDB (with MongoDB Compatibility) makes it easy to set up, operate, and scale MongoDB-compatible databases in the cloud. With Amazon DocumentDB, you can run the same application code and use the same drivers and tools that you use with MongoDB. Vector search for Amazon DocumentDB combines the flexibility and rich querying capability of a JSON-based document database with the power of vector search.This notebook shows you how to use Amazon Document DB Vector Search to store documents in collections, create indicies and perform vector search queries using approximate nearest neighbor algorithms such “cosine”, “euclidean”, and “dotProduct”. By default, DocumentDB creates Hierarchical Navigable Small World (HNSW) indexes. To learn about other supported vector index types, please refer to the document linked above. To use DocumentDB, you must first deploy a cluster. Please refer to the Developer Guide for more details. Sign Up for free to get started today.
OpenAIEmbeddings
so we need to set up our OpenAI environment variables.