UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

15 lines 768 B
import { MatchFunc } from "./MatchFunc"; import { Primitive } from "./Primitive"; /** Calculate Precision@K. Assesses the proportion of relevant items in the top-k retrievals. Precision@k focuses on how many of the top-k retrieved items are actually relevant. Each relevant item is counted only once, even if it appears multiple times. @param relevantItems - List of relevant items @param retrievedItems - List of retrieved items @param matchFunc - Function to compare items for equality @param k - Value of k (top-k results to consider) @returns Precision@k */ export declare function precisionAtK<T extends Primitive>(relevantItems: T[], retrievedItems: T[], matchFunc: MatchFunc<T>, k?: number): number; //# sourceMappingURL=precisionAtK.d.ts.map