Good catch, and honestly you're right that I only check dimension right now, not model identity. Didn't think about the case where two different models spit out the same dim but totally different vector spaces — that's a real hole, not just a theoretical one since I'm already juggling Ollama locally vs HuggingFace in prod.
Storing model name + revision alongside each row makes sense. Only thing I'd add on my end is I'd probably also need a one-time re-embed job for anything already in the table before I flip a hard check on, otherwise I lock myself out of my own data.
Appreciate you actually reading closely enough to catch this, going to go fix it.
Ahmet Özel
AI Engineer. Computer Vision, RAG and LLM agents.
The 768-versus-384 dimension guard is useful, but model identity needs to be first-class metadata too. Two embedding models can produce vectors with the same dimension and still occupy incompatible spaces, so a dimension check alone can silently pass bad comparisons. I would store model name, revision, and normalization settings with every row, then partition or migrate the index whenever that fingerprint changes.