Skip to interview prep
Apexed

79. An employee loses access to a document after it has been indexed for retrieval. How would you prevent later AI answers from exposing it?

HardSystem design

Technical
Show model answer

Carry source identity and access metadata through indexing, and enforce the requesting user's current permissions when retrieving content. Index-time access checks alone become stale when membership or document permissions change.

Handle revocation in cached passages and generated-answer caches as well as the search index. Test removal during an active session, shared links and cross-tenant requests; choose explicit invalidation and maximum staleness guarantees.

What interviewers listen for

  • Check current access at retrieval
  • Invalidate derived caches
  • Test revocation and tenant boundaries
An employee loses access to a document after it has been indexed for retrieval. How would you prevent later AI answers from exposing it — Software engineering i