Langfuse JS/TS SDKs
    Preparing search index...

    Interface ScoreBody

    {
    * name: "novelty",
    * value: 0.9,
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "consistency",
    * value: 1.2,
    * dataType: LangfuseAPI.ScoreDataType.Numeric,
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "accuracy",
    * value: 0.9,
    * dataType: LangfuseAPI.ScoreDataType.Numeric,
    * configId: "9203-4567-89ab-cdef",
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "toxicity",
    * value: "not toxic",
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "correctness",
    * value: "partially correct",
    * dataType: LangfuseAPI.ScoreDataType.Categorical,
    * configId: "1234-5678-90ab-cdef",
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "hallucination",
    * value: 0,
    * dataType: LangfuseAPI.ScoreDataType.Boolean,
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "helpfulness",
    * value: 1,
    * dataType: LangfuseAPI.ScoreDataType.Boolean,
    * configId: "1234-5678-90ab-cdef",
    * traceId: "cdef-1234-5678-90ab"
    * }
    {
    * name: "contextrelevant",
    * value: "not relevant",
    * sessionId: "abyt-1234-5678-80ab"
    * }
    {
    * name: "hallucination",
    * value: 0,
    * datasetRunId: "7891-5678-90ab-hijk"
    * }
    interface ScoreBody {
        comment?: string;
        configId?: string;
        datasetRunId?: string;
        dataType?: ScoreDataType;
        environment?: string;
        id?: string;
        metadata?: unknown;
        name: string;
        observationId?: string;
        sessionId?: string;
        traceId?: string;
        value: CreateScoreValue;
    }
    Index

    Properties

    comment?: string
    configId?: string

    Reference a score config on a score. When set, the score name must equal the config name and scores must comply with the config's range and data type. For categorical scores, the value must map to a config category. Numeric scores might be constrained by the score config's max and min values

    datasetRunId?: string
    dataType?: ScoreDataType

    When set, must match the score value's type. If not set, will be inferred from the score value or config

    environment?: string
    id?: string
    metadata?: unknown
    name: string
    observationId?: string
    sessionId?: string
    traceId?: string

    The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)