#6647·ogx

RAG benchmark: MultiHOP is ranked on SQuAD token-F1 against 1-word gold answers, and at the published scores that F1 cannot separate backends from a constant reply

Author: shaurya416Created Sep 24, 2026Updated Sep 24, 2026

benchmarking/rag/lib/metrics.py:87,126,138-139, benchmarking/rag/compare_results.py:20-25 (multihop at :22), benchmarking/rag/lib/query.py:53-58

python
# metrics.py
_squad_metric = evaluate.load("squad")
...
squad_results = _squad_metric.compute(predictions=hf_predictions, references=hf_references)
...
"exact_match": squad_results["exact_match"] / 100.0,
"f1": squad_results["f1"] / 100.0,

# compare_results.py
PRIMARY_METRICS = {"beir": "ndcg_cut_10", "multihop": "f1", "qrecc": "f1", "doc2dial": "f1"}

# query.py: the request carries no answer-format instruction
kwargs = {"model": model, "input": query, "tools": [tool_config], "include": ["file_search_call.results"]}

MultiHopRAG gold answers are short. Across the 2,556 rows the median gold answer is 1 word, the longest is 8, and none are empty. The most common are Yes (782), no (536), Insufficient information. (301), Sam Bankman-Fried (271), Google (211) and No (25).

The harness sends the bare query (query.py:53-58). The file_search template (config.yaml:127) asks the model to cite every sentence with <|file-id|> tokens, so replies run to several sentences. multihop_bench.load_data sets ground_truths[qid] = item["answer"] and evaluate() passes the raw reply text to answer_metrics. No caller normalises or truncates the reply, and answer_metrics has no tests. Scored this way, SQuAD token-F1 depends mostly on reply length and says little about correctness.

compare_results.py prints the primary metric and does not sort by it. The ranking is made in the prose of REPORT.md, rag_benchmarks.mdx and the blog post.

Measured

Method: answer_metrics taken unmodified from d102d52 and run on the gold answers built the same way as multihop_bench.load_data (yixuantt/MultiHopRAG, 2,556 rows).

Substitutions used in the reproduction:

  • evaluate.load("squad") was not available, so a SQuAD v1.1 EM/F1 scorer stood in for it: upstream compute_score.py plus the _compute wrapper from huggingface/evaluate metrics/squad/. A second, separately written SQuAD v1.1 scorer produced the same numbers.
  • rouge_score and pytrec_eval were stubbed, so rouge_l is not reported.
  • The gold answers came from a local cached copy of the dataset. It matches the HF datasets-server copy on row count (2,556) and on the answers in the first rows.
  • The replies are synthetic. "Padded to N tokens" means the gold answer plus neutral filler that shares no token with any gold answer. The score is bag-of-tokens, so phrasing and position do not matter. The 10-token case gave 0.2288 with one filler and 0.2289 with another.
Case (all 2,556 rows) EM F1 Note
A. empty reply 0.0000 0.0000 control, must fail
B. gold copied verbatim 1.0000 1.0000 control, must pass
C. wrong terse answer every row 0.0000 0.0000 control, must fail
E. every answer wrong, 60 tokens 0.0000 0.0000 control, must fail
D. every answer correct, 2 tokens 0.2981 0.7660 intended use
D. every answer correct, 10 tokens 0.0000 0.2288
D. every answer correct, 60 tokens 0.0000 0.0427
D. every answer correct, 120 tokens 0.0000 0.0216
D. every answer correct, 250 tokens 0.0000 0.0104
D'. every answer correct inside one cited sentence (Based on the retrieved articles, the answer is X <|file-...|>.) 0.2656 citation-style reply
F. constant Yes, every query 0.3059 0.3059 no retrieval, no generation
F. constant Yes No, every query 0.0000 0.3503 hedge
H. constant text listing frequent gold tokens, 60 tokens 0.0000 0.0364 query-independent
H. same, 120 tokens 0.0000 0.0184 85% of the all-correct 120-token system
H. same, 250 tokens 0.0000 0.0089 86% of the all-correct 250-token system
G1. half correct, 30 tokens 0.0000 0.0419
G2. all correct, 120 tokens 0.0000 0.0216 G1 > G2
G3. quarter correct, 10 tokens 0.0000 0.0579 G3 is 2.7x G2

Reported in results/REPORT.md: F1 0.0114 / 0.0141 / 0.0141 / 0.0136 / 0.0207, and EM 0.0 / 0.0 / 0.0 / 0.0 / 0.0004 (one row). The constant Yes reply scores 14.8x to 26.8x higher than all five.

Not measured: the per-query replies from the reported runs are not in the repo, so their lengths could not be checked. All cases above are modeled replies, not observed ones. An EM of 0.0 in four columns and 1/2556 in the fifth shows the replies are not bare answers, and REPORT.md:176 already says EM is 0.0 because the answers are verbose. The reported F1 band (0.0114-0.0207) is what a fully correct system scores at 120-250 tokens in the table above, and also what a query-independent constant text scores at those lengths.

Consequence

For the same fully correct content, the primary metric falls from 0.766 to 0.010 as the reply grows from 2 to 250 tokens. A correct answer inside one short cited sentence already loses about 73% of the F1. A terser system with fewer correct answers beats a fully correct verbose one (G1 and G3 vs G2). At the published scores the metric cannot tell a correct system from a constant reply, and the benchmark prints no chance baseline.

The report, docs and blog still make comparative claims from it:

  • REPORT.md:110,169,189: "Gemma 31B outperforms GPT-4.1 ... by +47% F1 ... its more verbose, synthesized answers better capture multi-hop reasoning"
  • rag_benchmarks.mdx:78,134,140, including ":140 verbosity hurts on Doc2Dial (short ground truths) but helps on MultiHOP (multi-document synthesis)"
  • blog/2026-05-26-rag-benchmarks.md:9,86-88: "81.6% higher F1 ... 23.7% better end-to-end accuracy"

The stated explanation runs against how the metric works. If content stays the same, adding tokens can only lower SQuAD F1, so verbosity cannot explain a higher F1. The per-query replies are not available, so the actual cause of the 0.014 to 0.021 gap cannot be determined from the repo. REPORT.md:124 and blog line 102 already say that on Doc2Dial verbosity "penalizes token-level F1 even when the answer content is correct". The same penalty applies to MultiHOP, where most gold answers are one word.

Suggested fix

The docs describe two scorers built for free-form replies. basic::subset_of checks whether the expected answer is contained in the generated response (docs/docs/building_applications/evals.mdx:149,177). llm_as_judge::accuracy is documented at :182,228. Both belonged to the scoring API removed in #5290, so they are a previously shipped, documented precedent and not code in the current tree. No containment or judge scorer exists in the current src/ or benchmarking/ tree.

On the same modeled replies, containment scores 1.0 for every correct reply from 2 to 250 tokens and 0.0 for the empty, wrong-terse and wrong-verbose replies. It does accept a hedge: Yes No scores 0.5254. Suggested changes:

  1. Score MultiHOP with normalized-gold containment or a judge-based accuracy instead of SQuAD EM/F1. Alternatively, constrain the reply format in the request.
  2. Print the majority-answer constant baseline (0.3059 here) next to every end-to-end run, and flag any run that does not clear it. Containment's weakness to hedged replies is why this baseline matters.
  3. Qualify or withdraw the MultiHOP comparative statements (+47% / +81.6%) in REPORT.md, rag_benchmarks.mdx and the blog post.

Related but separate: #6414 (reports how many queries were actually scored) deals with dropped conversations and does not change the metric choice.

Happy to open the PR.