Vector Collections and Fixed Dimensions: 3 Node.js Deduplication Invariants A developer outlined three invariants for Node.js vector collections used in media deduplication: every record in a collection must share one embedding model, one fixed dimension, and one declared chunking policy. The writeup argues that equal vector length is necessary but insufficient, since two models can both emit 768 numbers with different learned meanings per coordinate, and recommends creating a new collection and reindexing when the embedding model changes rather than inserting new-model vectors into the old collection. It includes a runtime guard that rejects dimension, model, and chunking mismatches before indexing. TL;DR: Treat a vector collection as an embedding-space contract: every record uses one model, one fixed dimension, and one declared chunking policy. For media deduplication, create a new collection and reindex when the embedding model changes. Do not put a new model's vector into the old collection merely because both arrays have the same length. A collection is a set of same-shaped vectors plus their metadata. Fixed dimension is not a capacity knob. It is a property of the embedding model, and similarity is meaningful only among vectors produced within the same model's embedding space. That gives us an operational rule too: reject contract mismatches before indexing, then monitor freshness while a replacement collection fills. Shape first. A similarity function compares coordinates position by position. If one vector has 768 coordinates and another has 1,536, there is no complete coordinate pairing. A collection fixes the shape so every stored vector can participate in the same comparison. Equal length is necessary, but insufficient. Two models can both emit 768 numbers while assigning different learned meanings to coordinate 217. Their outputs produce a numeric score, but that score does not establish useful semantic similarity. The arrays share a shape, not a semantic coordinate system. Picture the system as a short pipeline. Before: article text enters model A, which emits a dimension-D vector; the collection compares it only with model-A vectors. After a model change: the text enters model B, lands in a new collection, and is compared only with model-B vectors. Traffic moves after the required corpus has been reindexed. Dimension describes shape, not room. A 1,536-dimensional collection does not hold twice as many articles as a 768-dimensional collection. Record count and dimension answer different questions. Suppose a publisher receives two versions of a wire story. Metadata such as storyId , desk , and publishedAt filters candidates; the vector represents the text used for semantic near-duplicate detection. Chunking belongs in the contract. Embedding a headline plus the first 400 words is a different policy from embedding every 400-word chunk, even if both use the same model and dimension. This runtime guard catches the category error early: js const apiKey = process.env.INFRAI API KEY; const baseUrl = process.env.INFRAI BASE URL; if apiKey || baseUrl { throw new Error "Set INFRAI API KEY and INFRAI BASE URL" ; } async function getDiscovery attempt = 0 : Promise