← All questions
Security & SafetyVery Hard· document clearance· hard filters vs scoring· recall impact· policy separation

Legal requires that answers cite only documents the use...

Begin by decomposing the policy space: the legal clearance requirement is a non‑negotiable security constraint, whereas the search team’s preference for higher recall is a relevance optimization. Hard filters applied to sparsely populated metadata fields can unintentionally eliminate eligible documents, creating a recall bug. Therefore, retain clearance filters as immutable hard constraints that must be evaluated before any ranking occurs. The remaining, non‑essential filters—those intended to improve relevance—can be safely migrated into the scoring function, where they influence ranking without discarding documents outright. This split satisfies the legal mandate while addressing the team’s concern about recall.

Code playground (Python)