Skip to content

Name valid values when a benchmark filter matches nothing (#1041) - #1056

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
sammist2:fix/1041-benchmark-unknown-filter-note
Oct 18, 2026
Merged

yakew7 merged 1 commit into
yakew7:mainfrom
sammist2:fix/1041-benchmark-unknown-filter-note

Conversation

@sammist2

Copy link
Copy Markdown
Contributor

Fixes #1041.

get_benchmark_results returned total_matches: 0 with no explanation when a filter value matched no rows. Because the audit names are lowercase, a call like audit="COMPAS" came back empty, which an agent can misread as "no data" rather than a case mismatch.

_get_benchmark_results_impl now adds a notes entry naming that column's valid values whenever a filter value matches none of them, with a hint when the mismatch is only in case (e.g. audit 'COMPAS' not found; available: ... (values are case-sensitive; did you mean 'compas'?)). The empty result is kept, and a value that does match is unaffected. The tool docstring now documents this.

Updated the existing no-match test and added a case-mismatch test in tests/test_mcp_server.py.

get_benchmark_results returned total_matches: 0 with no explanation when
a filter value matched no rows. Because audit names are lowercase, a call
like audit="COMPAS" came back empty, which an agent can misread as
"no data."

_get_benchmark_results_impl now adds a 'notes' entry naming that column's
valid values when a filter value matches none of them, with a hint when
the mismatch is only in case. The empty result is kept, and a value that
does match is unaffected. Updates the tool docstring and the tests.
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

@sammist2 is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

@yakew7 @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit 9ce1fab into yakew7:main Oct 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_benchmark_results returns an empty result for an audit name that does not exist instead of naming the valid ones

2 participants