Hybrid search retrieves candidates independently with lexical and vector methods, then combines their ranks. Reciprocal Rank Fusion (RRF) adds 1 / (k + rank) for each list, avoiding direct comparison of incompatible raw scores. Both branches must apply identical authorization and lifecycle policy before fusion, followed by deduplication and measured ranking evaluation.
For result d, RRF(d) = Σ 1 / (k + rank_i(d)). The constant k reduces the dominance of the first few ranks. k = 60 is a common starting value, not a universal optimum. Candidate depth and optional branch weights also matter.
In a normalized schema, join to documents and permissions identically in both branches. Do not retrieve broadly and filter unauthorized rows after fusion.
Limit chunks per document, collapse near duplicates, or use a diversity reranker after fusion. Preserve why each candidate appeared—lexical, semantic, or both—so debugging is possible.
Evaluate lexical, semantic, and hybrid with the same labels and filters. Slice exact-ID, paraphrase, multilingual, and mixed-intent queries. Sweep candidate depth, RRF constant, and branch weights on development data, then report held-out metrics and latency.
Review this hybrid search SQL and evaluation [paste]. Verify identical policy predicates, deterministic ranks, metric/operator correctness, fusion math, duplicate handling, candidate depth, and observability. Propose a development-grid and held-out test.
Verification contract: Hybrid must beat or deliberately trade against both single branches on defined query slices, not merely on one aggregate.