The Embedding Model Is a Contract
Index and query must agree
A vector's dimension is simply how many numbers it contains - how many coordinates are on that "meaning map." The specific embedding model this platform uses, all-MiniLM-L6-v2, always produces vectors with exactly 384 values, no matter what text you feed it. A stored collection of many such vectors is called an index or collection. Here's the critical rule that makes all of this work reliably: every vector inside one collection, and every query vector you compare against it, must have come from the same embedding model.
This matters more subtly than it might first appear. A query vector with 768 values obviously can't even be compared against a collection of 384-value vectors - the math simply doesn't work, and most tools will throw an error immediately, which is at least easy to notice. Far more dangerous is a different embedding model that happens to also produce 384 values: the comparison will run without any error at all, because the dimensions match, but the two models learned completely different "maps" of meaning. The resulting similarity scores are essentially meaningless noise dressed up as a real number.
The practical fix is discipline: store the embedding model's exact name, its exact revision (models do get updated), whether vectors were normalized (rescaled to a consistent length before comparison), and the dimension, all stored right alongside the collection itself - not just remembered informally by whoever built it. If any one of those four things ever changes, the only safe response is to deliberately re-index: rebuild every stored vector in the collection from scratch under the new, consistent embedding contract.
Warning: Never try to paper over a dimension mismatch by padding a shorter vector with zeros, truncating a longer one, or reshaping the numbers to force them to line up. None of those tricks make the underlying "maps" compatible - they just produce syntactically valid-looking numbers that are semantically garbage, which is often worse than an obvious crash because it fails silently.