FeedbackScoreDict

class opik.types.FeedbackScoreDict

Bases: TypedDict

A TypedDict representing a feedback score.

This class defines the structure for feedback scores, including required and optional fields such as the score’s identifier, name, value, and an optional reason for the score.

id: NotRequired[str]

A unique identifier for the object this score should be assigned to. Refers to either the trace_id or span_id depending on how the score is logged.

name: Required[str]

The name of the feedback metric or criterion.

value: Required[float]

The numerical value of the feedback score.

category_name: NotRequired[str | None]

An optional category name for the given score.

reason: NotRequired[str | None]

An optional explanation or justification for the given score.