Official Task Variations (2/2): Add arena-hard, alpaca eval and mt-bench official tasks - #109
Conversation
Package official Arena-Hard, MT-Bench, and AlpacaEval task definitions with their prompt, parser, and scoring behavior.
| } | ||
|
|
||
|
|
||
| def resolve_elo_scorer(name: str) -> EloScorer: |
There was a problem hiding this comment.
I refained from the ELO_SCORERS[x] call, because resolve_elo_scorer(x) is much cleaner and customazible
| def check_requirements() -> None: | ||
| """Fail before inference when the optional upstream scorer is unavailable.""" | ||
| try: | ||
| import alpaca_eval.metrics # noqa: F401 |
There was a problem hiding this comment.
Should we or not add this requirement (we already did with this PR). The reason: alpaca-eval already establishes most of the code for calculating the results and it is not easy, we just convert our format to theirs and get the result by calling it. Take a look at `official_annotations``
| ) | ||
|
|
||
| return { | ||
| "alpaca_eval": InstructionDatasetAdapter( |
There was a problem hiding this comment.
I did not want to reuse judgearena_tables as it has some column normalization. However I can change the adapter and re-use the existing tables if its better.
| @@ -0,0 +1,133 @@ | |||
| """Official Arena-Hard-Auto pairwise scoring. | |||
There was a problem hiding this comment.
q: this only implements upstream's non-style-controlled path (decisive verdicts weighted 3x, bootstrap resample the mean).
The official leaderboard for hard_prompt/coding/math uses the style-controlled path instead. arena-hard-v2.0-official.yaml uses this scorer for all four categories, so for three of them the result isn't consistent with the official leaderboard number.
Should we add the style-controlled BT fit for arena-hard's official variant, or relabel the yaml/scoring_details so it's explicit this reproduces the default CLI path and not the official-configuration number?
Problem
JudgeArena already supports general pairwise evaluation, but official benchmarks do not all use the same judging rules.
AlpacaEval, Arena-Hard, and MT-Bench differ in their datasets, baseline answers, prompts, answer-order rules, parsers, and scoring methods. Keeping these choices outside the task definition makes it difficult to see what a run does and easy to mix incompatible settings.
This PR adds explicit official task variants. Each variant keeps its standard settings in task YAML and selects the required prompt, parser, and scorer through the shared benchmark pipeline.
Before and after
Added tasks
alpaca-eval-2.0-officialarena-hard-v0.1-officialarena-hard-v2.0-officialmt-bench-officialHow it works
The shared pairwise runner remains responsible for generation and judging. Task-specific code is limited to the parts that are genuinely different:
Existing non-official tasks keep their current defaults and behavior. Runtime overrides are still supported where the task allows them. A run with a different judge or overridden settings remains useful, but it should not be treated as an exact reproduction of the official leaderboard.
Example
The task YAML supplies the official baseline, prompt preset, answer-order policy, judge limits, and scorer. The command only needs to choose the candidate model, judge, sample size, and output path.
Tests
The tests cover the benchmark rules that can change results:
Notes
Most of the LoC coming from the scorer implementations and prompts that are added, not the complexity of how they are added.