Efficient Vector Database Management in Retrieval-Augmented Generation Systems: A Selective Embedding Update Approach
At a glance
| Problem | When one PDF changes, many RAG systems re-embed and re-index everything. That is slow, costly and can cause downtime. |
|---|---|
| Idea | Check if the file already exists. If it does, delete only its old vectors in one call and add the new ones in one bulk call. |
| Result | 84.9% faster updates, 99.6% fewer database calls, about 40% less memory, and the same answer quality. |
| Tested on | 50 PDFs of 5 to 150 pages, about 12,500 chunks |
| Tech | AWS S3, OpenSearch (kNN, HNSW), Bedrock Titan Embeddings, Claude 3 Haiku, Streamlit, Python |
| Published in | 2026 International Conference on Recent Advances in Electrical, Electronics, Ubiquitous Communication, and Computational Intelligence (RAEEUCCI) |
| Where & when | April 2026 · Chennai, India |
| Publisher | IEEE (2026) |
| DOI | 10.1109/RAEEUCCI67649.2026.11504894 |
How it works
- Upload PDFStreamlit UI
- Exists in S3?one HEAD request
- Delete old1 delete-by-query
- Extract + chunk1000 chars, 200 overlap
- EmbedTitan, 1536-dim, batched
- Bulk insert1 call to OpenSearch
Key points
- A quick S3 existence check (one HEAD request) decides: replace an old document or add a new one
- Old chunks are removed with a single delete-by-query instead of hundreds of deletes
- New chunks are embedded in batches and written with one bulk insert
- The rest of the index is never touched, so users can keep asking questions during an update
- S3 versioning keeps every old copy, so any update can be rolled back
Results
| Pages | Full re-index | Selective update |
|---|---|---|
| 10 | 45.2 s | 6.8 s |
| 50 | 203.7 s | 31.2 s |
| 100 | 412.5 s | 62.1 s |
| 150 | 625.8 s | 94.3 s |
| Operation | Before | After |
|---|---|---|
| Delete calls | 250 | 1 |
| Insert calls | 250 | 1 |
| Network requests | 500 | 2 |
| Method | Time | Faster than full re-index |
|---|---|---|
| Selective update (this paper) | 62.1 s | 84.9% |
| Hash-based incremental indexing | 98.4 s | 76.1% |
| Line-diff selective update | 156.7 s | 62.0% |
Architecture
More numbers and details
- Answer quality is unchanged: Recall@5 0.87 and Precision@5 0.82 before and after
- Average query time 1.24 s before, 1.22 s after
- With 75% of the document edited, hash-based indexing falls to a 31.2% gain; this method stays at 84.9%
- Memory use drops by 40-42% during updates
- Result is statistically strong: t(49) = 28.73, p < 0.001, 95% CI 83.7% to 86.1%
- Three tiers: Streamlit front end, Python processing layer, AWS storage and AI services
- Generative AI
- RAG
- Vector Databases
- AWS OpenSearch
- Amazon Bedrock
- Cloud Computing