task_id stringlengths 9 23 | seed int64 0 2 | instruction stringlengths 59 431 | files listlengths 1 5 | reference_answer stringlengths 1 1.86k |
|---|---|---|---|---|
swe-fix-function@1 | 0 | lib.py is a small module of 3 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\nVALUES = {\"I\": 1, \"V\": 5, \"X\": 10, \"L\": 50, \"C\": 100, \"D\": 500, \"M\": 1000}\n\n\ndef roman_to_int(numeral):\n \"\"\"Convert a valid Roman numeral (I, V, X, L, C, D, M, with subtractive ... | """Small utility module. Each function documents its contract."""
VALUES = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
def roman_to_int(numeral):
"""Convert a valid Roman numeral (I, V, X, L, C, D, M, with subtractive pairs such as IV, IX, XL, XC, CD, CM) to an int."""
total = 0
for... |
swe-fix-function@1 | 1 | lib.py is a small module of 3 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\ndef paginate(items, page_size, page):\n \"\"\"Return the items on 1-based page `page` when items are split into pages of `page_size`. Return [] if page_size <= 0, page < 1 or the page is past the en... | """Small utility module. Each function documents its contract."""
def paginate(items, page_size, page):
"""Return the items on 1-based page `page` when items are split into pages of `page_size`. Return [] if page_size <= 0, page < 1 or the page is past the end."""
if page_size <= 0 or page < 1:
return ... |
swe-fix-function@1 | 2 | lib.py is a small module of 3 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\ndef merge_intervals(intervals):\n \"\"\"Merge overlapping or touching closed intervals given as [start, end] lists. Return a new list of [start, end] lists sorted by start. Intervals that share an e... | """Small utility module. Each function documents its contract."""
def merge_intervals(intervals):
"""Merge overlapping or touching closed intervals given as [start, end] lists. Return a new list of [start, end] lists sorted by start. Intervals that share an endpoint (e.g. [1, 3] and [3, 5]) are merged. Input may b... |
swe-fix-function@2 | 0 | lib.py is a small module of 4 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\ndef moving_average(values, k):\n \"\"\"Return the averages of every window of k consecutive values (n - k + 1 windows), each rounded to 3 decimals. Return [] if k <= 0 or k > len(values).\"\"\"\n ... | """Small utility module. Each function documents its contract."""
def moving_average(values, k):
"""Return the averages of every window of k consecutive values (n - k + 1 windows), each rounded to 3 decimals. Return [] if k <= 0 or k > len(values)."""
if k <= 0 or k > len(values):
return []
return ... |
swe-fix-function@2 | 1 | lib.py is a small module of 4 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\ndef merge_intervals(intervals):\n \"\"\"Merge overlapping or touching closed intervals given as [start, end] lists. Return a new list of [start, end] lists sorted by start. Intervals that share an e... | """Small utility module. Each function documents its contract."""
def merge_intervals(intervals):
"""Merge overlapping or touching closed intervals given as [start, end] lists. Return a new list of [start, end] lists sorted by start. Intervals that share an endpoint (e.g. [1, 3] and [3, 5]) are merged. Input may b... |
swe-fix-function@2 | 2 | lib.py is a small module of 4 functions, each documented by its docstring. Users report wrong results; test_lib.py shows one failing case, but the hidden tests check every function thoroughly. Make every function meet its docstring. Submit the complete corrected contents of lib.py as the answer. Reward 1 if every hidde... | [
{
"name": "lib.py",
"content": "\"\"\"Small utility module. Each function documents its contract.\"\"\"\n\ndef paginate(items, page_size, page):\n \"\"\"Return the items on 1-based page `page` when items are split into pages of `page_size`. Return [] if page_size <= 0, page < 1 or the page is past the en... | """Small utility module. Each function documents its contract."""
def paginate(items, page_size, page):
"""Return the items on 1-based page `page` when items are split into pages of `page_size`. Return [] if page_size <= 0, page < 1 or the page is past the end."""
if page_size <= 0 or page < 1:
return ... |
swe-implement-spec@1 | 0 | Implement paginate(items, page_size, page), parse_duration(text) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def paginate(items, page_size, page):\n raise NotImplementedError\n\n\ndef parse_duration(text):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# paginate(items, page_size, page)\n\nReturn the items on 1-based page `page` when items are s... | def paginate(items, page_size, page):
if page_size <= 0 or page < 1:
return []
start = (page - 1) * page_size
return items[start:start + page_size]
import re
UNITS = {"d": 86400, "h": 3600, "m": 60, "s": 1}
def parse_duration(text):
total = 0
for value, unit in re.findall(r"(\d+)([dhms]... |
swe-implement-spec@1 | 1 | Implement is_balanced(text), moving_average(values, k) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def is_balanced(text):\n raise NotImplementedError\n\n\ndef moving_average(values, k):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# is_balanced(text)\n\nReturn True if every bracket among (), [] and {} is closed by the matching type i... | PAIRS = {")": "(", "]": "[", "}": "{"}
def is_balanced(text):
stack = []
for ch in text:
if ch in "([{":
stack.append(ch)
elif ch in PAIRS:
if not stack or stack.pop() != PAIRS[ch]:
return False
return not stack
def moving_average(values, k):
i... |
swe-implement-spec@1 | 2 | Implement roman_to_int(numeral), moving_average(values, k) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def roman_to_int(numeral):\n raise NotImplementedError\n\n\ndef moving_average(values, k):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# roman_to_int(numeral)\n\nConvert a valid Roman numeral (I, V, X, L, C, D, M, with subtractive pair... | VALUES = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
def roman_to_int(numeral):
total = 0
for i, ch in enumerate(numeral):
value = VALUES[ch]
if i + 1 < len(numeral) and VALUES[numeral[i + 1]] > value:
total -= value
else:
total += value
... |
swe-implement-spec@2 | 0 | Implement top_k_words(text, k), paginate(items, page_size, page), is_balanced(text) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def top_k_words(text, k):\n raise NotImplementedError\n\n\ndef paginate(items, page_size, page):\n raise NotImplementedError\n\n\ndef is_balanced(text):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# top_k_words(text, k)\n\nLowercase... | import re
from collections import Counter
def top_k_words(text, k):
counts = Counter(re.findall(r"[a-z]+", text.lower()))
ranked = sorted(counts.items(), key=lambda item: (-item[1], item[0]))
return [word for word, _ in ranked[:k]]
def paginate(items, page_size, page):
if page_size <= 0 or page < 1:... |
swe-implement-spec@2 | 1 | Implement moving_average(values, k), paginate(items, page_size, page), roman_to_int(numeral) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def moving_average(values, k):\n raise NotImplementedError\n\n\ndef paginate(items, page_size, page):\n raise NotImplementedError\n\n\ndef roman_to_int(numeral):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# moving_average(values, k... | def moving_average(values, k):
if k <= 0 or k > len(values):
return []
return [round(sum(values[i:i + k]) / k, 3) for i in range(len(values) - k + 1)]
def paginate(items, page_size, page):
if page_size <= 0 or page < 1:
return []
start = (page - 1) * page_size
return items[start:st... |
swe-implement-spec@2 | 2 | Implement moving_average(values, k), rle_encode(text), roman_to_int(numeral) as described in spec.md (lib.py holds stubs). Submit the complete contents of lib.py as the answer; only the standard library is available. Reward 1 if every function passes all hidden tests, else 0. | [
{
"name": "lib.py",
"content": "def moving_average(values, k):\n raise NotImplementedError\n\n\ndef rle_encode(text):\n raise NotImplementedError\n\n\ndef roman_to_int(numeral):\n raise NotImplementedError\n"
},
{
"name": "spec.md",
"content": "# moving_average(values, k)\n\nReturn the ... | def moving_average(values, k):
if k <= 0 or k > len(values):
return []
return [round(sum(values[i:i + k]) / k, 3) for i in range(len(values) - k + 1)]
def rle_encode(text):
if not text:
return ""
out = []
current, count = text[0], 1
for ch in text[1:]:
if ch == current:... |
swe-crash-triage@1 | 0 | Running main.py crashes. Find the innermost frame where the exception is raised and the order record that triggers it. Answer format: file:line:ExceptionType:record_id (e.g. util.py:12:IndexError:ORD-1-0). Each of the four parts is worth 0.25. | [
{
"name": "billing.py",
"content": "\"\"\"Order pricing helpers.\"\"\"\n\nTAX_RATE = 0.2\n\n\ndef quantity(order):\n return int(order[\"qty\"])\n\n\ndef order_total(order):\n qty = quantity(order)\n price = unit_price(order)\n return round(qty * price - qty * pack_discount(order), 2)\n\n\ndef pa... | billing.py:34:TypeError:ORD-34921-25 |
swe-crash-triage@1 | 1 | Running main.py crashes. Find the innermost frame where the exception is raised and the order record that triggers it. Answer format: file:line:ExceptionType:record_id (e.g. util.py:12:IndexError:ORD-1-0). Each of the four parts is worth 0.25. | [
{
"name": "main.py",
"content": "import json\n\nfrom pricing import order_total\nfrom report import summarize\n\n\ndef main():\n with open(\"orders.json\") as f:\n orders = json.load(f)\n totals = [order_total(o) for o in orders]\n print(summarize(totals))\n\n\nif __name__ == \"__main__\":\n... | pricing.py:15:KeyError:ORD-10174-11 |
swe-crash-triage@1 | 2 | Running main.py crashes. Find the innermost frame where the exception is raised and the order record that triggers it. Answer format: file:line:ExceptionType:record_id (e.g. util.py:12:IndexError:ORD-1-0). Each of the four parts is worth 0.25. | [
{
"name": "costs.py",
"content": "\"\"\"Order pricing helpers.\"\"\"\n\nTAX_RATE = 0.07\n\n\ndef quantity(order):\n return int(order[\"qty\"])\n\n\ndef order_total(order):\n qty = quantity(order)\n price = unit_price(order)\n return round(qty * price - qty * pack_discount(order), 2)\n\n\ndef pac... | costs.py:17:ZeroDivisionError:ORD-41442-15 |
swe-crash-triage@2 | 0 | Running main.py crashes on the first bad order, but there are more. For every order in orders.json that order_total() would fail on by itself, give its id and the exception type it raises, as id:ExceptionType comma-separated in file order (e.g. ORD-1-0:KeyError,ORD-7-3:ValueError). | [
{
"name": "main.py",
"content": "import json\n\nfrom pricing import order_total\nfrom report import summarize\n\n\ndef main():\n with open(\"orders.json\") as f:\n orders = json.load(f)\n totals = [order_total(o) for o in orders]\n print(summarize(totals))\n\n\nif __name__ == \"__main__\":\n... | ORD-70615-11:KeyError,ORD-31455-14:ValueError,ORD-96113-19:TypeError,ORD-26751-26:ValueError |
swe-crash-triage@2 | 1 | Running main.py crashes on the first bad order, but there are more. For every order in orders.json that order_total() would fail on by itself, give its id and the exception type it raises, as id:ExceptionType comma-separated in file order (e.g. ORD-1-0:KeyError,ORD-7-3:ValueError). | [
{
"name": "billing.py",
"content": "\"\"\"Order pricing helpers.\"\"\"\n\nTAX_RATE = 0.2\n\n\ndef order_total(order):\n qty = quantity(order)\n price = unit_price(order)\n return round(qty * price - qty * pack_discount(order), 2)\n\n\ndef pack_discount(order):\n return order[\"discount_per_pack\... | ORD-81731-4:TypeError,ORD-69080-9:ValueError,ORD-49241-11:ZeroDivisionError,ORD-39362-12:KeyError,ORD-16780-15:ZeroDivisionError |
swe-crash-triage@2 | 2 | Running main.py crashes on the first bad order, but there are more. For every order in orders.json that order_total() would fail on by itself, give its id and the exception type it raises, as id:ExceptionType comma-separated in file order (e.g. ORD-1-0:KeyError,ORD-7-3:ValueError). | [
{
"name": "main.py",
"content": "import json\n\nfrom pricing import order_total\nfrom report import summarize\n\n\ndef main():\n with open(\"orders.json\") as f:\n orders = json.load(f)\n totals = [order_total(o) for o in orders]\n print(summarize(totals))\n\n\nif __name__ == \"__main__\":\n... | ORD-56108-3:ValueError,ORD-55247-11:TypeError,ORD-28471-14:KeyError,ORD-64502-19:ZeroDivisionError |
ind-vibration-alarm@1 | 0 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 9)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P1@74,P4@39 |
ind-vibration-alarm@1 | 1 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 6)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P2@100 |
ind-vibration-alarm@1 | 2 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 6)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P1@77 |
ind-vibration-alarm@2 | 0 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 7)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P7@35,P9@92 |
ind-vibration-alarm@2 | 1 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 9)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P1@27,P2@109,P6@44 |
ind-vibration-alarm@2 | 2 | sensors.csv holds per-minute pump readings; limits.txt defines the alarm rule. List every pump that alarms with the minute of its first alarm, as pump@minute comma-separated and sorted by pump number (e.g. P2@57,P5@88), or none. | [
{
"name": "limits.txt",
"content": "ALARM RULE (rev 8)\nA pump alarms when vibration_mm_s is strictly greater than its limit for its required number of consecutive readings (one reading per minute).\nThe alarm time is the minute of the last reading that completes the run. Only the first alarm per pump matte... | P4@88,P5@87 |
ind-tank-balance@1 | 0 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_63 (litres for the level), e.g. 131,4520. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 11100 L. Level at minute 0: 3425 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minu... | 211,2065 |
ind-tank-balance@1 | 1 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_30 (litres for the level), e.g. 131,4520. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 10100 L. Level at minute 0: 4315 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minu... | 102,4315 |
ind-tank-balance@1 | 2 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_45 (litres for the level), e.g. 131,4520. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 8500 L. Level at minute 0: 3185 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minut... | 154,2300 |
ind-tank-balance@2 | 0 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_123,minutes_valve_A_was_scheduled_open_but_forced_shut (litres for the level), e.g. 131,4520,7. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 11000 L. Level at minute 0: 4530 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minu... | 178,5679,6 |
ind-tank-balance@2 | 1 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_49,minutes_valve_A_was_scheduled_open_but_forced_shut (litres for the level), e.g. 131,4520,7. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 4900 L. Level at minute 0: 1395 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minut... | 51,4521,38 |
ind-tank-balance@2 | 2 | Simulate the tank in model.txt with schedule.csv. Answer overflow_minute,level_at_minute_167,minutes_valve_A_was_scheduled_open_but_forced_shut (litres for the level), e.g. 131,4520,7. Each part counts equally. | [
{
"name": "model.txt",
"content": "Tank capacity: 5900 L. Level at minute 0: 2915 L.\nMinute t covers the interval (t-1, t]. A segment with start=a and end=b is active in every minute t with a <= t <= b and moves `rate_l_per_min` litres during that minute (kind=in adds, kind=out removes).\nLevel after minut... | 219,2965,17 |
ind-oee@1 | 0 | Using definitions.txt, compute the OEE of line L1 for this shift as a percentage with one decimal (e.g. 63.4). | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,240,270\nL1,360,375\nL2,120,135\nL2,200,220\nL3,360,375\nL3,120,135\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus planned breaks (breaks.csv).... | 60.5 |
ind-oee@1 | 1 | Using definitions.txt, compute the OEE of line L4 for this shift as a percentage with one decimal (e.g. 63.4). | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,360,375\nL1,240,270\nL2,120,135\nL2,360,375\nL3,120,135\nL3,240,270\nL4,120,135\nL4,240,270\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus plan... | 44.5 |
ind-oee@1 | 2 | Using definitions.txt, compute the OEE of line L3 for this shift as a percentage with one decimal (e.g. 63.4). | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,240,270\nL1,120,135\nL2,200,220\nL2,240,270\nL3,120,135\nL3,240,270\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus planned breaks (breaks.csv).... | 60.1 |
ind-oee@2 | 0 | Using definitions.txt, find the line with the lowest OEE this shift and the plant OEE, as line,percent with one decimal (e.g. L2,61.8). Each part is worth 0.5. | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,360,375\nL1,240,270\nL2,360,375\nL2,200,220\nL3,120,135\nL3,360,375\nL4,120,135\nL4,200,220\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus plan... | L2,62.7 |
ind-oee@2 | 1 | Using definitions.txt, find the line with the lowest OEE this shift and the plant OEE, as line,percent with one decimal (e.g. L2,61.8). Each part is worth 0.5. | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,240,270\nL1,120,135\nL2,120,135\nL2,360,375\nL3,200,220\nL3,120,135\nL4,120,135\nL4,360,375\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus plan... | L3,61.7 |
ind-oee@2 | 2 | Using definitions.txt, find the line with the lowest OEE this shift and the plant OEE, as line,percent with one decimal (e.g. L2,61.8). Each part is worth 0.5. | [
{
"name": "breaks.csv",
"content": "line,start_min,end_min\nL1,120,135\nL1,200,220\nL2,200,220\nL2,240,270\nL3,360,375\nL3,240,270\n"
},
{
"name": "definitions.txt",
"content": "OEE = Availability x Performance x Quality\nPlanned production time = shift_minutes minus planned breaks (breaks.csv).... | L2,67.0 |
sci-longest-orf@1 | 0 | sequence.fasta is a DNA forward strand; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on this strand only, in any of the three frames: it starts at ATG and ends at the first in-frame stop codon. Answer its protein in one-letter code, starting with M and without the stop. | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | MSDLEGIATTCFARMYQSLSRRKTGAALTAPNTVPTVSSKNTWSLPMRLSEYYVIANAGLRRARKSSAQ |
sci-longest-orf@1 | 1 | sequence.fasta is a DNA forward strand; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on this strand only, in any of the three frames: it starts at ATG and ends at the first in-frame stop codon. Answer its protein in one-letter code, starting with M and without the stop. | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | MRAHFFRLWMQKGLVQQMYNWASQQNFISLTISCRTIRIRPTTIDVNTSSRASKQ |
sci-longest-orf@1 | 2 | sequence.fasta is a DNA forward strand; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on this strand only, in any of the three frames: it starts at ATG and ends at the first in-frame stop codon. Answer its protein in one-letter code, starting with M and without the stop. | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | MPGRTATTSQVLGGYQPPHAMLVLQHPGRDHFVAMWRSISSSPYWCQYWHTRMPQQSHTS |
sci-longest-orf@2 | 0 | sequence.fasta is one strand of a DNA molecule; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on either strand (the given strand '+' or its reverse complement '-'), any frame: it starts at ATG and ends at the first in-frame stop codon; reading frames without a stop do not co... | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | +,MCLTFKSRGLSSCMGAVVAYQAALVLPEKVIRITDHLTTAHRALRIGTHTGQLAHGAKTPGQFRDQEARAVAESLM |
sci-longest-orf@2 | 1 | sequence.fasta is one strand of a DNA molecule; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on either strand (the given strand '+' or its reverse complement '-'), any frame: it starts at ATG and ends at the first in-frame stop codon; reading frames without a stop do not co... | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | -,MSHPKSTGNSPLTGGTTQIKVPGVGRFNQRGGQGRIRMPSQLPLGWIHWGLQATRIMHLGAYKNK |
sci-longest-orf@2 | 2 | sequence.fasta is one strand of a DNA molecule; codon_table.txt maps codons to amino acids (* = stop). Find the longest open reading frame on either strand (the given strand '+' or its reverse complement '-'), any frame: it starts at ATG and ends at the first in-frame stop codon; reading frames without a stop do not co... | [
{
"name": "codon_table.txt",
"content": "AAA K\nAAC N\nAAG K\nAAT N\nACA T\nACC T\nACG T\nACT T\nAGA R\nAGC S\nAGG R\nAGT S\nATA I\nATC I\nATG M\nATT I\nCAA Q\nCAC H\nCAG Q\nCAT H\nCCA P\nCCC P\nCCG P\nCCT P\nCGA R\nCGC R\nCGG R\nCGT R\nCTA L\nCTC L\nCTG L\nCTT L\nGAA E\nGAC D\nGAG E\nGAT D\nGCA A\nGCC A\nG... | +,MNVFTDCESTMRKACNSLTWVVGFPNMAEFLDPAFVIVSILRARYFMCKEASSTLQPRWPAGLMPQYWGNLLTGIRTLTNSLYPA |
sci-limiting-reagent@1 | 0 | Using lab_notes.txt and atomic_masses.csv, identify the limiting reactant and the grams of H2O actually isolated (2 decimals). Answer formula,grams e.g. O2,12.34. Each part is worth 0.5; grams within 0.5% count. | [
{
"name": "atomic_masses.csv",
"content": "element,g_per_mol\nAl,26.982\nC,12.011\nCa,40.078\nCl,35.45\nFe,55.845\nH,1.008\nMg,24.305\nN,14.007\nNa,22.99\nO,15.999\nS,32.06\n"
},
{
"name": "lab_notes.txt",
"content": "Reaction: CaCO3 + 2 HCl -> CaCl2 + H2O + CO2\nCharged CaCO3: 201.8 g\nCharged ... | HCl,19.50 |
sci-limiting-reagent@1 | 1 | Using lab_notes.txt and atomic_masses.csv, identify the limiting reactant and the grams of CO2 actually isolated (2 decimals). Answer formula,grams e.g. O2,12.34. Each part is worth 0.5; grams within 0.5% count. | [
{
"name": "atomic_masses.csv",
"content": "element,g_per_mol\nAl,26.982\nC,12.011\nCa,40.078\nCl,35.45\nFe,55.845\nH,1.008\nMg,24.305\nN,14.007\nNa,22.99\nO,15.999\nS,32.06\n"
},
{
"name": "lab_notes.txt",
"content": "Reaction: Fe2O3 + 3 CO -> 2 Fe + 3 CO2\nCharged Fe2O3: 78.04 g\nCharged CO: 13... | Fe2O3,64.52 |
sci-limiting-reagent@1 | 2 | Using lab_notes.txt and atomic_masses.csv, identify the limiting reactant and the grams of Al2O3 actually isolated (2 decimals). Answer formula,grams e.g. O2,12.34. Each part is worth 0.5; grams within 0.5% count. | [
{
"name": "atomic_masses.csv",
"content": "element,g_per_mol\nAl,26.982\nC,12.011\nCa,40.078\nCl,35.45\nFe,55.845\nH,1.008\nMg,24.305\nN,14.007\nNa,22.99\nO,15.999\nS,32.06\n"
},
{
"name": "lab_notes.txt",
"content": "Reaction: 4 Al + 3 O2 -> 2 Al2O3\nCharged Al: 249.02 g\nCharged O2: 200.36 g\n... | O2,319.22 |
Analyst Workbench
An OpenEnv environment for training agents to investigate small, realistic workspaces and give one exact answer. It has 24 procedurally generated task families, three in each of eight domains: software engineering, industrial systems, natural science, office work, finance, math, cybersecurity, and media production.
What an episode looks like
On reset the agent gets a short brief and a private folder of files (CSV tables, logs, code, calendars, protocols, subtitles, EDLs and so on). It has 20 actions, each one JSON object:
| tool | fields | effect |
|---|---|---|
ls |
list files with line counts | |
read |
path, start, lines |
numbered lines of a file (at most 80 shown) |
grep |
pattern, optional path |
regex matches across files |
python |
code |
runs in the folder as an unprivileged user, 10 s CPU, 1 GiB; numpy and pandas installed |
submit |
answer |
ends the episode and scores the answer |
Observations are kept under about 3,000 characters, and the instruction is shown only once.
Reward
submit returns a reward in [0, 1] from a verifier that recomputes the answer from the
generated instance; nothing is judged by a model. Most tasks are all-or-nothing (exact
strings, exact sets, or numbers within a stated tolerance). Tasks that ask for two or four
separate facts give equal partial credit per correct part, which the instruction states.
Code tasks run 60 hidden test cases in the sandbox and give 1 only if all pass. Running out
of actions or sending an empty answer scores 0.
Every reset without a seed draws a new random instance, so parallel rollouts of the same
task differ. A given (task_id, seed) is fully deterministic.
Tasks
See data/tasks.jsonl for the catalog and data/samples.jsonl for five seeded instances per
task with reference answers. The code that generates and grades them is in source/.
Checks before release
- 500 seeds per task: the reference answer scores 1; empty, garbage and plausible wrong answers (for example the buggy file, an off-by-one count, the decoy IP) score below 1.
- WebSocket replay against the container: example actions end with
done: trueand reward 0, reference answers score 1, wrong answers score below 1, the action budget ends an episode at reward 0, and the python tool cannot read the task sources. openenv validate --urlpasses all six checks.
Difficulty checks with a local model
Before submitting, a weaker proxy (qwen3:14b, no thinking, temperature 0.7) played fresh
instances through the same one-JSON-object-per-turn protocol the arena uses. Version 1 had a
schema cap on read that ended episodes and five families the proxy always solved. Version 3
removes the cap (the server clamps instead) and hardens those five: two bugs spread over a
three-function module, two functions to implement, OEE with breaks and shift clipping, a loan
with a rate reset, and NPV with risk classes, start years and EUR flows. On v3 no family is
known to be always solved by the proxy; the code-repair family dropped from 4/4 to 1/8 and NPV
from 4/4 to 7/8. The proxy is weaker than the arena's model, so easier families may still
saturate there.
Version 5: difficulty levels, calibrated on the arena's own model
Every family now has a level 2 (task id suffix -l2, or @2). Level 2 adds the kinds of
traps a careful analyst still has to handle: per-pump limits with dropouts and maintenance
windows, a tank interlock, a stock split, a payment holiday, firewall chains, subtitle sync,
dissolves and speed changes, four-function code repair with three bugs, and so on.
Independent solvers that see only the agent's files agree with every level-2 verifier on
hundreds of seeds per family.
Calibration with Qwen3.8-27B (Q4 GGUF, thinking on, arena-style turns) found that, once the model gets a well-formed action out, it answers level-2 instances correctly 75 times in 76. Its failures are almost all JSON formatting of long python code. The 17 families submitted in v5 are the ones whose level-2 scores fell between 0.1 and 0.8 for the 27B; their signal is mostly about getting code into a valid JSON action, not about the analysis itself. See docs/v6_design.md for the next step.
Run it
docker run --rm -p 8000:8000 docker.io/aji28/analyst-workbench:v5
openenv validate --url http://localhost:8000
Reset with {"task_id": "fin-loan-balance"} (optionally "seed") over /ws, then send
actions such as {"tool": "python", "code": "print(open('loan.txt').read())"}.
- Downloads last month
- 10