MongoDB Atlas is a fully-managed cloud database available in AWS, Azure, and GCP. It supports native Vector Search, full text search (BM25), and hybrid search on your MongoDB document data.
MongoDB Vector Search allows to store your embeddings in MongoDB documents, create a vector search index, and perform KNN search with an approximate nearest neighbor algorithm (Hierarchical Navigable Small Worlds). It uses the $vectorSearch MQL Stage.
MongoDB Atlas Embedding and Reranking API enables access to Voyage AI models via MongoDB Atlas.Note: The
MongoDBAtlasVectorSearch interface is compatible with MongoDB Vector Search in the Community Edition.
Setup
To use MongoDB Atlas, you must first deploy a cluster. To get started, sign up for free to Atlas. In order to use Voyage AI embedding and reranking models, you will need to create a model API key. Generate your API key, and get access to 200 million free tokens on the latest models. First, start by installing the following libraries to follow this notebook.Insert data
We load documents, generate embeddings via the Atlas-hosted Voyage AI model, and programmatically create the Vector Search index.Create vector index
vector_store.create_vector_search_index command above, you can also create the vector search index using the Atlas UI with the following index definition:
Query vector store
Semantic search
Find the most relevant documents based on semantic similarity.Semantic search with score
Retrieve documents along with their relevance scores.Semantic search with filtering
First, let’s update the vector search index by providing the field to filter on.$eq.
Hybrid search
Combining Vector Search with Full-Text Search (Keyword) using Reciprocal Rank Fusion (RRF).Vector search and reranking
A two-stage process: broad recall followed by high-precision reranking to ensure maximum relevance.Retrieval-Augmented Generation (RAG)
For guides on how to use the MongoDB Vector Store integration with LangChain for Retrieval-Augmented Generation (RAG), see the following tutorials:Other notes
- More documentation can be found at MongoDB’s LangChain Docs.
- This feature is Generally Available and ready for production deployments.
API reference
For detailed documentation of allMongoDBAtlasVectorSearch features and configurations head to the API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

