mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
13 lines • 730 B
TypeScript
import { MatchFunc } from "./MatchFunc";
import { Primitive } from "./Primitive";
/**
Calculate [Recall@K](https://datascience.stackexchange.com/questions/92247/precisionk-and-recallk)
Assesses how many relevant items were retrieved in the top-k retrievals, counting only the first match for each relevant item.
@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 Recall@K
*/
export declare function recallAtK<T extends Primitive>(relevantItems: T[], retrievedItems: T[], matchFunc: MatchFunc<T>, k: number): number;
//# sourceMappingURL=recallAtK.d.ts.map