BuildWithHQ
Canonical knowledge unit · ai

Permission-aware RAG

BuildWithHQ resolves the caller’s allowed data envelope before semantic retrieval returns context to the model; prompt text is not treated as the security boundary.

ID: BWHQ-AI-002Status: currentAuthority: highestragsecurityretrievalpermissions

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.

Machine-readable source: canonical Markdown. This HTML companion exists for human reading, search indexing, and AI retrieval.