Skip to content

Cap the METEOR fragmentation penalty so scores stay in [0, 1] (#210) - #216

Merged
yl231 merged 1 commit into
mainfrom
fix/meteor-penalty-cap
Sep 28, 2026
Merged

yl231 merged 1 commit into
mainfrom
fix/meteor-penalty-cap

Conversation

@yl231

@yl231 yl231 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Fixes the negative METEOR score reported in #210.

Cause. _calculate_fragmentation_penalty computes 0.5 * (min_chunks / total_matches) ** 2, but min_chunks counts runs over the full token sequence (repeated words included) while total_matches counts distinct matched words. The ratio can exceed 1, the penalty can exceed 1, and f_score * (1 - penalty) goes negative.

Fix. Cap the penalty at 1. This is deliberately minimal: only scores that were negative change, and they become 0. Every other score is unchanged.

Verified by re-grading every non-LiveCodeBench row of the 15 leaderboard routers that store per-row scores (150,576 rows, including candidate rows):

  • with the fix, the only rows it changes are the 34 negative NarrativeQA scores, each now 0;
  • with and without the fix, all other rows grade identically.

Also re-scores the one negative cached value (cached_results/claude-3-haiku-20240307.jsonl, NarrativeQA_4102: −0.033 → 0.0) through meteor_score; no negative scores remain in the caches.

This PR does not change any published leaderboard numbers. Those will update in the planned full re-grade of all routers.

🤖 Generated with Claude Code

_calculate_fragmentation_penalty divides chunk counts taken over the full token
sequence (repeats included) by the number of distinct matched words, so the
ratio can exceed 1 and the METEOR score can go negative. Cap the penalty at 1.
Only scores that were negative change (they become 0). Also re-scores the one
negative cached value (claude-3-haiku, NarrativeQA_4102).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yl231
yl231 merged commit f6f2af4 into main Sep 28, 2026
10 checks passed
@yl231
yl231 deleted the fix/meteor-penalty-cap branch September 28, 2026 20:33
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