mirror of
https://github.com/lukaszraczylo/llm-testbench.git
synced 2026-10-12 00:45:19 +00:00
fix(catalog): harden evaluators against correct-answer phrasing variance
Both reviewers found evaluators that scored correct answers as zero: hardcoded flag order, quote-style rigidity, missing multiline anchors, comma-grouped numbers, ratio notation, and numeric strings in JSON. A shared ExactToken evaluator now normalizes fences, quotes, and trailing periods for exact-answer tests. The obsolete tmutil snapshot reference now accepts the current localsnapshot verb.
This commit is contained in:
@@ -164,6 +164,11 @@ func TestPaperCAPAvailabilityChoiceTest_Eval(t *testing.T) {
|
||||
{"correct with trailing period", "Availability.", 1},
|
||||
{"wrong: consistency", "Consistency", 0},
|
||||
{"wrong: extra words break the forced one-word format", "The answer is availability", 0},
|
||||
// B2: the prompt's own phrasing quotes the two options, so a
|
||||
// quoted or bolded answer must still score full credit.
|
||||
{"correct, quoted (prompt's own phrasing)", `"Availability"`, 1},
|
||||
{"correct, bolded", "**Availability**", 1},
|
||||
{"correct, quoted with trailing period", `"Availability".`, 1},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user