fix(longmemeval): judge abstention questions with the abstention rubric - #82
Open
thegoodengineer wants to merge 1 commit into
Open
Conversation
LongMemEval marks its 30 abstention questions with an `_abs` suffix on the question id and keeps the original `question_type`. Judge prompt selection only looked at the question type, so those questions were graded with the exact-answer rubric against a reference that is an explanation of why the question is unanswerable, which scores a correct abstention as incorrect. Carry an `isAbstention` flag from the benchmark into the judge and use it to pick the rubric, matching the abstention switch in LongMemEval's own evaluator. LoCoMo (`adversarial`) and ConvoMem (`abstention_evidence`) now set the flag as well and keep working through the existing question type check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On LongMemEval, every abstention question is graded with the wrong rubric, so a provider that correctly abstains is scored as incorrect.
LongMemEval encodes abstention in the question id, not the question type. The 30 abstention entries in
longmemeval_skeep their originalquestion_typeand are marked with an_abssuffix onquestion_id. For those entries theanswerfield is an explanation of why the question is unanswerable, not an answer to match against:{ "question_id": "0862e8bf_abs", "question_type": "single-session-user", "answer": "You did not mention this information. You mentioned your cat Luna but not your hamster." } { "question_id": "88432d0a_abs", "question_type": "multi-session", "answer": "The information provided is not enough. You did not mention baking egg tarts." }Judge prompt selection in
getJudgePromptForTypekeys purely off the question type:single-session-user,multi-session,temporal-reasoningandknowledge-updatenever match, soABSTENTION_JUDGE_PROMPTis dead code for LongMemEval and the questions fall through to the exact answer rubric. The judge is then asked whether "I don't know" contains the correct answer, where the "correct answer" is a sentence explaining that the information was never mentioned. The answer is no, so the run recordsincorrectfor exactly the behaviour the question is testing for.This is also what
framework.mdalready says should happen (ABSTENTION <- LoCoMo: Cat 5 | LongMemEval: abstention | ConvoMem: Abstention); the LongMemEval half of that mapping was never wired up.Upstream switches on the same signal, in
src/evaluation/evaluate_qa.py:and its abstention template presents the reference as an explanation, not as an answer.
Impact
multi-session(12),single-session-user(6),temporal-reasoning(6) andknowledge-update(6).-s) hit it too, since the abstention questions sit inside the regular type buckets.Fix
Carry an
isAbstentionflag from the benchmark to the judge and let it drive rubric selection, keeping the existing question type check as a fallback.UnifiedQuestion.isAbstentionandJudgeInput.isAbstention(both optional, no checkpoint format change).isAbstentionQuestionId()in the LongMemEval benchmark, set on load from the_abssuffix.adversarial) and ConvoMem (abstention_evidence) set the same flag, so all three benchmarks now express abstention the same way instead of relying on type name matching.getJudgePromptForType(questionType, isAbstention?)honours the flag first.buildJudgePromptlabels the referenceExplanationfor abstention questions rather thanGround Truth Answer, matching the upstream template, and one sentence was added toABSTENTION_JUDGE_PROMPTto say the reference is an explanation.Prompt actually sent for
0862e8bf_absbefore this change:and after:
Compatibility
-f evaluateon the same run id, no re-ingest needed.Testing
bun test(newsrc/judges/base.test.ts, 6 tests) covers the flagged path, the answerable question of the same type, the LoCoMo and ConvoMem type based routing, and the temporal and preference rubrics.bunx tsc --noEmitclean.xiaowu0162/longmemeval-cleaned(longmemeval_s_cleaned.json): 500 questions, 30 with an_absid, all of them carrying a regularquestion_type.