import type { Embedder } from './embedders/embedder.js'; import type { LanceStore } from './store/lance-store.js'; import type { ExtractedLesson } from './suspicious-lesson.js'; /** Cosine similarity between two vectors of equal length. */ export declare function cosineSimilarity(a: number[], b: number[]): number; /** Normalize a heading for exact-match dedup: lowercase, collapse whitespace. */ export declare function normalizeHeading(heading: string): string; /** * Drop candidates whose normalized heading has already been seen. * Cheap O(n) first pass before the expensive embedding comparison. */ export declare function deduplicateByHeading(candidates: ExtractedLesson[]): { unique: ExtractedLesson[]; headingDupes: ExtractedLesson[]; }; /** * Remove semantically duplicate lessons by checking against both the LanceDB * index and already-accepted candidates in the current batch. * * First pass: exact heading dedup (cheap, deterministic). * Second pass: embedding cosine similarity with a configurable threshold (default 0.92). * Returns only the lessons that are sufficiently novel. */ export declare function deduplicateLessons(candidates: ExtractedLesson[], store: LanceStore, embedder: Embedder, threshold?: number): Promise<{ kept: ExtractedLesson[]; dropped: ExtractedLesson[]; }>; //# sourceMappingURL=semantic-dedup.d.ts.map