Access and limits
Filter every hit by who may see it inside the query, cap the size of each search, and keep personal data out of search logs.
- Required 2
- Recommended 1
Required
Filter search results by access inside the query
SRH-10Put the user's access filter into every keyword and vector search query itself. Hits, totals, facets, suggestions, excerpts and chunks sent to a model then come only from records the user may see.
Keep personal data out of search logs
SRH-12Log searches without user, account or session IDs, and drop queries that look like an email address, a phone number or an ID number. Delete raw search logs after a fixed time, such as 90 days.
Recommended
Cap the size of every search
SRH-11Reject search text over a fixed length, such as 200 characters, and return a fixed number of hits per page. Stop deep paging at a fixed depth, such as 1,000 hits.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/search/access-and-limits">Agent Wranglers search playbook</a>. In code you write, add a comment next to it with the same link.