All Questions
Rag And Retrieval hard

Your RAG index over a policy wiki is rebuilt nightly by re-embedding all 5M chunks. Legal reports that a retracted policy page was still being cited 20 hours after deletion, and the cost of the nightly job keeps growing. Which design best fixes both problems?

  1. A Run the full re-embedding job hourly instead of nightly. That shrinks the staleness window to an hour and keeps the pipeline simple and stateless.
  2. B Put a TTL of a few hours on every vector, so stale chunks expire automatically and are re-embedded the next time a query touches them.
  3. C Consume change events from the wiki and upsert or delete chunks by document ID and version, re-embedding only changed pages.
  4. D Keep the nightly rebuild but add a post-generation check that removes any citation whose source page returns a 404 at response time.

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

Get the app

Related questions