An ordered single-turn or multi-turn example in a dataset.
Summary
Functions
Builds a changeset for an ordered dataset entry.
Classifies an entry as single-turn or multi-turn from its message count.
Types
@type t() :: %Aludel.Datasets.DatasetEntry{ __meta__: term(), assertions: term(), dataset: term(), dataset_id: term(), id: term(), inserted_at: term(), messages: term(), metadata: term(), name: term(), position: term(), red_team_deduplication_key: term(), updated_at: term(), variable_values: term() }
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Builds a changeset for an ordered dataset entry.
It validates message and assertion shapes, JSON-encodable metadata and variables, nonnegative position, and the requirement for variables or messages to supply evaluation input.
@spec conversation_kind(t()) :: :single_turn | :multi_turn
Classifies an entry as single-turn or multi-turn from its message count.
Variable-only and one-message entries are single-turn; two or more messages are multi-turn.