Glad you solved it. For other people reading this thread in the future: you can have an array of any size in MongoDB (although is not good practice to have unbounded arrays, or very large ones). As a vector is an array, in theory it can have any size, but the vector index used only supports 2048 dimensions max as you can read in the docs.
Thanks for posting your question and your own solution!
@Daniel_Marco and @Nice_Guy thank you both for your questions, and apologies for not addressing this sooner. I’m Henry, one of the product managers supporting Atlas Vector Search, and I should be able to highlight forthcoming updates to this limit.
We hope to update our dimension limit from 2048 to 4096 within the next few weeks. We’ve seen increased demand for this recently with the high performance of Mistral-derivative embedding models (4096 dims) and OpenAI’s new text-embedding-3-large model (3072 dims by default), and are moving quickly to make this change and kick the tires on our indexing system to make sure there are no surprises at this increased scale of vector comparisons.
I will respond here when this update has landed, and hope that this context is helpful in the meantime.
Thank you all for your patience. The vector dimension limit has now been increased to 4096. This will apply to all new clusters, and all clusters without maintenance windows. Those with maintenance windows will have this update applied during their next scheduled window. The updates to our docs are in progress, but this functionality is available now.
One additional caveat worth noting when working with the text-embedding-3-large model is that we only support vector comparisons between query and indexed vectors of the same dimension, so be sure to set these properly if you choose to modify the default dimensionality.