1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- vendored from evalframe v0.4.0 (~/.algocline/packages/evalframe/presets/scorers.lua)
-- DO NOT EDIT here — upstream sync via manual copy
--[[
presets/scorers.lua — Built-in scorer catalog
Usage:
local scorers = require("evalframe.presets.scorers")
bind { grader_def, scorers.linear_1_5 }
]]
local scorer = require
local M =
-- ============================================================
-- Bool: true → 1.0, false → 0.0
-- Re-exports scorer.default_bool to avoid duplicate logic.
-- ============================================================
M. = scorer.
-- ============================================================
-- Linear scales (common LLM judge ratings)
-- ============================================================
M. = scorer
M. = scorer
M. = scorer
-- ============================================================
-- Thresholds
-- ============================================================
M. = scorer
M. = scorer
-- ============================================================
-- Inverse: lower is better (e.g., latency, token count)
-- ============================================================
M. = scorer
-- ============================================================
-- Step-based: non-linear band scoring for LLM judge ratings
-- ============================================================
--- Band scoring for 1-5 scale: 1-2→0.0, 3→0.5, 4-5→1.0
M. = scorer
return M