@mastra/core
Version:
33 lines • 1.3 kB
TypeScript
/**
* Collects scorer results across data items and averages them per scorer.
*
* A result the scorer declared not scorable (no `score`, `notScorable` set)
* is counted separately and left out of the average, so an inapplicable run
* neither inflates nor deflates a scorer's score. A scorer whose every run
* was not scorable is omitted from `getAverageScores()` rather than reported
* as 0.
*/
export declare class ScoreAccumulator {
private flatScores;
private workflowScores;
private stepScores;
private agentScores;
private trajectoryScores;
private notScorableCounts;
addScores(scorerResults: Record<string, any>): void;
private addFlatScores;
private addWorkflowScores;
private addAgentScores;
addStepScores(stepScorerResults: Record<string, Record<string, any>>): void;
private pushScore;
/**
* Returns the numeric score of a result, or `undefined` when the result
* carries none. Not-scorable results are counted as they pass through.
*/
private classify;
/** Not-scorable result counts keyed by scorer id, across every result shape. */
getNotScorableCounts(): Record<string, number>;
getAverageScores(): Record<string, any>;
private getAverageScore;
}
//# sourceMappingURL=scorerAccumulator.d.ts.map