/** * Score Spectrum — metacognition over a result set. * * Computes spread/mean/confidence and surfaces flags that let callers know * when the retrieval itself is unsure. "I know that I don't know" is more * useful than ten weak results pretending to be answers. */ import type { SpectrumFlags } from "../types.js"; export interface ScoreSpectrumConfig { enabled: boolean; lowConfidenceThreshold: number; definitiveTopScore: number; definitiveGap: number; } /** * Analyze the distribution of scores in a result set. * Pure function — no side effects, no mutations. * * IMP-12: the three flags are made *mutually exclusive* and prioritized: * 1. definitiveMatch — a clear winner exists (top high, second far below) * 2. noStrongMatch — nothing crosses the relevance threshold * 3. lowConfidence — results exist but the distribution is flat * * A single result with `top >= definitiveTopScore` is treated as definitive, * not as low-confidence (spread=0 was previously firing lowConfidence even * for a perfect single hit). */ export declare function analyzeSpectrum(scores: number[], thresholdForNoMatch: number, config: ScoreSpectrumConfig): SpectrumFlags; //# sourceMappingURL=score-spectrum.d.ts.map