ReqManagedAgents.OutcomeEvaluation (ReqManagedAgents v0.16.0)

Copy Markdown View Source

One completed grader evaluation of an outcome.

result is one of the five provider verdicts or :unknown; the provider's own end event is kept verbatim in raw, including grader usage; the usage in this end event is not added to SessionResult.usage. new/1 validates every field and never coerces; an empty start_event_id is valid (an interrupted evaluation).

Summary

Types

The provider's end event, verbatim; its keys and values are not interpreted here.

t()

Functions

Validates a closed atom-keyed attribute map or an existing struct.

Types

raw()

@type raw() :: map()

The provider's end event, verbatim; its keys and values are not interpreted here.

result()

@type result() ::
  :satisfied
  | :needs_revision
  | :max_iterations_reached
  | :failed
  | :interrupted
  | :unknown

t()

@type t() :: %ReqManagedAgents.OutcomeEvaluation{
  event_id: String.t() | nil,
  explanation: String.t() | nil,
  iteration: non_neg_integer() | nil,
  outcome_id: String.t(),
  processed_at: String.t() | nil,
  raw: raw(),
  result: result(),
  start_event_id: String.t() | nil
}

Functions

new(evaluation)

@spec new(map() | t()) :: {:ok, t()} | {:error, {:invalid_outcome_evaluation, atom()}}

Validates a closed atom-keyed attribute map or an existing struct.