All Questions
Rag And Retrieval hard

After moving ACL enforcement into retrieval, you implement it by fetching the top 100 from an HNSW index and then dropping chunks the user cannot see. Users who can access only about 0.5% of the corpus often get zero results. What is the most robust fix?

  1. A Raise the fetch size to the top 2,000 before dropping unauthorized chunks, so restricted users still have enough survivors after the filter.
  2. B Apply the ACL predicate during the ANN search itself (filtered traversal or pre-filter), and partition by tenant for highly selective users.
  3. C Skip filtering for low-privilege users and instead instruct the model, in the system prompt, to ignore any chunks outside their permissions.
  4. D Rebuild HNSW with higher efConstruction and M values, so the graph's improved connectivity surfaces more authorized chunks in the top 100.

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

Get the app

Related questions