Destinations
MongoDB
MongoDB can act as a source or destination
1. Pick an Embedding Model
Pick an embedding model from the options on the models page
Consult the Embedding Benchmarks scripts for a more empirical approach. Otherwise, there are KNN evaluation tools that we can help use.
2. Create MongoDB Cluster via MongoDB Atlas
- Navigate to MongoDB Atlas.
- If you don’t already have an account, create one. Otherwise, sign in.
- Follow the prompts to create a new cluster.
3. Create Vector Search Index
- In MongoDB Atlas, navigate to
Atlas Search
- Choose
Create Search Index
and thenJSON Editor
. - Select the collection you wish to index.
- Enter the JSON configuration for your index. Replace
"test_embedding_768"
with the name of the field where your embeddings will be stored, and adjust"dimensions"
to match the dimensions of your chosen embedding model from the models page.
Sample Index Configuration:
{
"fields":[
{
"type": "vector",
"path": "embedding_768",
"numDimensions": 768,
"similarity": "euclidean"
}
]
}
4. Create your MongoDB Connection
Set MongoDB as your Source
Not currently supported
Set MongoDB as your Destination
Python
from mixpeek import Mixpeek
mixpeek = Mixpeek('API_KEY')
mixpeek.connections.create(
alias="my-mongo-test",
engine="mongodb",
details={
"host": "your_host_address",
"database": "your_database_name",
"username": "your_username",
"password": "your_password"
}
)
Shell
curl --location 'https://api.mixpeek.com/connections' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"alias": "my-mongo-test",
"engine": "mongodb",
"details": {
"host": "my_hostname",
"database": "my_database",
"username": "my_username",
"password": "my_password"
}
}'