mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
14 lines • 626 B
TypeScript
import { MatchFunc } from "./MatchFunc";
import { Primitive } from "./Primitive";
/**
Calculate F1@K.
The F1-score is the harmonic mean of Precision@K and Recall@K.
It provides a balance between precision and recall.
@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 F1@k
*/
export declare function f1AtK<T extends Primitive>(relevantItems: T[], retrievedItems: T[], matchFunc: MatchFunc<T>, k?: number): number;
//# sourceMappingURL=f1AtK.d.ts.map