Skip to content
Français

ScoreAnswer

import type { ScoreAnswer } from "@elie-laloum/outpost";
  • typeRequired
    "score"
    Answer discriminator score.
  • scoreRequired
    number
    Native probability-weighted level index, between zero and the number of levels minus one; consistency allows accumulated four-decimal rounding of the score and probabilities.
  • probabilitiesRequired
    Readonly<Record<string, number>>
    Native distribution keyed by level indices; omitted zero-probability levels and accumulated four-decimal rounding error are allowed. Values are retained without renormalization.
  • confidenceRequired
    number
    Native confidence in [0,1], retained without recomputing it from the distribution.
  • legendOptional
    Readonly<Record<string, string>> | undefined
    Optional native mapping from all level positions to textual descriptions.
export interface ScoreAnswer {
  readonly type: "score";
  readonly score: number;
  readonly probabilities: Readonly<Record<string, number>>;
  readonly confidence: number;
  readonly legend?: Readonly<Record<string, string>>;
}