/** * Minimal vector math for concept-search mode. Stdlib only. * * `cosine(a, b)` returns a similarity in [-1, 1] (higher = more similar). * `rank` returns descending by score and stable by input order on ties. * * Length mismatch is a HARD ERROR, not a silent 0: two vectors with * different dimensions can only come from mixed embed models (e.g. silent * `:latest` drift, or a custom-named local model that changed dimensions * under the same alias). A 0 return would silently return zero hits * instead of surfacing the drift. */ export declare function cosine(a: number[], b: number[]): number; export interface RankedCandidate { item: T; score: number; /** Input-order index for stable sorting. */ originalIndex: number; } /** * Rank candidates by cosine similarity to queryVec, descending. * Ties break on original input index so the output is deterministic. */ export declare function rankByCosine(queryVec: number[], candidates: Array<{ item: T; vec: number[]; }>): RankedCandidate[]; //# sourceMappingURL=embedMath.d.ts.map