MongoDB Atlas
Upsert embedded data and perform similarity or mmr search upon query using MongoDB Atlas, a managed cloud mongodb database.
Last updated
Upsert embedded data and perform similarity or mmr search upon query using MongoDB Atlas, a managed cloud mongodb database.
Last updated
To set up a MongoDB Atlas cluster, go to the MongoDB Atlas website and sign up if you don’t have an account. When prompted, create and name your cluster, which will appear under the Database section. Then, select "Browse Collections" to either create a new collection or use one from the sample data provided.
Ensure the cluster you create is version 7.0 or higher.
After setting up your cluster, the next step is to create an index for the collection field you intend to search.
Go to the Atlas Search tab and click on Create Search Index.
Select Atlas Vector Search - JSON Editor, choose the appropriate database and collection, and then paste the following into the text box:
Make sure the numDimensions
property corresponds to the dimensionality of the embeddings you're using. For instance, Cohere embeddings typically have 1024 dimensions, while OpenAI embeddings have 1536 by default.
Note: The vector store expects certain default values, such as:
An index name of default
A collection field name of embedding
A raw text field name of text
Ensure you initialize the vector store with field names that match your index and collection schema, as shown in the example above.
Once this is done, proceed to build the index.
This section is a work in progress. We appreciate any help you can provide in completing this section. Please check our Contribution Guide to get started.
Drag and drop the MongoDB Atlas Vector Store, and add a new credential. Use the connection string provided from the MongoDB Atlas dashboard:
Fill in the rest of the fields:
You may also configure more details from Additional Parameters: