Wraps a one-argument function as a scorer, for Elixir-defined datasets and tasks. It cannot be referenced from YAML/JSONL files.
{Nous.Eval.Scorers.Function,
name: "mentions_order", fun: fn input -> input.output =~ "order" end}The function receives the Nous.Eval.ScoreInput and returns:
true/false- a:pass/:failscore- a number in
0.0..1.0- a float score,passed?when at least:threshold - a
Nous.Eval.Scoreor a list of them, or anyNous.Eval.Scorer.result/0({:ok, _},{:skip, reason},{:error, %Nous.Eval.ScorerError{}}), passed through
Anything else, and any number outside 0.0..1.0, is rejected by
Nous.Eval.Scoring as a scorer error.
Options
:fun- the function (required):name- the score name (default"function"):threshold- for numeric returns (default0.5)