Dense vector index returns stale document IDs and wrong passages after incremental update job — RAG answers become semantically irrelevant
Environment
Self-hosted vector DB (FAISS on disk with custom metadata mapping layer) behind a microservice written in Python 3.10; nightly incremental indexer runs: re-embed changed documents and upsert to FAISS; embedding model is served via local transformer container; RAG pipeline uses top-10 nearest neighbors with cosine similarity and a re-ranking step.
Symptoms
After last incremental update, user queries return passages that are high-similarity but clearly unrelated to the query; some returned passages correspond to old document versions that were deleted weeks ago. The issue is intermittent: some queries return correct results for a few minutes after reindex, then degrade.
Observations
Indexer logs show upsert operations completed without error; store mapping file (doc_id -> vector_offset) timestamps updated; search returns vectors with very high cosine similarity scores but metadata lookup yields different document text than expected for that vector offset; inspection of FAISS index file shows size unchanged and mtime older than mapping file; reloading the index into process memory causes immediate changes in returned results (sometimes more correct); embedding service logs show occasional timeouts during index job but overall success.
Already attempted
Restarted vector DB service and reloaded index into memory; re-ran incremental indexer with force-upsert and verified no errors; ran a full reindex to a new index file (takes hours) which restored correct search results; implemented a stop-the-world pause for query traffic during incremental run as a temporary mitigation.
Question
Why does the incremental update leave stale/incorrect mappings between vectors and metadata, returning unrelated high-similarity passages, and how can I safely run incremental updates without full reindexing?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Artificial Intelligence43% match
Vector search returns semantically unrelated high-similarity passages after incremental index update
Open0 answers - Artificial Intelligence41% match
Incremental vector index job leaves stale vectors and duplicate document IDs — RAG answers cite deleted passages
Open0 answers - Artificial Intelligence30% match
RAG assistant returns high-similarity but irrelevant passages from vector DB on production queries
Open0 answers