Retrieval Scope for Superintelligence: Which Documents Each Role Sees
Scope retrieval so each agent role searches only the documents its job needs. Deny by default, filter by role, and test for leaks before a stronger model runs.

To give an AI agent access to only the documents its role needs, set the retrieval scope before the model receives a question: each role gets a named set of permitted sources, the retrieval layer enforces that set on every search, and the agent searches with the permissions of the person or workflow it acts for. A more capable model does not change this rule. It makes an unscoped retrieval layer more hazardous, because it reads, combines and rephrases what it finds more fluently and more persuasively.
Key takeaways
- Enforce scope in the retrieval layer. Instructions in the system prompt are not an access control.
- Define one document set per agent role, tied to a specific job, and deny everything outside it by default.
- When an agent answers on behalf of a person, search with that person's permissions, not with a broad service account.
- Record which documents were retrieved for each answer, so a wrong result can be traced to a source and a rule.
- Test each role with the questions a wrong role would ask before anyone depends on the agent.
Why a stronger model makes unscoped retrieval riskier
A retrieval step returns text, and the model treats whatever arrives in its context as material it may use. A stronger model is better at linking fragments across sources, inferring from partial evidence and answering follow-up questions that circle around a restricted topic. If a sales assistant can search the same index as the finance folder, the question is no longer whether the model intends to reveal a commission schedule. The question is whether the search returned it at all.
There is a second reason to scope tightly. Documents can carry text written to steer an agent, such as an instruction hidden in a supplier email that asks the assistant to fetch other files. The OWASP guidance on prompt injection prevention treats this as a design problem, not a wording problem. A narrow scope limits what a manipulated agent can reach, even when the manipulation partly succeeds. Context limits matter here too, which is why Context Budgets for AI Agents is worth reading alongside this topic.
Map each role to the documents its job needs
Start from the job, not from the folder structure. For each agent role, write down the decisions it makes, the questions it answers and the actions it can take. Then list the documents that answer those questions, and separately list the documents that are merely nearby but not needed. The second list is often longer than people expect, and it is where leaks usually begin.
Illustrative scenario: a regional heating and cooling company, with no real client involved, wants two agents. A scheduling agent needs the service catalog, technician availability rules and the service area map. It does not need supplier cost sheets, margin notes or the internal dispute log. A billing review agent needs invoice templates, published payment terms and approval thresholds, but it does not need technician field notes that contain customer access details or health information. Both agents can be useful without seeing each other's sources.
A step-by-step plan for scoping retrieval
The work is mostly documentation and discipline, and it can be done in the order below before any agent goes live.
- List every agent role and the single job each one performs in a normal week.
- For each job, write the questions the agent must answer and the actions it may take.
- Inventory the document sets that answer those questions, with a named owner and a current version for each.
- Tag every document with its owner, sensitivity level, eligible roles and effective version before it is indexed.
- Apply a deny-by-default rule: a role searches only the sets explicitly granted to it.
- Move high-sensitivity material into a separate index or store, rather than relying on a prompt instruction in a shared one.
- Decide which roles may see summaries of restricted material, and write that rule down.
- Test each role with in-scope questions, out-of-scope questions and indirect requests before going live.
- Review grants on a fixed schedule and whenever a role changes its job.
Enforce the scope in the retrieval layer, not in the prompt
The enforcement point matters more than the wording. A filter applied when the query runs, using the role and the requester's permissions, means excluded documents never reach the model. A rule that asks the model to avoid a topic is weaker, because the model has already read the material and may paraphrase it. Redacting the answer afterward has the same weakness, since the content was in context and can surface in a different form.
Metadata makes enforcement practical. Each document needs a stable identifier, an owner, a role list, a sensitivity label and a version with an effective date. When the retrieval layer filters on those fields, the rules can be read by a reviewer, changed in one place and checked in logs. The OWASP authorization guidance describes the same principle in general software terms: check access on every request, and deny when a rule is missing. A deeper treatment of boundaries between teams is in Role-Based Access to AI Agent Memory.
Scope the tools as well as the index. The Model Context Protocol describes how tools and data sources are exposed to a model, and that is where you limit which operations an agent can call. A read-only search tool for one collection is easier to reason about than a general connector with broad rights.
When an agent answers a staff member or a customer, the search should run under that person's permissions wherever the source system allows it. A common failure is a single service account that can read everything, used for every conversation. Delegated access with scoped permissions, the pattern behind OAuth 2.0 scopes, keeps each request narrower than the agent's total reach. Where delegation is not possible, the agent's own identity should receive the smallest grant that still does its job. For separation between client records in particular, Client data isolation for AI agents gives a checklist.
Test the scope and log what was retrieved
A scope is only as good as its test. Build a question set for each role in three groups: questions the role should answer, questions it should refuse or route to a person, and indirect requests that reach for restricted content through a summary, a comparison or a hypothetical. Check the document identifiers returned by retrieval, not only the final text. A correct-sounding answer can still have been built from a document the role should never have searched. A general method for checking retrieval results is in How to test retrieval quality in an AI knowledge base.
Logging makes the scope operational rather than theoretical. For each answer, record the role, the requester, the query, the document identifiers returned and the version used. Observability concepts such as those in the OpenTelemetry primer describe tracing a request through its steps, and retrieval is one of those steps that deserves its own record. When a document is reclassified or a model is changed, run the question set again before the change reaches users.
How Be Human handles retrieval scope in managed operations
Be Human designs this boundary as part of the first engagement. The first role is defined with its memory and tools, the document sets it may search, the approvals it needs before taking an action, and the observable success criterion it will be measured against. In managed operations, the same boundaries are maintained: permissions are reviewed as roles and sources change, retrieval is evaluated on a recurring schedule using question sets like the ones above, integrations are kept working, and incidents are handled when a result shows material it should not have reached. When a model upgrade is planned, the scope tests run before the change is accepted, and every grant stays documented so the business owner can see what each agent may search and why.
Take the free Be Human AI diagnostic to find the first task worth handing to an agent.
Frequently asked questions
Can a more capable model be trusted to skip documents it should not use? No. The model decides what to say from what it receives, so access control has to happen before the documents reach it. A prompt instruction can shape the wording of an answer, but it does not replace a filter applied at retrieval time.
Should every agent role have its own index? Not always. Many teams use one index with role metadata and enforced filters, which works when the rules are clear and every search is logged. Separate stores make more sense for the most sensitive material, where a mistaken filter would be costly enough to justify the extra maintenance.
How do we know the scope is actually working? Run a question set for each role that includes questions the role should not be able to answer, and check the document identifiers the retrieval step returned rather than only the final text. Repeat the tests after changes to documents, roles or models, and review logs for sources that no grant explains.
Who should own the map of roles to documents? A named business owner should approve which sources each role may use, and the operator should maintain the filters, the tests and the logs. Writing down that ownership matters, because a change in someone's job duties should trigger a review of the agent's grants before the agent keeps its old access.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


