All Questions
Vector Search hard

Documents and their ACLs live in PostgreSQL. In the same request, the application writes to Postgres and then to the vector index. After a deploy bug, some index writes failed silently, and documents deleted for a privacy request kept appearing in RAG answers for days. Which design prevents this class of failure?

  1. A Make the vector database the system of record for documents and ACLs, eliminating the second write entirely.
  2. B Wrap the Postgres write and the vector upsert in a two-phase commit so both stores commit or roll back together.
  3. C Drive index updates from Postgres through CDC or an outbox with idempotent deletes, and reconcile periodically.
  4. D Give every vector a short TTL so stale or deleted entries expire and get re-indexed from the source if still live.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions