# MongoDB Atlas

<figure><img src="/files/Mk7AJyLNIAPagCis9bts" alt="" width="308"><figcaption><p>MongoDB Atlas Node</p></figcaption></figure>

### Cluster Configuration[​](https://js.langchain.com/docs/integrations/vectorstores/mongodb_atlas/#initial-cluster-configuration) <a href="#initial-cluster-configuration" id="initial-cluster-configuration"></a>

To set up a MongoDB Atlas cluster, go to the [MongoDB Atlas ](https://www.mongodb.com/)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.

{% hint style="warning" %}
Ensure the cluster you create is version 7.0 or higher.
{% endhint %}

### Creating Index

After setting up your cluster, the next step is to create an index for the collection field you intend to search.

1. Go to the **Atlas Search** tab and click on **Create Search Index**.
2. Select **Atlas Vector Search - JSON Editor**, choose the appropriate database and collection, and then paste the following into the text box:

```json
{
  "fields": [
    {
      "numDimensions": 1536,
      "path": "embedding",
      "similarity": "euclidean",
      "type": "vector"
    }
  ]
}
```

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.

{% hint style="info" %}
This section is a work in progress. We appreciate any help you can provide in completing this section. Please check our [Contribution Guide](broken://pages/G48tdmpQ3z4CTWEspqkA) to get started.
{% endhint %}

### Flowise Configuration

Drag and drop the MongoDB Atlas Vector Store, and add a new credential. Use the connection string provided from the MongoDB Atlas dashboard:

<figure><img src="/files/2fTPZVFYVxBdT4OzMm53" alt=""><figcaption></figcaption></figure>

Fill in the rest of the fields:

<figure><img src="/files/9Ivo6bTkmaF6FkzQbRtu" alt="" width="252"><figcaption></figcaption></figure>

You may also configure more details from Additional Parameters:

<figure><img src="/files/iDmB0ehjzwy1IAtVaWJ5" alt="" width="518"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/integrations/langchain/vector-stores/mongodb-atlas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
