/** * Evaluation-informed scoring, uncertainty, and multi-objective selection. * * - Missing evidence is explicitly "no evidence", never zero (zero would imply * a confident failure). * - Safety failures remain separate hard constraints and are never averaged away. * - Aggregate weights are versioned and explicit. * - Uncertainty penalizes selection. * - Selection supports a Pareto frontier and explicit objectives. */ import type { CandidateEvidence, OrchestrationCandidate, OrchestrationCandidateScore, RetrievalStrategy, SelectionPolicy } from "./types.js"; export declare const AGGREGATE_WEIGHTS_VERSION = 1; export interface AggregateWeights { correctness: number; safety: number; reliability: number; cost: number; latency: number; } export declare const WEIGHTS_BY_POLICY: Record; /** Score one candidate from evidence. Missing evidence stays undefined. */ export declare function scoreCandidate(candidate: OrchestrationCandidate | { candidateId: string; }, evidence: CandidateEvidence | undefined, _sampleCount: number): OrchestrationCandidateScore; /** * Compute the aggregate score under a policy's explicit weights. * Safety is treated as a hard gate: if the safety score is present and below a * safety floor, aggregate collapses (safety must never be averaged away). */ export declare function aggregateScore(score: OrchestrationCandidateScore, weights: AggregateWeights, options?: { safetyFloor?: number; }): number; export interface SelectionOptions { policy: SelectionPolicy; safetyFloor?: number; } export interface SelectionResult { selected: OrchestrationCandidateScore | undefined; runnersUp: OrchestrationCandidateScore[]; /** Highest aggregate per candidate (pre-actual selection). */ ranked: { score: OrchestrationCandidateScore; aggregate: number; uncertaintyPenalty: number; }[]; reasonCodes: string[]; } /** * Multi-objective selection over scored candidates. * - Explicit operator objective via weights. * - Uncertainty penalizes: subtract uncertainty * uncertaintyWeight. * - Pareto-aware: if equal aggregates, keep deterministic tie-break. * - Missing evidence (aggregate would be 0 from all-undefined) is not preferred * over a candidate with real (even partial) evidence. */ export declare function selectBest(scored: OrchestrationCandidateScore[], options: SelectionOptions): SelectionResult; /** Infer a sensible default retrieval policy from features deterministically. */ export declare function inferRetrievalStrategy(features: { ambiguity: number; requiresMutation: boolean; taskCategory: string; languageIds: string[]; }): RetrievalStrategy; //# sourceMappingURL=scoring.d.ts.map