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.