/** * Retrieval quality metrics — ADR-005 eval harness. * * Both metrics operate on a ranked list of atom ids (engine output order) * against a graded relevance list (0 = not relevant .. 3 = highly relevant). */ export interface GradedRelevance { atom_id: string; grade: number; } /** * recall@k — fraction of relevant atoms (grade > 0) that appear in the * top-k ranked list. Returns 1 when the query has no relevant atoms * (nothing to miss). */ export declare function recallAtK(ranked: string[], graded: GradedRelevance[], k: number): number; /** * NDCG@k with exponential gain (2^grade - 1) and log2(rank+1) discount. * Ideal DCG is computed from the graded list sorted descending, so a * grade-0 entry contributes nothing to either side. Returns 1 when the * query has no relevant atoms. */ export declare function ndcgAtK(ranked: string[], graded: GradedRelevance[], k: number): number;