Vector search returns semantically unrelated high-similarity passages after incremental index update
Environment
Self-hosted vector index (open-source vector DB v0.9) with 1.4M documents, embeddings produced by local sentence-transformer model v1.2. Incremental index updates performed nightly using a Python ETL that upserts new embeddings and periodically re-serializes index segments.
Symptoms
After a recent incremental index update, RAG system returns passages with very high vector similarity (reported similarity scores near recent top threshold) that are nonetheless semantically unrelated to the query; users see confidently wrong context inserted into answers. Prior nightly full rebuilds did not exhibit the issue.
Observations
Reproduced locally: same query before update returned correct top-k; after incremental update, top-k includes unrelated documents that have very similar embedding vectors (near-duplicates by cosine). Inspection of affected vectors shows multiple documents sharing identical or near-identical embedding vectors after upsert. ETL logs show occasional retry/partial-write events during overnight job. No hardware errors reported. Incremental indexing uses append-only segment files and a merge job.
Already attempted
Validated embedding generation pipeline separately — embedding model run over suspect documents produced distinct vectors locally. Re-ran upsert for a subset of documents and observed their stored vectors in DB did not match freshly computed vectors (stored vectors appear duplicated across many docIDs). Performed a full rebuild in a test cluster and the issue disappeared.
Question
What are the probable root causes that lead to stored vectors becoming duplicated or mismatched during incremental upserts, and what safe remediation and prevention steps should be taken for production RAG systems?
Verified community troubleshooting
No answers yet..