Skip to content

fix(eval): keep the RAG retrieval benchmark running past a bad label - #8745

Merged
kovtcharov-amd merged 4 commits into
amd:mainfrom
kovtcharov:ev-rag-label
Nov 21, 2026
Merged

kovtcharov-amd merged 4 commits into
amd:mainfrom
kovtcharov:ev-rag-label

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

The release RAG retrieval benchmark has failed on every tag since v0.26.0-rc26 because a single stale evidence label aborted the whole run about eleven questions in, leaving most of the benchmark (technical docs, XQuAD, the scale tiers, the hard cases) unmeasured. Now a bad label is recorded against its own question while the run carries on, so one stale quote can no longer hide everything after it, and the job still fails at the end when any label error occurred. The two stale quotes themselves are fixed in #8755.

🔍 Technical details
  • A question with a label error is left out of the scores, listed in results.json (label_errors per dataset and in meta) and under Label errors in the report, and gaia eval retrieval exits 1. Any other exception still aborts the run. Scale tiers get the same handling; a tier where every label fails is reported instead of crashing on its summary line.
  • The report, the harness docstring and docs/reference/eval.mdx no longer describe the agent path as a "keyword boost"; it has used rank fusion since Fix: fix(rag): query_documents ranks any keyword hit above every semantic match, and slows down at scale #8737.

Test plan

  • pytest tests/unit/rag/test_retrieval_bench_harness.py tests/unit/eval/test_retrieval_bench.py (new: a bad label mid-dataset, every label bad, a label on a missing page, a non-label failure still aborting, scale tiers with some/all bad labels, report section, CLI exit code)
  • After merge (with fix(eval): re-pin two stale answer-key quotes in technical_docs #8755): dispatch eval_retrieval.yml on main and confirm it runs through every dataset

The release RAG benchmark has aborted at about the eleventh technical-docs
question on every tag since v0.26.0-rc26, because one evidence quote no
longer matched the extracted PDF text, so technical_docs, xquad, the scale
tiers and the hard cases went unmeasured.

- Re-quote two labels from the text GAIA extracts today: CDNA 3 white
  paper p25 (MI300A max power, now a rebuilt table row) and MI300X data
  sheet p1 (SR-IOV partitions); both still say what the PDF says. All 55
  technical_docs labels now resolve.
- A label error is recorded per question and the run carries on; the
  question is left out of the scores, listed under "Label errors" in the
  report, and the CLI still exits 1 at the end.
- Report and docs describe the agent path as rank fusion, not a keyword
  boost.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes cli CLI changes eval Evaluation framework changes tests Test changes performance Performance-critical changes labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

The release RAG retrieval benchmark has been dying about eleven questions in because one evidence quote went stale. This PR fixes that quote and a second stale one, and changes the runner so a bad label is recorded against its own question while the rest of the run keeps going. The job still fails at the end, so a stale label can't slip through, and every other kind of crash still stops the run. The tests cover the cases that matter, and the docs match the new behaviour.

One small edge to tidy, not blocking: if every question in a scale tier hits a label error, the tier crashes with a confusing missing-key error when it prints its summary, instead of reporting the label errors.

Real-world evidence

N/A: no evidence bundle was produced for this run. The changed surface is the release-only gaia eval retrieval benchmark, which needs the PDF corpus and embedder. The verdict rests on static review and the unit tests in the PR. The author's own after-merge check (dispatch eval_retrieval.yml on main and confirm it runs through every dataset) is the real proof.

🔍 Technical details

Issues

🟢 A scale tier where every label fails crashes on the summary log line (src/gaia/eval/retrieval/runner.py:~515). When results is empty, _summarize([]) returns no sdk_latency, agent_latency or sdk keys, so the log(...) f-string raises KeyError: 'sdk_latency'. results.json still records the label errors in meta (via the finally), but the console shows a KeyError, not the actual cause. This is unlikely, because scale questions come from the same repo docs, but a guard keeps the failure honest:

        summary = _summarize(results)
        out["tiers"].append(...)
        if not results:
            log(f"    scale-{tier}: no question scored (all label errors)")
            continue

(Or put the guard around just the log(...) call so the tier entry is still appended.)

Checked, no finding

  • LabelError (a ValueError subclass in locate.py) is raised only while evidence is resolved, so it is the right thing to catch. RuntimeError and other failures still propagate, and a test pins this.
  • Adding label_errors to each dataset's summary doesn't affect compare(). It reads only GATED_METRICS groups and questions, and questions now counts scored questions only, which is the right denominator for the tolerance.
  • The CLI exit code treats label errors like hard-case errors, and its [ERROR] line names the folder to fix.
  • Docs drift: nothing in docs/, hub/ or src/gaia/eval still says "keyword boost".
  • Both new test files are in the existing unit-test paths, so CI collects them.

Strengths

  • The fix covers both halves: the labels are corrected, checked 55/55 against a fresh extraction, and the runner no longer lets one bad label hide everything after it.
  • It still fails loudly: label errors are listed per dataset, in meta, in the report and in the exit code, instead of being skipped quietly.
  • The tests target real behaviour: a bad label mid-dataset, every label bad, a page the document lacks, and a non-label failure that still aborts.

@kovtcharov-amd
kovtcharov-amd merged commit 2884a0b into amd:main Nov 21, 2026
48 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes devops DevOps/infrastructure changes documentation Documentation changes eval Evaluation framework changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant