Skip to content

fix(agent): preserve execution evidence across scorer failures - #714

Open
praneethhere wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
praneethhere:fix/preserve-agent-evidence-on-scorer-failure
Open

praneethhere wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
praneethhere:fix/preserve-agent-evidence-on-scorer-failure

Conversation

@praneethhere

Copy link
Copy Markdown

Summary

Preserve completed agent execution records when scoring fails, while isolating individual scorer errors so they do not discard unrelated valid results.

Problem

Previously, an exception during scorer construction could propagate before an agent scenario's execution record was appended to agent_results.

Consequently, a scenario could complete its external work but be missing from the recorded evaluation output. An unexpected scoring failure after partial score publication could also leave misleading successful scores alongside a failed scoring operation.

Changes

  • Record completed agent execution results before initiating scoring.
  • Stage each scenario's scoring results until its scoring operation completes, preventing partial publication after an unexpected exception.
  • Isolate scorer construction and serialization failures using error-bearing comparison rows.
  • Preserve successful independent scorer results when another scorer fails.
  • Align constructor-error metric names with named scorers and Python scorer naming conventions.
  • Add regression tests for the observed failure boundaries.

Validation

  • 10 focused regression tests passed.
  • 143 previously selected upstream tests passed; one credential-dependent case was deselected.
  • 203 additional compatibility tests passed, including 21 subtests, covering scorer behavior, SQL evaluation, aggregation, and reporting.
  • Offline native evaluator experiments verified retained execution records against an independent SQLite effects ledger and generated CSV output.
  • Offline BigQuery reporter tests verified dataframe and Arrow serialization with a mocked cloud client.

Limitations

The complete 1,285-test suite was collected but not fully executed. Live cloud services, real BigQuery ingestion, and live LLM evaluations were not tested. The injected-failure experiments establish the documented behavior under the tested conditions, not all possible failure modes.

@praneethhere

Copy link
Copy Markdown
Author

I ran an additional offline regression experiment to investigate the effect of scorer failures on multi-scenario evalsets.

The fixture contains 12 scenarios in a single agent-format evaluation file, exercising the actual dataset loader, AgentGenWork, evaluator, trajectory scorer, analyzer and CSV reporter. A separate subprocess records fixture effects in SQLite.

With a scorer-construction failure injected at scenario B:

Measurement Baseline PR #714
Planned scenarios 12 12
Recorded fixture effects 2 12
Execution records 1 12
Valid record-backed verdicts 1 11
Explicit scorer-error rows 0 1

On the baseline, scenarios C–L were not attempted. With the proposed change, the remaining scenarios continued.

Both arms reported a 100% trajectory passing fraction, but independently calculated scoring coverage against the planned scenarios was 1/12 (8.3%) versus 11/12 (91.7%).

The no-fault and wrong-tool controls produced identical verdicts in both arms. Additional tests covered a late-dispatch exception and a complete scorer-construction outage.

The comparison uses baseline 4234154 and PR head d13e857. These are controlled offline fixtures, not live model evaluations or observed production incidents.

The remaining aggregate coverage limitation is intentionally outside this PR's scope, given the related reporting work in #713 and #715.

I've also prepared a standalone evidence-replay package containing the raw CSV outputs, SQLite ledgers and verification script.

Feedback on the failure-isolation approach would be appreciated. The two Cloud Build checks currently report ACTION_REQUIRED; could a maintainer authorize them if appropriate?

EvalBench_scoring_failure_reviewer_kit_v2_20261124.zip

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.

1 participant