liveBook · Manning

Filtering

As explained in Authorization in Action

A retrieval filter is a constraint applied to search or retrieval operations to limit returned resources to those satisfying specified conditions.

A retrieval filter limits search results to resources that satisfy authorization constraints before content reaches the language model. In a multi-tenant system, it can restrict retrieval to chunks associated with the requesting user's tenant. section 17.4.3

Two authorization patterns can constrain retrieval:

  • Translate a policy residual from Cedar typed partial evaluation into a query filter applied to chunk metadata such as tenant, ownership, or classification. section 17.4.3
  • Retrieve a bounded candidate set with identifiers and relevance scores, authorize the candidates in one batch, and fetch only permitted resources. section 17.4.3
Figure 17.4 Authorization before retrieval in RAG systems. Authorization constrains retrieval rather than generated output. By enforcing access before data is retrieved, the system ensures that the language model operates only on authorized inputs, making information leakage structurally impossible rather than merely discouraged.

Shows authorization placed before retrieval, so the language model operates only on authorized inputs rather than relying on output-time safeguards. section 17.4.3

How Authorization in Action covers it

How deep it goes
Explains metadata filters and candidate authorization, while leaving database-specific query syntax and implementation details unspecified.
Examples
Uses tenant-scoped chunks and bounded top-10-or-50 candidate sets as concrete retrieval examples.
What you can do after
Apply it via Cedar typed partial evaluation or batch authorization to prevent unauthorized resources entering retrieval.
How it connects
Connects authorization, policy evaluation, partial evaluation, vector databases, metadata, and retrieval.

Also explained in

Compare how 33 books explain filtering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Authorization in Action. The section links point to the parts of the book it draws on.