Evaluation integrity: DBBench grader eval() on agent answer; null/NaN answers collapse to zero and match; errored samples silently delete whole task; unauthenticated control plane; OS checks inside agent container
Summary
Five defects in the AgentBench evaluation harness at pin (R03/E1 audit).
1. DBBench grader runs eval() on the agent's final answer
The evaluated agent can execute arbitrary code in the grading process, including monkeypatching the grade checker.
2. DBBench treats empty/null/NaN/undefined/infinity answers as zero
A null answer collapses to a numeric 0, which matches any gold answer of 0. Wrong answers score correct.
3. One errored sample silently deletes the whole task from analysis
A single exception in the results file removes the entire task from the aggregate, inflating the reported score.
4. Evaluation control plane has no authentication
The shipped deployment procedure exposes the eval control plane without authentication.
5. OS verification scripts run inside the agent's container
The verification for OS-interaction tasks executes in the same container the agent controls, so the agent can tamper with the check.
All five reproduced with deterministic offline harnesses.
Adding a mechanism in the same grader that item 2 here does not cover, measured on the real result_processor.py at d1e4a10.
_clean_mysql_result (result_processor.py:166-176) keeps only 1-tuples from an eval'd MySQL result and silently drops every wider row (the comment at :174 says multi-value tuples are unhandled). A multi-column gold such as "[('Taiwan', 1), ('United States', 13)]" is therefore cleaned to [] rather than None; _clean_answer (:205-207) returns that [], and the else-branch of compare_results (:50-74) accepts an empty answers list as a match, because all() over two empty lists is True and all([]) is True. task.py:171-176 logs an empty commit_final_answer and then grades it anyway (:203-215).
answers= |
gold | result | expected |
|---|---|---|---|
[] |
"[('Taiwan', 1), ('United States', 13), ('Canada', 1)]" |
True | False |
["[('Taiwan', 1), ('United States', 13), ('Canada', 1)]"] (the string the agent saw) |
same | False | True |
["('Taiwan', 1)", "('United States', 13)", "('Canada', 1)"] |
same | False | True |
["Taiwan","1","United States","13","Canada","1"] |
same | False | True |
[] |
"[('Taiwan',), ('Canada',)]" (single column, control) |
False | False |
['Canada','Taiwan'] |
"[('Taiwan',), ('Canada',)]" (control) |
True | True |
[] |
"[]" (intended) |
True | True |
On data/dbbench/db_out_new.jsonl (the dbbench-env_train file, configs/tasks/dbbench.yaml:50-54, consumed as a training task by the AgentRL configs): of 1290 SELECT-typed rows, 980 have a non-empty multi-column gold. On all 980, answers=[] scores 1 and none of the three faithful forms above scores 1. With the 21 rows whose gold is genuinely [], an empty answer is rewarded on 1001 of 2320 query rows. standard.jsonl and dev.jsonl are unaffected (JSON list labels never enter _clean_mysql_result), so no shipped dbbench-std or dbbench-lite number changes; the effect is on RL reward for the env_train split, where an always-empty policy is paid on every GROUP BY or multi-select question and a faithful one is not.
Fix shape: in _clean_mysql_result, append a canonical whole-row form for len(item) != 1 instead of skipping it, and mirror that shape in the list branch of _clean_answer; in compare_results, do not let two empty processed lists match unless the raw gold itself parses to an empty result; in task.py, return reward 0 for an empty answer against a non-empty gold at the point where it is already detected. The v0.2 comparator (ed013ff, __init__.py:189-206) failed closed here (set() != set(label)), though it never matched multi-column results either, so it is a fail-closed reference rather than code to copy. A regression test with a two-column gold, an empty answer expecting 0 and a faithful row-string answer expecting 1 would pin it.