//#region src/contracts/eval-scorer.d.ts /** * Pluggable evaluation scorer. Generic over the input / output types * carried by the eval dataset. Concrete implementations live in the * separate `@graphorin/evals` package (post-MVP); the interface lives * here so that: * * - The minimal inline runner shipped with `@graphorin/observability` can * type-check against it. * - Custom application-level scorers can be defined without taking an * evals dependency. * * @stable */ interface EvalScorer { readonly id: string; readonly description?: string; score(sample: EvalSample): Promise; } /** * A single sample from an eval dataset. * * @stable */ interface EvalSample { readonly id: string; readonly input: TInput; readonly expected?: TOutput; readonly actual: TOutput; readonly metadata?: Readonly>; } /** * Result of `EvalScorer.score(...)`. `value` is normalized to `[0, 1]` * by convention; raw scores can be carried in `details`. * * @stable */ interface EvalScore { readonly value: number; readonly pass?: boolean; readonly rationale?: string; readonly details?: Readonly>; } //#endregion export { EvalSample, EvalScore, EvalScorer }; //# sourceMappingURL=eval-scorer.d.ts.map