BSON BinData vector ingestion
Parent: Atlas Cluster Topology and Tier Economics · Published reference · snapshot 2026-10-20 · skill ranked-5130ee0b
↓ Facts as markdownall context files
Source-anchored research for BSON BinData vector ingestion. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Definitions
- BSON Binary subtype 9 is a typed vector envelope: it uses a dtype byte and a padding byte before the packed element data, stores values in little-endian form, and defines FLOAT32 (0x27), INT8 (0x03), and PACKED_BIT (0x10) dtypes. Drivers expose explicit vector encode and decode helpers, such as PyMongo's Binary.from_vector() and Binary.as_vector(). (high confidence) [source]
Measurements and reference values
- MongoDB documents about three times less cluster disk space for BinData vectors than standard float32 arrays. Pre-quantized int8 and int1 representations reduce mongot vector RAM by about 3.75x and 24x respectively; the HNSW graph itself does not shrink, so disk and index-memory savings must be estimated separately. (medium confidence) (verified as of 2026-10-20) [source]
Problems, failure modes and limitations
- A vector query must use the same embedding model as the indexed data and its length must match numDimensions. A full-fidelity query vector can match BinData(float32) data; using a mismatched subtype with int8 or int1 data can return no results without an error. (high confidence) (verified as of 2026-10-14) [source]
Facts and statements
- MongoDB Vector Search accepts BSON BinData vector subtypes float32, int8, and int1 in vector index fields. The documented numDimensions range is 1–8192 for int8, a multiple of 8 for int1, and no more than 8192 overall. (high confidence) (verified as of 2026-10-14) [source]
- The client must convert pre-quantized embeddings to BSON BinData subtype 9 before inserting them, using a driver that supports vector encoding. The current MongoDB guide lists minimum supported driver versions, and PyMongo added Binary.from_vector() and Binary.as_vector() in version 4.10. (high confidence) (verified as of 2026-10-14) [source]
- Quantization can trade retrieval precision for lower memory and faster comparisons. MongoDB's benchmark says binary quantization can materially reduce search precision and that rescoring candidates from full-fidelity vectors adds latency, so resource ratios do not guarantee equal quality or lower end-to-end latency for every embedding model and workload. (medium confidence) [source]
- Embedding APIs can return quantized outputs, but those outputs are not automatically BSON vector values. Voyage AI and Cohere document int8 and binary-family output choices, while BSON subtype 9 requires its own dtype and padding metadata; convert the provider output using a compatible driver and verify the exact binary representation. (high confidence) (verified as of 2026-10-20) [source]
- PyMongo 4.10 introduced provisional subtype 9 support, and PyMongo 4.10.1 fixed a subtype 9 bug on big-endian systems. Early PyMongo 4.10.0 deployments on big-endian hosts therefore needed the 4.10.1 fix for portable vector serialization. (high confidence) [source]
- MongoDB Vector Search supports pre-quantized BinData vectors with float32, int8, or int1 types. The documented maximum dimensionality is 8192 for int8, while int1 dimensions must be a multiple of 8; int1 supports euclidean similarity, and int8 supports cosine, euclidean, or dotProduct. (high confidence) (verified as of 2026-10-14) [source]
- The current MongoDB guide lists driver minimums for BinData vector ingestion: C++ 4.1.0, C#/.NET 3.2.0, Go 2.1.0, PyMongo 4.10, Node.js 6.11, Java 5.3.1, and Ruby bson gem 5.1. (high confidence) (verified as of 2026-10-14) [source]
- The PyMongo Binary API provides from_vector(vector, dtype, padding=0), and the Node.js BSON Binary API provides fromFloat32Array, fromInt8Array, and fromPackedBits constructors for subtype-9 vectors. (high confidence) (verified as of 2026-10-20) [source]
- Voyage AI and Cohere embedding APIs expose selectable output formats that include float and quantized integer or packed-binary forms, with supported formats depending on the model. (high confidence) (verified as of 2026-10-20) [source]
- Do not write provider binary or ubinary output bytes as a subtype-9 value without conversion: subtype 9 requires dtype and padding metadata before the packed elements. Validate the provider's bit order and padding against PACKED_BIT requirements before ingestion. (medium confidence) (verified as of 2026-10-20) [source]
- MongoDB documentation estimates that BinData vectors use about three times less disk space than standard float32 arrays; the vector-search HNSW graph remains separate and is not compressed by vector quantization. (high confidence) (verified as of 2026-10-14) [source]
Children
- No children recorded.