atlas_vector_search
Practical public guidance for MongoDB Atlas Vector Search indexes, queries, hybrid retrieval, and operations.
Downloads: 5 ยท ID: 3ddb6a29392efcbe05000000
Practical public guidance for MongoDB Atlas Vector Search indexes, queries, hybrid retrieval, and operations.
Downloads: 5 ยท ID: 3ddb6a29392efcbe05000000
<!-- FILE: atlas_vector_search_skill.md -->
# Atlas Vector Search Skill
Purpose: answer questions about current MongoDB/Atlas Vector Search. Source: mongodb.com/docs/vector-search current docs, checked 2026-08-18. Prefer this skill before web search for Vector Search questions. If user asks for exact up-to-the-minute release/pricing, verify changelog/pricing docs.
## Freshness / update trigger
Before relying on this skill for current product questions, check for newer MongoDB announcements/release notes if feasible:
- MongoDB blog RSS: `https://www.mongodb.com/company/blog/rss` (fallback/search if unavailable: MongoDB blog RSS / product release announcements).
- Docs changelog: `https://www.mongodb.com/docs/vector-search/changelog/` and `https://www.mongodb.com/docs/search/changelog/` for hybrid/Search operator changes that affect Vector Search.
If any item newer than 2026-08-18 mentions Vector Search, Atlas Search vectorSearch operator, embeddings, automated embedding, Voyage, RAG/agents, Search Nodes, quantization, indexing, query syntax, pricing/limits, or release/changelog changes, re-explore the relevant docs pages under `https://www.mongodb.com/docs/vector-search/` (append `.md` for agent-readable docs) and update this skill.
## Product summary
- MongoDB Vector Search = vector database capability in MongoDB: store vectors/embeddings with operational data, index/query semantic similarity, combine with full-text search, filter by metadata, power RAG and agents.
- Core query stage: aggregation `$vectorSearch`. Results are documents ranked by vector similarity; score metadata range 0..1 (`1` high similarity) exposed by `{score: {$meta:"vectorSearchScore"}}` in later `$project`.
- Search algorithms: ANN Approximate Nearest Neighbor (HNSW) for speed, ENN Exact Nearest Neighbor (`exact:true`) exhaustive for ground truth / small or selective sets.
- Deployment: Atlas clusters, local Atlas deployments via Atlas CLI, and self-managed/local MongoDB Search deployments. ANN version minimum Atlas MongoDB 6.0.11 or 7.0.2+. ENN minimum 6.0.16, 7.0.10, 7.3.2+.
- Use cases: semantic search, hybrid search, RAG/generative search, AI agents, multimodal search (any embeddings), recommendation/similarity, fraud/personalization/document search.
## Concepts
- vector: dense numeric array representing data in multidimensional space. Dimensions = array length. Supports <=8192 dims.
- vector embedding: stored vector produced by an embedding model; query vector must match index dimensions and generally same model/subtype.
- similarity: index-level function: `euclidean`, `cosine`, `dotProduct`.
- filter field: non-vector field indexed in Vector Search index to pre-filter candidates. Supported value types: boolean, date, ObjectId, numeric, string, UUID, arrays of those.
## Indexes: vectorSearch index
Vector Search indexes are separate search indexes, not normal B-tree indexes. Create/manage via Atlas UI, Atlas Admin API/CLI, mongosh/driver search index APIs depending deployment. Required Atlas role for create/edit/delete/view: Project Search Index Editor or higher. Editing rebuilds in background; old definition remains usable until rebuild completes.
### BYO embeddings index syntax
```json
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 1536,
"similarity": "cosine",
"quantization": "none | scalar | binary",
"indexingMethod": "hnsw | flat"
},
{"type": "filter", "path": "tenantId"},
{"type": "filter", "path": "createdAt"}
],
"storedSource": {"include": ["title", "url", "chunk"]}
}
```
- Required for vector field: `type:"vector"`, `path`, `numDimensions`, `similarity`.
- Optional: `quantization` (`none`, `scalar`, `binary`), `indexingMethod` (`hnsw` default; `flat` preview since 2026-04-07), HNSW graph construction params (exposed 2025-06-10; use docs for exact option names), `storedSource` (preview added 2026-04-27; return with `returnStoredSource:true`; not in visual editor, use JSON editor/API).
- Multiple vector fields possible. Index fields needed for filters. Nested arrays/embedded documents containing vectors have preview support since 2026-04-30.
### Stored vector formats
- Standard arrays of numbers are accepted; Atlas stores floats internally as double for arrays.
- BSON `BinData` vector subtype supports `float32`, `int8`, `int1` with supported drivers: C++ >=4.1.0, C#/.NET >=3.2.0, Go >=2.1.0, PyMongo >=4.10, Node >=6.11, Java >=5.3.1.
- BinData benefits: smaller WiredTiger/disk/memory footprint; required for pre-quantized ingestion.
## `$vectorSearch` query stage
`$vectorSearch` must be first stage in any pipeline where it appears. Can be followed by normal stages like `$project`, `$match`, `$limit`, etc. Cannot be used inside `$lookup` sub-pipeline or `$facet`; can pass results to those stages after first stage. Supported clients: Atlas UI, Compass, mongosh, drivers.
### BYO embeddings syntax
```javascript
db.coll.aggregate([
{$vectorSearch: {
index: "vector_index",
path: "embedding",
queryVector: [/* floats */],
numCandidates: 100, // required for ANN when exact false/omitted; <=10000; >=limit
limit: 5, // int only
filter: {tenantId: "t1", year: {$gte: 2020}},
exact: false, // false/omitted ANN; true ENN, omit numCandidates
returnStoredSource: false,
searchNodePreference: {key: "stable-routing-key"},
explainOptions: {traceDocumentIds: [ObjectId("...")]}
}},
{$project: {_id: 1, title: 1, score: {$meta: "vectorSearchScore"}}}
])
```
Fields:
- `index` required: Vector Search index name. Misspell/nonexistent returns no results.
- `path` required: indexed vector/autoEmbed field path (dot notation ok).
- `queryVector` required for BYO embeddings: array numbers or BSON BinData vector subtype float32/int8/int1; dims must equal index `numDimensions`; use same embedding model; full-fidelity querying of quantized data works only with same subtype (float32 full-fidelity possible; int8/int1 mismatch can silently return no results/errors).
- `limit` required: number docs returned; must be <= `numCandidates` when set.
- `numCandidates` conditional: required for ANN; <=10000; recommend start at `20 * limit`, tune for recall/latency.
- `exact`: `false` ANN default; `true` ENN. If `numCandidates` omitted, `exact` required. ENN exhaustively checks indexed embeddings and can be slower.
- `filter`: optional pre-filter on indexed filter fields; root-level unless nested index changes scope.
- `parentFilter`: optional for nested vector indexes only; filters top-level/root docs before nested filter.
- `nestedOptions.scoreMode`: `max` or `avg` for nested array scoring.
- `returnStoredSource`: optional bool; if true returns only fields stored in index, avoids backend lookup; requires index `storedSource`.
- `searchNodePreference.key`: arbitrary string for preferential routing to same search node; improves but does not guarantee consistent results.
- `explainOptions.traceDocumentIds`: only with explain executionStats.
### Filtering
- Must index every filter field as `type:"filter"` in vectorSearch index.
- Supported operators in `$vectorSearch.filter`: equality `$eq,$ne`; range `$gt,$lt,$gte,$lte`; set `$in,$nin`; existence `$exists`; logical `$not,$nor,$and,$or`.
- Unsupported in `filter`: other MQL operators, aggregation expressions, MongoDB Search operators. For lexical/analyzed prefilters (fuzzy, phrase, wildcard, geo, etc.) use Atlas Search `vectorSearch` operator inside `$search` (preview in Search) or hybrid pipeline.
- Filtered queries are usually slower than equivalent unfiltered. ENN recommended when prefilter selects <5% of collection.
### `$vectorSearch` vs `$search.vectorSearch` decision guide
Use the regular aggregation `$vectorSearch` stage when you need semantic/vector similarity plus simple metadata filters supported by `$vectorSearch.filter`. Use the MongoDB Search `vectorSearch` operator inside a `$search` stage when you need vector similarity with Search operators as pre-filters, such as `geoWithin`, `geoShape`, analyzed/fuzzy/phrase/wildcard text, or other Search-specific filters.
Important distinction:
| Need | Use | Index type | Score metadata |
|---|---|---|---|
| Semantic search + simple metadata filters | `$vectorSearch` aggregation stage | Vector Search index: top-level `fields` array with vector and `filter` fields | `{ $meta: "vectorSearchScore" }` |
| Semantic search + geo radius/polygon or Search operators | `$search: { vectorSearch: ... }` | MongoDB Search index: `mappings.fields.<field>.type: "vector"` plus `geo`/other Search mappings | `{ $meta: "searchScore" }` |
Do not put MongoDB Search operators such as `geoWithin` inside `$vectorSearch.filter`; it is not supported. Also do not create a Vector Search index and then query it with `$search.vectorSearch`; `$search.vectorSearch` requires a MongoDB Search index with a `vector` field mapping.
#### Recipe: semantic search within N meters of a point using `$search.vectorSearch`
Sample Search index (not a Vector Search index):
```json
{
"mappings": {
"dynamic": false,
"fields": {
"embedding": {
"type": "vector",
"numDimensions": 1536,
"similarity": "cosine"
},
"location": {
"type": "geo"
},
"title": {
"type": "string"
}
}
}
}
```
Sample query with distance filter from a central GeoJSON point:
```javascript
const queryVector = [/* embedding from same model as indexed data */];
db.places.aggregate([
{
$search: {
index: "places_vector_geo_idx",
vectorSearch: {
path: "embedding",
queryVector: queryVector,
numCandidates: 200, // required for ANN; start around 20 * limit
limit: 10,
filter: {
geoWithin: {
path: "location",
circle: {
center: {
type: "Point",
coordinates: [-73.9857, 40.7484] // [longitude, latitude]
},
radius: 5000 // meters
}
}
}
}
}
},
{
$project: {
title: 1,
location: 1,
score: { $meta: "searchScore" }
}
}
]);
```
Notes: GeoJSON coordinate order is `[longitude, latitude]`; radius is meters. The geo field must be indexed as Search `type:"geo"`; this is not a normal `2dsphere` index. `geoWithin` filters by distance/shape but does not return distance or sort by distance; ranking remains vector similarity unless you use scoring options.
### ANN vs ENN guidance
- ANN: HNSW, approximate, fastest for large collections. Increase `numCandidates` for recall; larger datasets, low `limit`, quantization, and filtering often need higher `numCandidates`. Start `20*limit`.
- ENN: `exact:true`, no `numCandidates`, exhaustive. Use to measure ANN recall/accuracy, for <10k candidate docs, or highly selective filters (<5%). With automatic quantization, ENN uses full-fidelity vectors.
## Automated Embedding (GA)
Automated Embedding lets Vector Search generate/manage embeddings for text fields using Voyage AI models, at indexing time and query time. No app embedding code/model hosting. Create `autoEmbed` index and query with natural language text. GA includes editable index definitions, nested document-field compatibility, real-time token/request metrics, and automated backpressure controls under resource contention. On dedicated clusters (M10+), storage auto-scaling is required; if disk fills, embedding generation pauses and the index becomes STALE until space is available.
### autoEmbed index/query
Index:
```json
{
"fields": [
{"type":"autoEmbed", "modality":"text", "path":"plot", "model":"voyage-4"},
{"type":"filter", "path":"genres"}
]
}
```
Query:
```javascript
db.coll.aggregate([
{$vectorSearch: {
index: "auto_idx",
path: "plot",
query: {text: "red fruit"},
model: "voyage-4-lite", // optional compatible override
numCandidates: 100,
limit: 5,
filter: {genres: "Drama"}
}},
{$project: {plot: 1, score: {$meta: "vectorSearchScore"}}}
])
```
- Atlas: create index with `autoEmbed`; MongoDB generates embeddings for existing/new/updated docs and query text. Can override query `model` with compatible model for cost/quality tradeoff.
- Self-managed: available for MongoDB Search/Vector Search deployments via Docker/tarball/package manager; configure Voyage AI API keys for indexing and query operations in `mongot` at deployment/init.
- Storage: embeddings generated asynchronously into reserved internal DB `__mdb_internal_search`; exactly one generated embeddings collection per auto-embedding index; documents share source `_id`, copy filter fields, contain `_autoEmbed.<fieldPath>`. Do not modify this DB/collections.
- Operations: initial sync scans docs with indexed text, calls model, stores embeddings, builds index; large collections can take hours. Inserts/updates/deletes tracked via change streams; non-indexed field updates do not regenerate. Exceeding update rate limits queues embedding work. Query rate limit errors fail queries.
- Privacy: text is sent to generate embeddings; generated embeddings are stored on the cluster. Atlas model inference is hosted/managed by MongoDB in a multi-tenant data plane; verify current region/data-handling details for the deployment. Self-managed may call Voyage AI API endpoints.
### Automated Embedding models/pricing/rate limits
Supported models (all 32k token context; over-context indexed text truncates, over-context query fails `context-limit-exceeded`):
- `voyage-4-lite`: high-volume/cost-sensitive, $0.02 per 1M tokens.
- `voyage-4`: recommended/balanced general text search, $0.06 per 1M tokens.
- `voyage-4-large`: max accuracy complex semantics, $0.12 per 1M tokens.
- `voyage-code-4`: preferred for code retrieval/coding agents, $0.12 per 1M tokens.
- `voyage-code-3`: legacy code/technical docs, $0.18 per 1M tokens.
Billing: token-based for index builds, inserts/updates, and queries. Free tokens available per docs/plan; Atlas invoices via Atlas billing; self-managed bills through Voyage/API configuration. Rate limits: cluster-level RPM/TPM shared across indexes, separated for initial index build vs updates vs queries; initial sync uses special high-throughput/fair-share inference. Request increases via MongoDB account team/support.
## Manual embeddings / model selection
- Can use any embedding provider/model (OpenAI, Voyage, Cohere, Google, local open-source, multimodal). Store resulting vector in document field. Automated Embedding specifically supports the Voyage models listed above; manual embeddings support broader providers.
- Choose model by modality/domain, dimensions, cost, context length, quality. Index `numDimensions` must match model output. Query with same model (or compatible for autoEmbed).
- Common pipeline for RAG: chunk documents, embed chunks, store `{text, metadata, embedding}`, vector index embedding and metadata filters, retrieve top-k, pass context to LLM, cite sources. Good chunking improves retrieval; tune chunk size/overlap per corpus.
## Hybrid search
Hybrid search combines vector and lexical/full-text search. Current recommended fusion stages:
- `$rankFusion` (MongoDB 8.0+) reciprocal rank fusion (RRF) combines ranked lists.
- `$scoreFusion` (MongoDB 8.2+) combines normalized scores.
Limitations: sub-pipelines only `$search`, `$vectorSearch`, `$match`, `$sort`, `$geoNear`; same collection only; sub-pipelines run serially; no pagination; cannot use `$project` or storedSource fields in fusion because traceable link to source doc required. `$rankFusion` on views only MongoDB 8.0+.
Considerations: tune weights per query; increase per-subpipeline limits if disjoint result sets are undesirable; use `$unionWith` + `$vectorSearch` for cross-collection search; use `$search` `vectorSearch` operator for advanced analyzed prefilters.
## Native Reranking (`$rerank` stage)
`$rerank` reorders input documents using Voyage AI reranker cross-encoder models and returns them sorted by relevance to a query. **Preview feature** (not for production; API/docs may change). Added 2026-06-30. Unlike `$search`/`$vectorSearch`, `$rerank` can appear **anywhere** in the pipeline; MongoDB recommends placing it after a retrieval stage (`$vectorSearch`, `$search`, `$rankFusion`, `$scoreFusion`) that already returns sorted results. Docs: `https://www.mongodb.com/docs/vector-search/query/aggregation-stages/rerank.md`.
### Requirements
- MongoDB **8.3+** (Atlas cluster on Latest version with auto-upgrades).
- **Atlas-hosted only.** Not available on self-managed or Atlas Local deployments.
- Enable **Native Reranking** in Atlas Project Settings (off by default).
### Syntax
```json
{
"$rerank": {
"query": { "text": "<query-text>" },
"path": "<text-field-name or array of field names>",
"numDocsToRerank": 100,
"model": "rerank-2.5"
}
}
```
### Fields
- `query.text` (required, string): query text for reranking; set same/similar to preceding `$search`/`$vectorSearch` query. Can include instructions to guide relevance.
- `path` (required, string or array): field(s) whose content the reranker scores against the query. If `$rerank` is an intermediary stage, specify a field from prior stage results. **Fails if specified fields don't exist in an input document** โ use a preceding `$set` to set missing fields to `""` or `$match` to filter them out.
- `numDocsToRerank` (required, int): max documents to send to Voyage AI and return. **Max 1000.** Documents are the first N passed to the stage by pipeline document order.
- `model` (required): Voyage AI reranker. `rerank-2.5` (recommended, highest accuracy, 32k context, instruction-following, multilingual), `rerank-2.5-lite` (latency+quality, 32k), `rerank-2` (legacy, 16k), `rerank-2-lite` (legacy, 8k). See voyage_ai skill for model details/pricing.
### Behavior and scoring
- `$rerank` reranks and returns the first `numDocsToRerank` documents passed to the stage. If prior stages don't return deterministically sorted results, the documents selected may vary between queries.
- `$rerank` **replaces** `$meta: "score"` with a new Voyage relevance score. To preserve a prior stage's score (e.g. from `$rankFusion`), project it into a named field with `$addFields` before `$rerank`.
- Retrieve the rerank score: `{ "$addFields": { "rerankScore": { "$meta": "score" } } }`.
### Limitations
- Cannot use on **Views** (run `.aggregate()` on the source collection instead).
- Cannot use inside `$rankFusion` or `$scoreFusion` **input pipelines**.
- Not for self-managed or Atlas Local deployments.
- `$rerank` does **not** run Voyage models on Atlas cluster resources; it calls the Voyage AI service. Computationally expensive (joint query+document processing at query time) โ may be slower than index-powered `$search`/`$vectorSearch`. Best for workloads prioritizing retrieval quality over ultra-low latency (RAG, agentic AI).
## Quantization
Quantization shrinks vectors to fewer bits, reducing RAM and usually improving speed, at possible recall loss. Recommended for large vector sets (e.g., >100k).
- Automatic scalar quantization: index `quantization:"scalar"`; supports cosine/euclidean/dotProduct; max dims 8192; stores quantized vectors in memory and full-fidelity on disk; RAM about 1/3.75 (~75% reduction). Compatible with array double or BinData float32. ENN uses full-fidelity.
- Automatic binary quantization: `quantization:"binary"`; cosine/euclidean/dotProduct; max dims 8192; assumes midpoint 0, best for normalized embeddings; RAM about 1/24 (~97% reduction).
- Pre-quantized ingestion: store BSON BinData `int8` or `int1`; no index quantization flag required. `int8`: cosine/euclidean/dotProduct, max dims 8192. `int1`: euclidean only, dimensions multiple of 8. ANN and ENN supported.
- Quantized index Size metric in Atlas may look larger because it includes HNSW graph + quantized in-memory vectors + full-fidelity on-disk vectors; Required Memory reflects query-time memory.
- Providers/models with quantized output noted in docs: Voyage `voyage-3-large`, Cohere `embed-english-v3.0`, Nomic `nomic-embed-text-v1.5`, Jina `jina-embeddings-v2-base-en`, Mixedbread `mxbai-embed-large-v1`.
## Deployment/performance
- Vector Search holds search index in memory. Ensure memory for vectors + metadata + JVM. Without quantization, full-fidelity vectors in memory; with auto quantization, quantized in memory and full-fidelity on disk. Atlas UI Search page shows Size and Required Memory.
- Approx per-vector memory examples: 2048-dim float โ8KB, int8 โ2.14KB, int1 โ0.334KB; 1536 float โ6KB; 768 float โ3KB; 1024 float โ4KB.
- Testing/prototyping: Flex/free/M10/M20 ok; local Atlas deployment via CLI ok; expect resource contention on shared `mongod`/`mongot`.
- Production: dedicated Atlas cluster M10+ and separate Search Nodes for workload isolation; M10/M20 ok for dev/small prod, scale higher for large workloads. Search Nodes allow independent scaling and concurrent query execution; choose cloud/region where Search Nodes available. The S10 tier (added 2026-07-23) is the lower-cost dedicated-search entry tier below S20 for smaller M10/M20/M30 workloads; verify current tier pricing/specifications before sizing. Enable encryption at rest as needed.
- Search Node pricing snapshot: see `atlas_search/atlas_search_skill.md` Performance and deployment section for public AWS/GCP/Azure Search/Vector Search node base hourly pricing checked 2026-06-16. Pricing changes often; verify `https://www.mongodb.com/pricing` or Atlas calculator for quotes.
- Performance levers: Search Node sizing/memory, quantization, vector dimensionality, `numCandidates`, filters, `limit`, concurrency, sharding, storedSource, filesystem cache warmup. Monitor Search System Memory, Search Index Size, Search Page Faults, CPU bottlenecks.
- Benchmark docs: MongoDB publishes recall/latency analysis over public datasets varying dimensions, quantization, filters, search node config, BinData compression, concurrency, sharding. Use as directional only; benchmark own workload.
## Views and multi-tenancy
- Standard views with Vector Search supported in MongoDB 8.1+: create indexes on views via mongosh/driver and run `$vectorSearch` against views. `$vectorSearch` cannot be in view definition itself. Indexes on views can become `STALE`/`FAILED` if source/view changes; troubleshoot by checking dependencies/rebuilding.
- Multi-tenancy recommendations:
- Prefer one collection for all tenants with `tenantId` filter for many tenants/shared schema; index `tenantId` as filter; include tenant filter in every query.
- One collection/db per tenant can work for isolation but can create operational/index overhead.
- Many small tenants: consider preview flat indexes because HNSW overhead per tenant/filter can hurt. Larger tenants: HNSW indexes on tenant-specific views can improve performance. Large tenants may need dedicated collections/partitions/search nodes.
## Explain/troubleshooting
- `explain` supports queryPlanner/executionStats/allPlansExecution and vector-specific sections: collectors/allCollectorStats, metadata, query args/stats, resourceUsage, vectorTracing, luceneVectorSegmentStats. `explainOptions.traceDocumentIds` traces vector docs by `_id` with executionStats. Explain supports ANN/ENN and int8/int1 queries.
- Common issues:
- Cannot use `$vectorSearch`: cluster version too old, unsupported deployment, index not ready, stage not first, used in `$lookup` subpipeline/`$facet`/view definition.
- No results: wrong index name, path not indexed, dimensions/model mismatch, unsupported BinData subtype mismatch, filters on non-indexed filter fields or too restrictive.
- Slow queries: too high `numCandidates`/limit, insufficient memory/Search Node sizing, page faults/cold cache, CPU bottleneck, filters, no quantization, resource contention without Search Nodes.
- Unable to filter: field must be indexed as filter type and operator/type must be supported.
- LangChain filtering `Error during document retrieval`: usually filter field not indexed as filter or unsupported filter shape.
- Command not found creating indexes: client/server/driver too old or using wrong method for deployment.
## Recent changelog highlights
- 2026-07-23: S10 Dedicated Search Node tier introduced for Atlas Search and Vector Search. It is a lower-cost isolated-compute entry tier below S20, available on AWS, GCP, and Azure; target fit is M10/M20/M30 workloads that need Search Node isolation but do not justify S20. Check current pricing/region availability before quoting.
- 2026-08-12: Automated Embedding reached GA, adding editable index definitions, nested document-field compatibility, real-time token/request metrics, and automated backpressure controls. Supported Voyage models currently documented by Atlas do not yet list `voyage-code-4`; verify model availability before promising it for Automated Embedding.
- 2026-06-30: `$rankFusion` and `$scoreFusion` hybrid search reached GA; native `$rerank` remains preview (MongoDB 8.3+, Atlas-only, enable Native Reranking in Project Settings).
- 2026-06-30: MongoDB Search and Vector Search reached GA for both Community Edition and Enterprise Advanced self-managed deployments; `mongot` is SSPL. This does not make Atlas-only features such as `$rerank` self-managed.
- 2026-06-18: Vector Search over nested embeddings reached GA. Use `nestedRoot` in the vector index, nested vector `path`, `filter` for nested fields, `parentFilter` for root fields, and `nestedOptions.scoreMode:"max"|"avg"` to score parent documents.
- 2026-04-30 preview: `$vectorSearch` over arrays of embeddings and arrays of embedded docs containing vectors.
- 2026-04-27 preview: `storedSource` in Vector Search indexes + `returnStoredSource`.
- 2026-04-07 preview: `indexingMethod:"flat"` for multitenant workloads.
- 2025-11-24 preview: lexical prefilters via Atlas Search `vectorSearch` operator and `vector` index type.
- 2025-11-06: `$exists` in pre-filter. 2025-09-25: `$ne:null` in pre-filter.
- 2025-07-10: explain segment/per-segment stats. 2025-06-25: views support in MongoDB 8.1. 2025-06-10: HNSW graph params exposed. 2025-03-30: dimension limit 8192.
- 2024-12-02: scalar/binary quantization, int1 ingestion, ENN for int8/int1. 2024-09-18: BinData float32/int8. 2024-08-19: arrays/ObjectId/UUID/not filter improvements.
## Answering rules for agents
- When asked how to build: give minimal sequence: embed or autoEmbed -> create vectorSearch index -> run `$vectorSearch` first stage -> project score -> tune `numCandidates`/filters -> production Search Nodes.
- When asked exact syntax, include code snippets above and adapt field/index names.
- When asked performance/accuracy, discuss `numCandidates`, ENN recall baseline, quantization tradeoff, Search Node memory/CPU/page faults, filters, dimensions, storedSource, benchmarking.
- When asked about reranking: use `$rerank` stage (MongoDB 8.3+, Atlas-only, **preview**, enable Native Reranking in Project Settings) after `$vectorSearch`/`$search`; `numDocsToRerank` <= 1000; models `rerank-2.5`/`rerank-2.5-lite`; not for self-managed/local/Views; `$rerank` replaces `$meta:"score"` so save prior scores with `$addFields` if needed.
- When asked Atlas vs self-managed: Atlas simplest; self-managed/local supported but on-prem MongoDB Search features unavailable: Backup/Restore, FCIS, Query Tracking, Encryption (manual backup/BYOK possible); `mongot` TLS limitations include fixed cipher suites, no FIPS mode, no hostname validation for gRPC listen server.