Efficient Vector Database Management in Retrieval-Augmented Generation Systems: A Selective Embedding Update Approach

At a glance

ProblemWhen one PDF changes, many RAG systems re-embed and re-index everything. That is slow, costly and can cause downtime.
IdeaCheck 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.
Result84.9% faster updates, 99.6% fewer database calls, about 40% less memory, and the same answer quality.
Tested on50 PDFs of 5 to 150 pages, about 12,500 chunks
TechAWS S3, OpenSearch (kNN, HNSW), Bedrock Titan Embeddings, Claude 3 Haiku, Streamlit, Python
Published in2026 International Conference on Recent Advances in Electrical, Electronics, Ubiquitous Communication, and Computational Intelligence (RAEEUCCI)
Where & whenApril 2026 · Chennai, India
PublisherIEEE (2026)
DOI10.1109/RAEEUCCI67649.2026.11504894

How it works

  1. Upload PDF
    Streamlit UI
  2. Exists in S3?
    one HEAD request
  3. Delete old
    1 delete-by-query
  4. Extract + chunk
    1000 chars, 200 overlap
  5. Embed
    Titan, 1536-dim, batched
  6. Bulk insert
    1 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

Time to update one document
PagesFull re-indexSelective update
1045.2 s6.8 s
50203.7 s31.2 s
100412.5 s62.1 s
150625.8 s94.3 s
Database work per update (250-chunk document)
OperationBeforeAfter
Delete calls2501
Insert calls2501
Network requests5002
Against other update methods (100 pages, 5% edited)
MethodTimeFaster than full re-index
Selective update (this paper)62.1 s84.9%
Hash-based incremental indexing98.4 s76.1%
Line-diff selective update156.7 s62.0%

Architecture

Architecture diagram: Efficient Vector Database Management in Retrieval-Augmented Generation Systems: A Selective Embedding Update Approach
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
All publications