Dataset Viewer
Auto-converted to Parquet Duplicate
data_source
stringclasses
1 value
prompt
listlengths
1
1
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven an m x n matrix, return all elements of the matrix in spiral order.\n\n \nExample 1...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"spiral-matrix\", \"difficulty\": \"Medium\", \"entry_point\": \"spiralOrder\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, outputs, expected...
{ "index": "mercury_0", "split": "eval", "slug_name": "spiral-matrix", "difficulty": "Medium", "n_test_cases": 7, "n_solutions": 14 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a sorted unique integer array nums.\n\nA range [a,b] is the set of all inte...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"summary-ranges\", \"difficulty\": \"Easy\", \"entry_point\": \"summaryRanges\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, outputs, expecte...
{ "index": "mercury_1", "split": "eval", "slug_name": "summary-ranges", "difficulty": "Easy", "n_test_cases": 7, "n_solutions": 15 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven two strings s and t, return the number of distinct subsequences of s which equals t...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"distinct-subsequences\", \"difficulty\": \"Hard\", \"entry_point\": \"numDistinct\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, outputs, ex...
{ "index": "mercury_2", "split": "eval", "slug_name": "distinct-subsequences", "difficulty": "Hard", "n_test_cases": 7, "n_solutions": 30 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven an unsorted integer array nums, return the smallest missing positive integer.\n\nYo...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"first-missing-positive\", \"difficulty\": \"Hard\", \"entry_point\": \"firstMissingPositive\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, o...
{ "index": "mercury_3", "split": "eval", "slug_name": "first-missing-positive", "difficulty": "Hard", "n_test_cases": 18, "n_solutions": 20 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe set [1, 2, 3, ..., n] contains a total of n! unique permutations.\n\nBy listing and l...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"permutation-sequence\", \"difficulty\": \"Hard\", \"entry_point\": \"getPermutation\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, outputs, ...
{ "index": "mercury_4", "split": "eval", "slug_name": "permutation-sequence", "difficulty": "Hard", "n_test_cases": 8, "n_solutions": 20 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven a 1-indexed array of integers numbers that is already sorted in non-decreasing orde...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"two-sum-ii-input-array-is-sorted\", \"difficulty\": \"Medium\", \"entry_point\": \"twoSum\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, out...
{ "index": "mercury_5", "split": "eval", "slug_name": "two-sum-ii-input-array-is-sorted", "difficulty": "Medium", "n_test_cases": 8, "n_solutions": 20 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven a string num that contains only digits and an integer target, return all possibilit...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"expression-add-operators\", \"difficulty\": \"Hard\", \"entry_point\": \"addOperators\", \"convert_offline\": \"def convert_offline(case):\\n return case\", \"evaluate_offline\": \"def evaluate_offline(inputs, outputs...
{ "index": "mercury_6", "split": "eval", "slug_name": "expression-add-operators", "difficulty": "Hard", "n_test_cases": 8, "n_solutions": 3 }
mercury
[ { "role": "user", "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given the root of a binary tree containing digits from 0 to 9 only.\n\nEach root-...
code
{ "style": "rule", "extraction_method": "mercury_harness", "ground_truth": "{\"slug_name\": \"sum-root-to-leaf-numbers\", \"difficulty\": \"Medium\", \"entry_point\": \"sumNumbers\", \"convert_offline\": \"def convert_offline(case):\\n import lctk\\n inputs, expected = case\\n inputs = lctk.binaryTree(*i...
{ "index": "mercury_7", "split": "eval", "slug_name": "sum-root-to-leaf-numbers", "difficulty": "Medium", "n_test_cases": 7, "n_solutions": 16 }
mercury
[{"role":"user","content":"You are an expert Python programmer. You will be given a question (proble(...TRUNCATED)
code
{"style":"rule","extraction_method":"mercury_harness","ground_truth":"{\"slug_name\": \"license-key-(...TRUNCATED)
{"index":"mercury_8","split":"eval","slug_name":"license-key-formatting","difficulty":"Easy","n_test(...TRUNCATED)
mercury
[{"role":"user","content":"You are an expert Python programmer. You will be given a question (proble(...TRUNCATED)
code
{"style":"rule","extraction_method":"mercury_harness","ground_truth":"{\"slug_name\": \"gas-station\(...TRUNCATED)
{"index":"mercury_9","split":"eval","slug_name":"gas-station","difficulty":"Medium","n_test_cases":7(...TRUNCATED)
End of preview. Expand in Data Studio

Mercury (verl efficiency eval set)

The eval split of Elfsong/Mercury (arXiv 2402.07844; 256 LeetCode-style tasks; the train split ships no test cases and is not gradable), converted to the verl rule-reward schema by verl/scripts/data/mercury.py. Source license CC-BY-NC-4.0 (non-commercial) -- this conversion keeps that license.

Every row's ground truth carries the full official scoring contract: entry point, the task's convert_offline/evaluate_offline hooks (lctk linked-list / binary-tree conversions included), the materialised test cases, and the reference solution pool. All 256 rows verified at build time: at least one reference solution passes the grading harness locally.

Scoring (verl/verl/utils/reward_score/mercury.py): the extracted class Solution runs all test cases through the task's own hooks in ONE timed firejail execution, reproducing the official sandbox (github.com/Elfsong/Mercury src/sandbox.py). On a full pass, the official Beyond percentile is computed against the task's reference solutions re-executed on the same machine (cached per task); reward = 0.5*pass + 0.5*beyond. Eval recipe: verl/recipe/run_mercury_eval.sh.

Known compromises vs the official evaluator

  • At most MERCURY_MAX_REFS (default 8) of the ~18 reference solutions are measured per task, sampled evenly across the LeetCode-runtime ordering, to bound reward-time cost.
  • Beyond = clip((max_rt - rt)/(max_rt - min_rt), 0, 1) -- the paper's formula. The reference implementation clamps the numerator at 1 second before dividing (treated here as a bug).
  • Runtimes come from a single un-repeated pass (official parity); on this benchmark's small generated inputs, sub-millisecond loop times make Beyond noisy at the per-task level. Aggregate Beyond@1 over 256 tasks is stable.
  • Execution runs under firejail rlimits, not the official in-process reliability guard.
Downloads last month
23

Paper for OctoReasoner/mercury_verl