import { a as SearchResult, F as FusedResult, S as ScoredChunk } from '../types-BP5OmxBy.js'; export { R as RankedResult } from '../types-BP5OmxBy.js'; /** * Reciprocal Rank Fusion (RRF) — merges multiple ranked result lists * into a single ranking using the formula: score = sum(1 / (k + rank)) * * This is a standard technique for combining results from different * search systems (e.g., vector search + BM25 full-text search). * * @param resultSets - Array of result sets, each with a label and ranked results * @param k - Smoothing constant (default: 60, as per the original RRF paper) * @returns Fused results sorted by combined score (highest first) */ declare function reciprocalRankFusion(resultSets: Array<{ label: string; results: SearchResult[]; }>, k?: number): FusedResult[]; /** * Deduplicate and merge overlapping chunks from the same file. * * When hybrid search + reranking returns multiple chunks from the same file * with overlapping line ranges, merge them into a single contiguous block * to avoid redundancy in the LLM context window. */ declare function deduplicateChunks(chunks: ScoredChunk[]): ScoredChunk[]; export { FusedResult, ScoredChunk, SearchResult, deduplicateChunks, reciprocalRankFusion };