Skip to content

Merge the two LLM-judge implementations into one judge base #486

Closed

Description

@gregorybchris

olmo-eval has two LLM-judge implementations. Each does part of the job well. We should merge them into one judge base that every judged task builds on, and set a standard for what judged tasks must support.

This comes from @mgmorgan23's review of #475, which was non-blocking:

I think we should look at merging llm_judge.py and judge.py. There's some larger differences in implementation method, but I think we will probably want a strong base judge class-type that can serve all of the purposes the two do. In general, the judge.py scoring storage is neater I think, but the llm_judge.py has more flexible types of judges. Merging would also let us merge some of the metrics (subset accuracy and parsing errors specifically), and set a standard for what llm judge tasks should be required to support.

The two implementations today

common/scorers/llm_judge.py evals/tasks/common/judge.py (added in #475)
Shape LLMJudgeScorer, a ContextScorer that metrics instantiate JudgedTask, a Task base that judges in score_responses
Judge kinds OpenAI judge_fn, or a provider in the inference pool. That includes a local WildGuard chat judge and StrongReject's logprob judge over fixed choices. OpenAI judge_fn only
Judge settings in the hash judge_fn.judge_config, serialized by LLMJudgeScorer.to_dict TaskConfig.judge_model / judge_reasoning_effort / judge_max_tokens
OLMO_EVAL_JUDGE override Read by build_default_judge_fn Applied in JudgedTask.__init__ when the judge is still the task default
Retries None in the scorer API retries plus re-asking on unparseable replies
Judge failure Scored 0.0 with a scoring error that is not marked as infrastructure Recorded as an incomplete score, left out of the metrics, and the run is flagged incomplete
Concurrency The task base's per-call context semaphore One judge limiter for the whole run, kept on the scoring context
Per-output records Varies by scorer. Safety writes judge_result on the instance. judge_result and score:<key> on each output, through _record_judgement
Metrics SubsetAccuracyMetric, MacroSubsetAccuracyMetric, SafetyErrorMetric (scorer channel, missing scores count as 0) JudgedScoreMetric, JudgedMacroScoreMetric, TruncationRateMetric (task score key, unjudged instances left out)
Users Safety suite (safety_base, strongreject), simpleqa:judge, omniscience. RubricJudgeScorer has no users. hle:text, hle:text:verified, multichallenge

Other judges sit outside both implementations:

  • FrontierScience (frontierscience.py) keeps its own copy of the JudgedTask orchestration. It differs on purpose: an unparseable reply scores 0.0 and stays in the denominator.
  • Attributed-QA tasks (expertqa, astabench_sqa, researchqa, citation_validation) call build_default_judge_fn or build_openai_judge_fn directly from their own score_responses.
  • Vision judges (evals/vision/scoring/judges.py, image_qa.py) have their own OpenAI client, cache, and retry code (_cached_gpt_call, _charxiv_chat_json).

Proposal

One judge base that combines the strengths of both:

  1. Judge backends behind one interface: an OpenAI-compatible API, an inference-pool provider (chat or completion), and logprobs over fixed choices. This is what llm_judge.py supports today.
  2. Judge settings in one place in the hash, and one rule for OLMO_EVAL_JUDGE. Today there are two mechanisms, and they handle the override differently.
  3. One failure policy, with documented opt-outs. Retry API errors and unparseable replies, record what is still unjudged as incomplete, and leave it out of the score. FrontierScience's "score 0 and keep in denominator" becomes an explicit option, not a copy of the code.
  4. judge.py's storage convention: judge_result, the raw replies, and score:<key> on each output, with a configurable score key and display unit.
  5. Merged metrics. One subset metric and one macro metric that leave unjudged instances out. SafetyErrorMetric becomes a general judge-parse-error metric.
  6. A written contract for what a judged task must provide and report.

Known issues to fold in

These were deferred from #475:

  • OLMO_EVAL_JUDGE changes the judge model of every judged task but keeps each task's judge_max_tokens. A high-effort reasoning judge can spend MultiChallenge's 4096-token budget before giving a verdict.
  • An explicit -o judge_model=<the task default> loses to OLMO_EVAL_JUDGE, because the override is detected by comparing against the default.
  • A judge API failure is reported as "failed due to sandbox infrastructure", since the runner's incomplete message assumes sandbox failures. Mark unavailable sandbox scoring incomplete #469 pins that wording in tests.
  • judge_scorer_name on a JudgedTask has to be kept in sync with its metrics' scorer by hand.

Constraints

  • Existing tasks keep their task hashes, or the change is called out per task. Changing a hash makes stored results incomparable. Add MultiChallenge and share judge orchestration with HLE #475 kept HLE's hash by keeping its metric class names and checking config.to_dict() before and after.
  • Migrate one task family per PR. Suggested order: HLE and MultiChallenge (already on JudgedTask), then SimpleQA and Omniscience, then FrontierScience, then the safety suite (the provider and logprob judges), then the attributed-QA and vision judges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions