Nous.Eval.Guard.Report (nous v0.21.1)

Copy Markdown View Source

The result of Nous.Eval.Guard.calibrate/2.

  • :guard / :surface - what was calibrated
  • :fingerprint - the recording's fingerprint (model, questions, cases)
  • :objective - the sweep objective
  • :counts - %{split => %{label => n}} of the recorded cases
  • :search - the coordinate-descent log on tune: per pass and coordinate the value before and after, the objective before and after and how many settings were replayed
  • :changes - [{coordinate, from, to}], every setting the sweep moved ({:band, question_id, option_key | nil} or {:threshold, strategy_index})
  • :splits - per reported split (holdout, and test when it has certifiable cases): %{baseline: metrics, tuned: metrics, gate: gate_report} (Nous.Eval.Guard.Metrics.summarize/2, Nous.Eval.Guard.Gate.check/3 of tuned against configured). The sweep never reads these splits
  • :patch - the proposed config patch %{data: map, text: string}: data is what Nous.Eval.Guard.apply_patch/2 merges into the guard config; text is the same patch as reviewed Elixir with its evidence. It is never applied automatically and never becomes a Nous.Profile component: guard settings change only through a reviewed config change
  • :warnings - imprecise estimates, unmeasurable FPR targets, unreviewed test cases left out

Summary

Functions

The report as plain text: counts, the sweep, per reported split the confusion matrix (with its error row) and the metrics for the configured and the tuned setting, the gate, warnings and the proposed patch.

Types

t()

@type t() :: %Nous.Eval.Guard.Report{
  changes: [{term(), term(), term()}],
  counts: map(),
  fingerprint: String.t(),
  guard: :decision_guard | :input_guard,
  objective: term(),
  patch: %{data: map(), text: String.t()},
  search: [map()],
  splits: map(),
  surface: atom(),
  warnings: [String.t()]
}

Functions

render(r)

@spec render(t()) :: String.t()

The report as plain text: counts, the sweep, per reported split the confusion matrix (with its error row) and the metrics for the configured and the tuned setting, the gate, warnings and the proposed patch.