IMO-ProofBench / README.md
Agent Manager
Make IMO-ProofBench verifier Harbor-native with QED-Nano rubric LLM judge
706935f
|
Raw History Blame Contribute Delete
5.27 kB
metadata
license: apache-2.0
tags:
  - library:harbor
  - harbor
  - math
  - proofs
  - evaluation
  - agent-environment

IMO-ProofBench: Harbor tasks

60 natural-language mathematical proof tasks adapted from Google DeepMind's IMO-ProofBench v2, part of IMO-Bench. The data is from Towards Robust Mathematical Reasoning (Luong et al., EMNLP 2025). We convert each source row into a Harbor task and retain the original problem, reference solution and grading guidelines. No GradingBench rows are included. Copyright 2025 Google LLC. Upstream software is Apache-2.0; its other materials, including benchmark content, are CC BY 4.0. The dataset card's Apache license tag refers to software; benchmark content remains CC BY 4.0. See upstream license and citation.

The rubric prompt (tests/proofbench_prompt.txt) and adapted self-evaluation cleanup / <points> parser in tests/grade_task.py are derived from CMU-AIRe/QED-Nano under the Apache License 2.0 (see LICENSE and NOTICE).

Category Basic Advanced Total
Algebra 8 8 16
Combinatorics 8 8 16
Geometry 6 8 14
Number theory 8 6 14
Total 30 30 60

Basic and Advanced are the groups in the problem IDs. The source Level is a separate difficulty label, retained as difficulty in references and manifests. Basic includes 8 pre-IMO, 14 IMO-easy, 8 IMO-medium; Advanced includes 10 each IMO-easy, IMO-medium and IMO-hard.

Running and grading

Each tasks/<task_id> is a Harbor 1.4 task (tested with Harbor 0.25.0) containing an instruction, a reference oracle, and a Harbor-native LLM-judged verifier.

  • Agent phase: network-isolated ([agent].network_mode = "allowlist" with no allowed hosts). The solver writes /app/proof.md using its own reasoning and local tools without web lookups or external models. Harbor collects artifacts = ["/app/proof.md"] after the agent finishes.
  • Verifier phase: runs in a dedicated container ([verifier].environment_mode = "separate") with network_mode = "allowlist" and allowed_hosts = ["router.huggingface.co"], so the agent can never inspect or tamper with verifier credentials and harbor jobs regrade works directly on collected artifacts.
  • Structural validation: tests/grade_task.py reads /app/proof.md as a regular single-link UTF-8 file of at most 200,000 bytes (rejecting symlinks, hard links, and special files) with at least 20 non-whitespace characters. Missing, invalid, or empty proofs receive reward.json = {"reward": 0.0, "points": 0} and judgment.json with exit code 0.
  • LLM rubric judging: Structurally valid proofs are stripped of self-evaluation headings (remove_self_evaluation), formatted with QED-Nano's verbatim tests/proofbench_prompt.txt rubric against tests/reference.json, and graded by an OpenAI-compatible chat completions endpoint using Python stdlib urllib.request with bounded retries. The judge returns a discrete IMO score points ∈ {0, 1, 6, 7} in <points>N out of 7</points>. The verifier writes:
    • /logs/verifier/reward.json: {"reward": round(points / 7.0, 6), "points": points}
    • /logs/verifier/judgment.json: full diagnostic record (judge model, base URL, parsed points, raw judge output, structural check)
  • Fail-loud on judge/infra errors: If no API key is configured, the HTTP request fails after retries, or the judge output fails <points> parsing, the verifier writes error diagnostics to judgment.json and stderr, writes no reward.json, and exits non-zero so Harbor records a verifier error instead of a false 0.

Verifier environment variables

Configured under [verifier.env] in each task.toml:

Variable Default Purpose
HF_INFERENCE_TOKEN (empty) Hugging Face Router bearer token (used when JUDGE_API_KEY is unset)
JUDGE_API_KEY (empty) Explicit API key override (takes precedence over HF_INFERENCE_TOKEN)
JUDGE_MODEL moonshotai/Kimi-K3.1-Pro Judge model passed to /chat/completions
JUDGE_BASE_URL https://router.huggingface.co/v1 OpenAI-compatible judge API base URL (must match allowed_hosts when allowlisted)

For local testing of tests/test.sh, PROOF and VERIFIER_DIR override /app/proof.md and /logs/verifier.

tasks/manifest.json indexes all tasks; subsets/basic_tasks.jsonl, advanced_tasks.jsonl, and all_tasks.jsonl index 30, 30, and 60 tasks respectively.

For judge calibration, upstream gradingbench.csv contains 1,000 examples with columns Grading ID, Problem ID, Problem, Solution, Grading guidelines, Response, Points, Reward, and Problem Source. It is separate from this dataset and is not included as proof tasks.