Arize Phoenix TS
    Preparing search index...

    One named classification question asked by a criteria classification evaluator. Every criterion is answered in the same backend request and produces one CriterionResult.

    const helpfulness: Criterion = {
    name: "helpfulness",
    instruction: "Does the response resolve the user's request?",
    labels: { helpful: "the request is resolved", not_helpful: null },
    scoreMap: { helpful: 1, not_helpful: 0 },
    optimizationDirection: "MAXIMIZE",
    };
    interface Criterion {
        instruction: string;
        labels: Readonly<Record<string, string | null>>;
        name: string;
        optimizationDirection?: OptimizationDirection;
        scoreMap?: Readonly<Partial<Record<string, number>>>;
    }
    Index
    instruction: string

    The question asked about the input for this criterion. Must be non-empty.

    labels: Readonly<Record<string, string | null>>

    The labels the criterion classifies into, each mapped to a description of what it means, or null for none. Descriptions are sent to the model.

    name: string

    Names the criterion's result, and the question sent to the backend. Must be unique within an evaluator.

    optimizationDirection?: OptimizationDirection

    The direction in which this criterion's score should be optimized. Defaults to the evaluator's optimizationDirection. It is set on each CriterionResult; experiments don't record it in Phoenix.

    scoreMap?: Readonly<Partial<Record<string, number>>>

    Maps labels to scores. A label without an entry produces a result with a label and no score; omit the map for label-only classification.