/** * L3 — Reciprocal Rank Fusion. Merges N ranked `RetrieveHit` lists into * one, scoring each id by Σ 1/(k + rank) across the lists it appears in. Pure, * deterministic, no I/O — which is why it serves BOTH hybrid lexical⊕semantic * fusion AND klum-db's cross-vault federation (the lists are per-vault). The * fused `score` is the RRF score, NOT BM25 or cosine. */ import type { RetrieveHit } from './retrieve-types.js'; export interface FuseOptions { /** Only 'rrf' in v1 (default). */ readonly strategy?: 'rrf'; /** RRF constant; larger flattens the rank weighting. Default 60. */ readonly k?: number; /** Truncate the fused output to this many hits. */ readonly limit?: number; } /** * Callers must supply hits with `rank >= 1` (the retrieve contract guarantees * it; a federation caller passing `rank: 0` with `k: 0` would divide by zero). * Doc-only note — no runtime guard; rank ≥ 1 is the retrieve contract. */ export declare function fuseRetrieval(lists: ReadonlyArray>>, opts?: FuseOptions): RetrieveHit[];