UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

14 lines (12 loc) 787 B
/** Computes a normalized execution time score comparing a generated query's execution time to a reference execution time. The score ranges from 0 to 1, where: - 1 means the generated query is as fast or faster than the reference - 0 means the generated query is significantly slower - Score is computed using a logistical function with a configurable alpha parameter @param generatedTimeMs - Execution time of the generated query in milliseconds @param referenceTimeMs - Reference (ideal) execution time in milliseconds @returns A score between 0 and 1 */ export declare function computeNormalizedLogisticalExecutionTime(generatedTimeMs: number, referenceTimeMs: number, alpha?: number): number; //# sourceMappingURL=computeNormalizedLogisticalExecutionTime.d.ts.map