Week 6 · Enterprise AI

Right answer, wrong reader

0:00 / 3:00

15 seconds

The citation was forbidden.

Retrieval pulled an HR-only discipline memo into a ward nurse's answer. The text was "correct" — and a breach.

User ACLAllowed docsFilterBefore searchRetrieveOnly allowed
Lesson notesRight answer, wrong reader: the short version+

Week 6 · RAG and evals · about 3 minutes

What you will be able to do

Filter Helix documents by permission before retrieval so a nurse never sees an admin-only policy in the context.

The idea

Post-filtering after retrieval is too late: forbidden text can still enter the prompt, logs, or citations briefly.

Apply the ACL as a retrieval filter (or search a per-user index view) so unauthorized chunks never enter the context window.

def retrieve(question: str, user) -> list:
    return search(question, filter={"acl": {"$contains": user.role}})

If it should not be read, it must not be retrieved.

Key takeaways

  • Permissions filter the search set.
  • Never put forbidden chunks in the prompt.
  • Prompt instructions are not an ACL.

Part of the Forward Deployed Engineer roadmap. New to the role? Start with what a Forward Deployed Engineer does.