LearnQuestion bank

How do you keep the index fresh and honour deletions — for example a UK GDPR erasure request — across the vector store, caches and logs?

Applied LLMTechnicalMedium

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Incremental ingestion: idempotent upserts by document ID and chunk hash; deletes/tombstones fan out to dense, lexical and caches
  • Embedding upgrades: parallel index, backfill, compare, cut over with rollback
  • Erasure: data map of raw store, chunks, embeddings, caches, logs, eval sets and training data; delete or anonymize, document retention exceptions, verify
  • Monitors staleness and surfaces document dates/freshness in answers
  • Honest limits: avoid raw PII in logs; backups and training data may need retention or retraining

In full

I would treat freshness and erasure as one pipeline, not a one-off job: source events drive incremental ingestion, with idempotent upserts keyed by document ID and chunk hash so retries and replays are safe, and deletes or tombstones propagate to the dense vector index, lexical index, caches and derived stores. For embedding-model upgrades I would build a parallel index, backfill in batches, compare quality and latency, then cut over with a rollback path rather than mutating the live index in place. For a UK GDPR erasure request I would start from a data map of every copy of the person or document—raw store, chunks, embeddings, caches, logs, eval sets and any training data—then delete or anonymize where lawful, keep only documented retention or legal-hold exceptions, and verify by re-querying indexes, caches and logs plus reconciliation counts and sampling. I would monitor index staleness such as source-to-index lag, failed or backlogged jobs and stale-document rates, and surface document dates and freshness in answers so users can see when evidence is old. I would also avoid logging raw personal data, preferring IDs and hashes, and be explicit that logs, backups and training data may have retention or retraining constraints rather than pretending instant deletion is always possible.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Incremental ingestion with idempotent upserts keyed by document ID and chunk hash; deletes propagate to dense index, lexical index and caches
  • Embedding-model upgrades via a parallel index, backfill and cut-over
  • Erasure: a data map of every copy (raw store, chunks, embeddings, caches, logs, eval sets, training data), retention policies and verification
  • Monitors index staleness; surfaces document dates in answers

Common mistakes

  • Forgetting that embeddings and cached answers are personal data too
  • nightly full re-index as the only plan at scale