query_crmarenapro/query9 validator accepts wrong answers and refusals (substring match without word boundary)
query_crmarenapro/query9/validate.py accepts answers that name a different state, and accepts refusals, because its fast-path check is a plain substring test without a word boundary.
Verified on main @ 9ed8bdde3.
The cause
expected = "MI"
if expected.upper() in llm_output_clean.upper():
return True, f"Found expected state: {expected}"
"MI" in "I COULD NOT DETERMINE THE ANSWER." is True, because DETERMINE contains MI.
Note the fallback loop immediately below this uses re.search(r'\b' + state + r'\b', ...), so word-boundary matching is already the intended semantics here; the fast path just skips it.
Observed behaviour
| LLM output | Result |
|---|---|
MI |
PASS (correct) |
I could not determine the answer. |
PASS |
The answer is CA, at a MInimum. |
PASS |
The submitted record shows TX. |
PASS |
CA |
fail |
The answer is Texas. |
fail |
Repro:
import importlib.util
spec = importlib.util.spec_from_file_location("v", "query_crmarenapro/query9/validate.py")
m = importlib.util.module_from_spec(spec); spec.loader.exec_module(m)
print(m.validate("I could not determine the answer.")) # (True, "Found expected state: MI")
Why it matters
MI is a substring of common words in agent prose: determine, minimum, submitted, administrative, estimated, committed. Any agent whose answer contains one of these scores a pass on this query regardless of what state it actually reported, so query9 inflates pass@1 for every agent and every leaderboard submission that includes this dataset.
Suggested fix
Apply the same word-boundary matching the fallback already uses:
if re.search(r'\b' + re.escape(expected) + r'\b', llm_output_clean, re.IGNORECASE):
return True, f"Found expected state: {expected}"
For context on how I found it: I ran all 104 validate.py files against two content-free probes (a refusal with no numbers, and a string listing many candidate numbers). 85 resisted both. This was the only validator that accepts a refusal. Happy to send a PR.