Permission-aware RAG
Core rule
Do not retrieve broadly and attempt to remove forbidden content after retrieval. Determine what the caller is allowed to use as AI context first, then search within that boundary.
Scope carried into retrieval
The retrieval layer can include application, AppAccount/tenant, record, module, location, and security-scope information. Allowed records/modules/locations can be resolved before context is assembled.
AI-specific permission
Human read permission does not have to imply permission for AI processing. Enterprises can permit a person to view a record while excluding that record from AI context.
Citation/provenance
SourceRecordId should remain connected to retrieved chunks so answers can point back to the permitted source business object.