---
title: "MongoDB Mastra Integration Adds Hybrid Search, Auto Embedding, and Reranking"
description: "Mastra, an open-source TypeScript framework for building agents, previously required developers to copy operational data into a separate vector collection, generate embeddings, merge semantic and keyword results, and track IDs for follow-up fetches, creating data drift. A new MongoDB integration combines Hybrid Search, Automated Embedding, Bring Your Own Collection (BYOC), pre-filtering, and Native Reranking into a single query. Automated Embedding uses Voyage AI to generate and maintain embeddings for text fields automatically, while BYOC allows Mastra to search the original collection directly, avoiding a separate retrieval copy. Pre-filtering narrows vector search candidates inside $vectorSearch using filterFields, and Native Reranking reorders results for relevance. Together, these features eliminate separate embedding sync jobs and allow one query to handle both semantic intent and concrete constraints, though Native Reranking requires MongoDB Atlas 9.0 with reranking enabled."
---

# MongoDB Mastra Integration Adds Hybrid Search, Auto Embedding, and Reranking

[MongoDB](https://yomu.fyi/company/mongodb) · Nov 24, 2026

**Type:** Announcement

## Summary

Mastra, an open-source TypeScript framework for building agents, previously required developers to copy operational data into a separate vector collection, generate embeddings, merge semantic and keyword results, and track IDs for follow-up fetches, creating data drift. A new MongoDB integration combines Hybrid Search, Automated Embedding, Bring Your Own Collection (BYOC), pre-filtering, and Native Reranking into a single query. Automated Embedding uses Voyage AI to generate and maintain embeddings for text fields automatically, while BYOC allows Mastra to search the original collection directly, avoiding a separate retrieval copy. Pre-filtering narrows vector search candidates inside $vectorSearch using filterFields, and Native Reranking reorders results for relevance. Together, these features eliminate separate embedding sync jobs and allow one query to handle both semantic intent and concrete constraints, though Native Reranking requires MongoDB Atlas 9.0 with reranking enabled.

## Approach / What changed

The integration combines Hybrid Search, Automated Embedding (using Voyage AI), Bring Your Own Collection (BYOC), pre-filtering via filterFields, and Native Reranking (requires Atlas 9.0) into a single MongoDB query, eliminating the need for separate embedding sync jobs and retrieval copies.

## Takeaways

- The integration eliminates separate vector collection and sync by combining Hybrid Search, Automated Embedding, BYOC, pre-filtering, and Native Reranking into one query.
- Automated Embedding uses Voyage AI to handle embedding generation and maintenance, while BYOC avoids copying operational data into a separate retrieval collection.
- Native Reranking requires MongoDB Atlas 9.0 with reranking enabled, and pre-filtering uses filterFields to narrow candidates inside $vectorSearch.

## FAQ

### What is Automated Embedding in the Mastra-MongoDB integration?

Automated Embedding uses a Voyage AI model to generate and maintain embeddings for specified text fields in MongoDB, removing the need for application-side embedding and synchronization.

### How does Bring Your Own Collection (BYOC) work?

BYOC lets Mastra search the original MongoDB collection directly and return full documents, avoiding the need for a separate retrieval copy, ID tracking, and follow-up fetches.

### What are the requirements for Native Reranking?

Native Reranking requires a MongoDB Atlas cluster running version 9.0 with reranking enabled.

**Tags:** [Automated Embedding](https://yomu.fyi/topic/automated-embedding), [Hybrid Search](https://yomu.fyi/topic/hybrid-search), [Mastra](https://yomu.fyi/topic/mastra), [MongoDB](https://yomu.fyi/topic/mongodb), [Reranking](https://yomu.fyi/topic/reranking)

- Source: [MongoDB](https://www.mongodb.com/company/blog/product-release-announcements/mastra-integration-adds-hybrid-search-auto-embedding-reranking)
- Source URL: https://www.mongodb.com/company/blog/product-release-announcements/mastra-integration-adds-hybrid-search-auto-embedding-reranking
- Ingested by Yomu: 2026-11-24T18:01:18.730Z

[Read original post](https://www.mongodb.com/company/blog/product-release-announcements/mastra-integration-adds-hybrid-search-auto-embedding-reranking)
