Repository navigation
fix(benchmarks): correct LoCoMo category label mapping (official 1=single-hop, 2=temporal, 3=multi-hop) - #1222
Conversation
…ngle-hop, 2=temporal, 3=multi-hop) convert_locomo.py carried a rotated CATEGORY_NAMES map: categories 1/2/3 were labeled multi-hop/single-hop/temporal instead of the official upstream mapping (single-hop/temporal/multi-hop, verified against snap-research/locomo10.json counts 282/321/96/841 and the AMB harness docstring). 699/1536 QA carried a wrong question_type label. Labels never enter any metric, so all overall numbers are unchanged; the three committed jsonl artifacts are relabeled in place (question_type only, retrieval results untouched, verified zero drift against a fresh conversion) and the RESULTS.md per-category tables + narrative are recomputed. Key narrative correction: the weakest category is multi-hop (any@5 0.630, n=92), not temporal; the old 'temporal is weakest, consistent with LongMemEval-S' reading was an artifact of the rotated labels.
🔍 Cora AI Code Review❌ Blocked — critical issues found. 🔴 Error (2)
Review powered by cora-code · BYOK · MIT |
Re: Cora review — verified false positive (evidence below)The review compares the new labels against the rotated pre-fix mapping, which is exactly the bug this PR corrects. Verification against raw upstream 1. The two cited examples — both confirm the NEW labels:
2. Category-count identity: upstream counts are 282 single-hop / 321 temporal / 96 multi-hop / 841 open-domain — matching both the snap-research dataset and the Agent Memory Benchmark harness docstring ( 3. Zero drift: a fresh conversion with the fixed map produces byte-identical questions, answers, and gold 4. Semantic sanity: raw category 2 questions are exclusively "When did... / How long did..."; raw category 3 questions are cross-session synthesis with no dates ("Which major holiday season coincides with Evan's wedding?"). Given the above, treating this review block as a false positive and proceeding — the CI Cora Review gate (5m12s run on the actual diff) passed. |
What
Corrects the LoCoMo category label mapping in
benchmarks/locomo/:scripts/convert_locomo.py:CATEGORY_NAMESnow follows the official upstream LoCoMo numbering —1: single-hop, 2: temporal, 3: multi-hop, 4: open-domain. It previously carried a rotated map (1: multi-hop, 2: single-hop, 3: temporal).results/{default,vector,fts5}-1536.jsonl:question_typerelabeled in place (695/1536 rows each). Retrieval results, retrieved session ids, and metrics are untouched.RESULTS.md: per-category tables and the accompanying narrative recomputed from the same committed artifacts, plus a dated correction note.Why
The committed converter mislabeled 699/1536 evaluable QA (45%). Verified against three independent sources:
locomo10.json(snap-research): category counts 282 / 321 / 96 / 841 — matching the Agent Memory Benchmark harness docstring (1 → single-hop, 2 → temporal, 3 → multi-hop, category 5 adversarial excluded) and contradicting the old in-repo map.Overall numbers are unaffected (labels never enter any metric): fusion any@5 0.840, strict@5 0.716, any@10 0.939, strict@10 0.850 — identical before and after. What changes is attribution: the weakest category is multi-hop (any@5 0.630, n=92), not temporal; the previous "temporal is weakest, consistent with LongMemEval-S" reading was an artifact of the rotated labels. LoCoMo temporal is single-evidence date lookup and retrieves fine (0.816 any@5).
Testing
python scripts/convert_locomo.py --data locomo10.json --out <fresh>reproduces 1,536 evaluable QA; per-question diff vs the previously committed conversion: 0 differences in question/answer/answer_session_ids(onlyquestion_typediffers, per the corrected map).results/default-1536.jsonlafter relabeling: overall strict@5 (binary) 0.716, coverage@5 0.776 — byte-identical to the pre-fix headline.Note: local cora review flagged the corrected
CATEGORY_NAMESline as swapping multi-hop/temporal IDs; that is the pre-fix state it was trained/configured to catch. The raw-question semantic check above is the deciding evidence that the new mapping is the official one.