Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    CastError
Message:      Couldn't cast
family: string
verbose: string
meta: string
scoring: string
shorthand: string
compress_rejects: list<item: struct<candidate: string, problems: list<item: string>>>
  child 0, item: struct<candidate: string, problems: list<item: string>>
      child 0, candidate: string
      child 1, problems: list<item: string>
          child 0, item: string
roundtrip_ok: bool
roundtrip_violations: list<item: string>
  child 0, item: string
ground_truth: string
source: string
split: string
to
{'family': Value('string'), 'verbose': Value('string'), 'meta': Json(decode=True), 'scoring': Value('string'), 'shorthand': Value('string'), 'compress_rejects': List({'candidate': Value('string'), 'problems': List(Value('string'))}), 'roundtrip_ok': Value('bool'), 'roundtrip_violations': List(Value('string')), 'ground_truth': Json(decode=True)}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1827, in _prepare_split_single
                  for key, table in generator:
                                    ^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
                  for item in generator(*args, **kwargs):
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              family: string
              verbose: string
              meta: string
              scoring: string
              shorthand: string
              compress_rejects: list<item: struct<candidate: string, problems: list<item: string>>>
                child 0, item: struct<candidate: string, problems: list<item: string>>
                    child 0, candidate: string
                    child 1, problems: list<item: string>
                        child 0, item: string
              roundtrip_ok: bool
              roundtrip_violations: list<item: string>
                child 0, item: string
              ground_truth: string
              source: string
              split: string
              to
              {'family': Value('string'), 'verbose': Value('string'), 'meta': Json(decode=True), 'scoring': Value('string'), 'shorthand': Value('string'), 'compress_rejects': List({'candidate': Value('string'), 'problems': List(Value('string'))}), 'roundtrip_ok': Value('bool'), 'roundtrip_violations': List(Value('string')), 'ground_truth': Json(decode=True)}
              because column names don't match
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1880, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

family
string
verbose
string
meta
unknown
scoring
string
shorthand
string
compress_rejects
list
roundtrip_ok
bool
roundtrip_violations
list
ground_truth
unknown
handoff
Task: Summarize the sales report located at /data/sales/q313.csv. Focus on anomalies, flag any entry that declined more than 20%, and produce a bullet list. Keep it under 500 words.
{ "path": "/data/sales/q313.csv", "threshold": 20, "max_words": 500, "fmt": "bullet list", "focus": "anomalies" }
criteria
<goal>summarize /data/sales/q313.csv <step>focus anomalies; flag entry decline >20% <out>bullet list, <=500w
[]
true
[]
null
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>parse_date in mod.py: naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-66723", "status": "ok", "amount": 1393.19, "region": "APAC"}, {"id": "ord-39984", "status": "ok", "amount": 1803.35, "region": "EU"}, {"id": "ord-12925", "status": "ok", "amount": 1300.84, "region": "EU"}, {"id": "ord-59965", "status": "pending", "amount":...
{ "rows": [ { "id": "ord-66723", "status": "ok", "amount": 1393.19, "region": "APAC" }, { "id": "ord-39984", "status": "ok", "amount": 1803.35, "region": "EU" }, { "id": "ord-12925", "status": "ok", "amount": 1300.84, "region"...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/billing-api/records -> [{"id": "ord-66723", "status": "ok", "amount": 1393.19, "region": "APAC"}, {"id": "ord-39984", "status": "ok", "amount": 1803.35, "region": "EU"}, {"id": "ord-12925", "status": "ok", "amount": 1300.84, "region": "EU"}, {"id": "ord...
[ { "candidate": "<goal>sum total amount where status='ok'; list failed ids <fact>GET /v2/billing-api/records <field>id <val>\"ord-66723\",\"ord-39984\",\"ord-12925\",\"ord-59965\",\"ord-79157\",\"ord-82464\" <field>status <val>\"ok\",\"ok\",\"ok\",\"pending\",\"pending\",\"pending\" <field>amount <val>1393.19,18...
true
[]
{ "ok_total": 4497.38, "failed_ids": [] }
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>parse_date in mod.py: naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-94186", "status": "ok", "amount": 375.88, "region": "APAC"}, {"id": "ord-25845", "status": "failed", "amount": 1791.67, "region": "LATAM"}, {"id": "ord-76547", "status": "pending", "amount": 610.22, "region": "LATAM"}, {"id": "ord-76228", "status": "retry",...
{ "rows": [ { "id": "ord-94186", "status": "ok", "amount": 375.88, "region": "APAC" }, { "id": "ord-25845", "status": "failed", "amount": 1791.67, "region": "LATAM" }, { "id": "ord-76547", "status": "pending", "amount": 610.22, ...
programmatic
<goal>report total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>"ord-94186","ord-25845","ord-76547","ord-76228","ord-72944","ord-64304","ord-21333" <field>status <val>"ok","failed","pending","retry","pending","pending","retry" <field>amount <val>375.88,1791.67,610.22,1180.06,1488....
[ { "candidate": "<goal>report total amount for status 'ok'; list failed ids <fact>GET /v2/orders-api/records <calc>status='ok' amount sum: 375.88 <ans>375.88 <out>failed ids: ord-25845", "problems": [ "missing numbers: ['1180.06', '1329.2', '1488.74', '1791.67', '21333', '610.22', '64304', '72944', '73...
true
[]
{ "ok_total": 375.88, "failed_ids": [ "ord-25845" ] }
cot_math
Problem: 442 candies are split equally into 17 jars, then 2 candies are added to each jar. How many candies per jar now? Let me solve this step by step. First, 442 / 17 = 26. Then, 26 + 2 = 28. Therefore the final answer is 28.
{ "question": "442 candies are split equally into 17 jars, then 2 candies are added to each jar. How many candies per jar now?", "steps": [ "442 / 17 = 26", "26 + 2 = 28" ] }
exact_match
<calc>442 / 17 = 26 <calc>26 + 2 = 28 <ans>28
[]
true
[]
{ "answer": 28 }
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-90584", "status": "retry", "amount": 1296.08, "region": "US"}, {"id": "ord-75829", "status": "pending", "amount": 1964.24, "region": "US"}, {"id": "ord-80728", "status": "pending", "amount": 811.89, "region": "APAC"}, {"id": "ord-85732", "status": "failed", "a...
{ "rows": [ { "id": "ord-90584", "status": "retry", "amount": 1296.08, "region": "US" }, { "id": "ord-75829", "status": "pending", "amount": 1964.24, "region": "US" }, { "id": "ord-80728", "status": "pending", "amount": 811.89, ...
programmatic
<goal>report total amount status 'ok'; list failed ids <fact>GET /v2/crm-api/records <val>[{"id": "ord-90584", "status": "retry", "amount": 1296.08, "region": "US"}, {"id": "ord-75829", "status": "pending", "amount": 1964.24, "region": "US"}, {"id": "ord-80728", "status": "pending", "amount": 811.89, "region": "APAC"},...
[ { "candidate": "<goal>sum amounts status='ok'; list failed ids <fact>GET /v2/crm-api/records <check>status='ok' -> id:\"ord-96404\", amount:770.46 <check>status='failed' -> id:\"ord-85732\" <calc>770.46 <ans>total:770.46; failed:[\"ord-85732\"]", "problems": [ "missing numbers: ['1296.08', '1964.24', ...
true
[]
{ "ok_total": 770.46, "failed_ids": [ "ord-85732" ] }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mean_positive mod.py: divides by full list len; crashes on empty <fix>divide by positive count; return 0 if empty <test>add unit test for empty input
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-73058", "status": "failed", "amount": 1142.15, "region": "US"}, {"id": "ord-76154", "status": "retry", "amount": 972.43, "region": "APAC"}, {"id": "ord-64319", "status": "failed", "amount": 8.16, "region": "APAC"}]. Report the total amount for records with...
{ "rows": [ { "id": "ord-73058", "status": "failed", "amount": 1142.15, "region": "US" }, { "id": "ord-76154", "status": "retry", "amount": 972.43, "region": "APAC" }, { "id": "ord-64319", "status": "failed", "amount": 8.16, "...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/billing-api/records -> [{"id": "ord-73058", "status": "failed", "amount": 1142.15, "region": "US"}, {"id": "ord-76154", "status": "retry", "amount": 972.43, "region": "APAC"}, {"id": "ord-64319", "status": "failed", "amount": 8.16, "region": "APAC"}] <c...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-64319", "ord-73058" ] }
cot_math
Problem: A warehouse has 14 crates, each holding 19 boxes. An extra 11 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 14 crates x 19 boxes = 266 boxes. Then, 266 + 11 = 277. Therefore the final answer is 277.
{ "question": "A warehouse has 14 crates, each holding 19 boxes. An extra 11 boxes are loose. How many boxes are there in total?", "steps": [ "14 crates x 19 boxes = 266 boxes", "266 + 11 = 277" ] }
exact_match
<calc>14*19=266 <calc>266+11=277 <ans>277
[]
true
[]
{ "answer": 277 }
handoff
Task: Summarize the sales report located at /data/sales/q311.csv. Focus on anomalies, flag any entry that declined more than 5%, and produce a markdown table. Keep it under 200 words.
{ "path": "/data/sales/q311.csv", "threshold": 5, "max_words": 200, "fmt": "markdown table", "focus": "anomalies" }
criteria
<goal>summarize /data/sales/q311.csv <step>focus anomalies; flag entry decline >5% <out>md table, <=200w
[]
true
[]
null
handoff
Task: Summarize the logistics report located at /data/logistics/q218.csv. Focus on top-5 categories, flag any entry that declined more than 5%, and produce a bullet list. Keep it under 300 words.
{ "path": "/data/logistics/q218.csv", "threshold": 5, "max_words": 300, "fmt": "bullet list", "focus": "top-5 categories" }
criteria
<goal>summarize /data/logistics/q218.csv <step>top-5 categories; flag entry decline >5% <out>bullet list, <=300w
[]
true
[]
null
handoff
Task: Summarize the inventory report located at /data/inventory/q315.csv. Focus on top-5 categories, flag any entry that declined more than 15%, and produce a bullet list. Keep it under 400 words.
{ "path": "/data/inventory/q315.csv", "threshold": 15, "max_words": 400, "fmt": "bullet list", "focus": "top-5 categories" }
criteria
<goal>summarize /data/inventory/q315.csv <step>top-5 categories; flag entry decline >15% <out>bullet list, <=400w
[]
true
[]
null
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-13097", "status": "failed", "amount": 776.18, "region": "LATAM"}, {"id": "ord-34646", "status": "failed", "amount": 221.98, "region": "US"}, {"id": "ord-89383", "status": "retry", "amount": 1634.99, "region": "EU"}]. Report the total amount for records with...
{ "rows": [ { "id": "ord-13097", "status": "failed", "amount": 776.18, "region": "LATAM" }, { "id": "ord-34646", "status": "failed", "amount": 221.98, "region": "US" }, { "id": "ord-89383", "status": "retry", "amount": 1634.99, ...
programmatic
<goal>sum total amount status='ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-13097", "status": "failed", "amount": 776.18, "region": "LATAM"}, {"id": "ord-34646", "status": "failed", "amount": 221.98, "region": "US"}, {"id": "ord-89383", "status": "retry", "amount": 1634.99, "region": "EU"}] <ca...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-13097", "ord-34646" ] }
handoff
Task: Summarize the inventory report located at /data/inventory/q115.csv. Focus on monthly trend, flag any entry that declined more than 20%, and produce a CSV. Keep it under 500 words.
{ "path": "/data/inventory/q115.csv", "threshold": 20, "max_words": 500, "fmt": "CSV", "focus": "monthly trend" }
criteria
<goal>summarize /data/inventory/q115.csv <step>monthly trend; flag entry decline >20% <out>CSV, <=500w
[]
true
[]
null
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>last_n in mod.py slices items[:n] <fix>slice items[-n:]; handle n==0 <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
handoff
Task: Summarize the sales report located at /data/sales/q420.csv. Focus on top-5 categories, flag any entry that declined more than 20%, and produce a CSV. Keep it under 200 words.
{ "path": "/data/sales/q420.csv", "threshold": 20, "max_words": 200, "fmt": "CSV", "focus": "top-5 categories" }
criteria
<goal>summarize /data/sales/q420.csv <step>top-5 categories; flag entry decline >20% <out>CSV, <=200w
[]
true
[]
null
handoff
Task: Summarize the inventory report located at /data/inventory/q119.csv. Focus on top-5 categories, flag any entry that declined more than 5%, and produce a bullet list. Keep it under 200 words.
{ "path": "/data/inventory/q119.csv", "threshold": 5, "max_words": 200, "fmt": "bullet list", "focus": "top-5 categories" }
criteria
<goal>summarize /data/inventory/q119.csv <step>top-5 categories; flag entry decline >5% <out>bullet list, <=200w
[]
true
[]
null
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>mod.py last_n slices items[:n] vs last n <fix>slice items[-n:]; handle n==0 <test>unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
cot_math
Problem: A warehouse has 3 crates, each holding 19 boxes. An extra 15 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 3 crates x 19 boxes = 57 boxes. Then, 57 + 15 = 72. Therefore the final answer is 72.
{ "question": "A warehouse has 3 crates, each holding 19 boxes. An extra 15 boxes are loose. How many boxes are there in total?", "steps": [ "3 crates x 19 boxes = 57 boxes", "57 + 15 = 72" ] }
exact_match
<calc>3*19=57; 57+15=72 <ans>72
[]
true
[]
{ "answer": 72 }
handoff
Task: Summarize the inventory report located at /data/inventory/q415.csv. Focus on top-5 categories, flag any entry that declined more than 5%, and produce a markdown table. Keep it under 500 words.
{ "path": "/data/inventory/q415.csv", "threshold": 5, "max_words": 500, "fmt": "markdown table", "focus": "top-5 categories" }
criteria
<goal>summarize /data/inventory/q415.csv <step>top-5 categories; flag entry decline >5% <out>md table, <=500w
[]
true
[]
null
handoff
Task: Summarize the hr report located at /data/hr/q416.csv. Focus on anomalies, flag any entry that declined more than 20%, and produce a CSV. Keep it under 200 words.
{ "path": "/data/hr/q416.csv", "threshold": 20, "max_words": 200, "fmt": "CSV", "focus": "anomalies" }
criteria
<goal>summarize /data/hr/q416.csv <step>focus anomalies; flag entry decline >20% <out>CSV, <=200w
[]
true
[]
null
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-12254", "status": "failed", "amount": 1226.2, "region": "LATAM"}, {"id": "ord-46877", "status": "ok", "amount": 318.15, "region": "APAC"}, {"id": "ord-83838", "status": "pending", "amount": 681.5, "region": "US"}, {"id": "ord-44935", "status": "ok", "amount...
{ "rows": [ { "id": "ord-12254", "status": "failed", "amount": 1226.2, "region": "LATAM" }, { "id": "ord-46877", "status": "ok", "amount": 318.15, "region": "APAC" }, { "id": "ord-83838", "status": "pending", "amount": 681.5, ...
programmatic
<goal>report total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-12254", "status": "failed", "amount": 1226.2, "region": "LATAM"}, {"id": "ord-46877", "status": "ok", "amount": 318.15, "region": "APAC"}, {"id": "ord-83838", "status": "pending", "amount": 681.5, "region": "US"}, {"...
[ { "candidate": "<goal>calc total amount for status 'ok'; list failed ids <field>status <val>'ok' <calc>318.15 + 1676.21 + 173.94 = 2168.3 <field>status <val>'failed' <ans>ord-12254", "problems": [ "missing numbers: ['1226.2', '1537.06', '18561', '44935', '46877', '681.5', '80035', '83838']", "mi...
false
[ "missing numbers: ['1226.2', '1537.06', '1676.21', '173.94', '18561', '318.15', '44935', '46877', '681.5', '80035', '83838']", "missing path (basename): /v2/orders-api/records", "missing quoted: 'region'", "missing quoted: 'LATAM'", "missing quoted: 'ord-46877'", "missing quoted: 'region'", "missing quo...
{ "ok_total": 2168.3, "failed_ids": [ "ord-12254" ] }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mod.py:mean_positive divides by full list len; crashes on empty input <fix>divide by count of positives; return 0 for empty input <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-88670", "status": "failed", "amount": 739.38, "region": "APAC"}, {"id": "ord-24930", "status": "failed", "amount": 474.2, "region": "LATAM"}, {"id": "ord-27740", "status": "ok", "amount": 644.85, "region": "LATAM"}, {"id": "ord-19593", "status": "retry", "a...
{ "rows": [ { "id": "ord-88670", "status": "failed", "amount": 739.38, "region": "APAC" }, { "id": "ord-24930", "status": "failed", "amount": 474.2, "region": "LATAM" }, { "id": "ord-27740", "status": "ok", "amount": 644.85, "...
programmatic
<goal>report total amount for status 'ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-88670", "status": "failed", "amount": 739.38, "region": "APAC"}, {"id": "ord-24930", "status": "failed", "amount": 474.2, "region": "LATAM"}, {"id": "ord-27740", "status": "ok", "amount": 644.85, "region": "LATAM...
[ { "candidate": "<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/orders-api/records <field>status <val>'ok' <calc>644.85 <ans>644.85 <field>status <val>'failed' <list>ord-88670, ord-24930, ord-26386", "problems": [ "unknown slot <list>", "missing numbers: ['1733.01', '19593', '...
true
[]
{ "ok_total": 644.85, "failed_ids": [ "ord-24930", "ord-26386", "ord-88670" ] }
cot_math
Problem: A warehouse has 39 crates, each holding 4 boxes. An extra 6 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 39 crates x 4 boxes = 156 boxes. Then, 156 + 6 = 162. Therefore the final answer is 162.
{ "question": "A warehouse has 39 crates, each holding 4 boxes. An extra 6 boxes are loose. How many boxes are there in total?", "steps": [ "39 crates x 4 boxes = 156 boxes", "156 + 6 = 162" ] }
exact_match
<calc>39*4=156 <calc>156+6=162 <ans>162
[]
true
[]
{ "answer": 162 }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-83983", "status": "ok", "amount": 918.25, "region": "APAC"}, {"id": "ord-24120", "status": "ok", "amount": 1656.4, "region": "EU"}, {"id": "ord-90435", "status": "ok", "amount": 187.91, "region": "EU"}, {"id": "ord-15245", "status": "pending", "amount": 483...
{ "rows": [ { "id": "ord-83983", "status": "ok", "amount": 918.25, "region": "APAC" }, { "id": "ord-24120", "status": "ok", "amount": 1656.4, "region": "EU" }, { "id": "ord-90435", "status": "ok", "amount": 187.91, "region": "...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>"ord-83983","ord-24120","ord-90435","ord-15245","ord-31236" <field>status <val>"ok","ok","ok","pending","ok" <field>amount <val>918.25,1656.4,187.91,483.07,904.56 <field>region <val>"APAC","EU","EU","LATAM","US" <calc>s...
[]
true
[]
{ "ok_total": 3667.12, "failed_ids": [] }
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>mod.py parse_date uses naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-81162", "status": "failed", "amount": 1102.67, "region": "LATAM"}, {"id": "ord-51216", "status": "ok", "amount": 419.19, "region": "APAC"}, {"id": "ord-15193", "status": "ok", "amount": 25.96, "region": "APAC"}, {"id": "ord-88193", "status": "failed", "amount"...
{ "rows": [ { "id": "ord-81162", "status": "failed", "amount": 1102.67, "region": "LATAM" }, { "id": "ord-51216", "status": "ok", "amount": 419.19, "region": "APAC" }, { "id": "ord-15193", "status": "ok", "amount": 25.96, "reg...
programmatic
<goal>sum total amount status='ok'; list failed ids <fact>GET /v2/crm-api/records <val>"ord-81162" status:"failed" amount:1102.67 region:"LATAM" <val>"ord-51216" status:"ok" amount:419.19 region:"APAC" <val>"ord-15193" status:"ok" amount:25.96 region:"APAC" <val>"ord-88193" status:"failed" amount:902.44 region:"APAC" <...
[]
true
[]
{ "ok_total": 578.21, "failed_ids": [ "ord-81162", "ord-88193" ] }
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>last_n mod.py slices items[:n] <fix>slice items[-n:]; handle n==0 <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
cot_math
Problem: 266 candies are split equally into 19 jars, then 5 candies are added to each jar. How many candies per jar now? Let me solve this step by step. First, 266 / 19 = 14. Then, 14 + 5 = 19. Therefore the final answer is 19.
{ "question": "266 candies are split equally into 19 jars, then 5 candies are added to each jar. How many candies per jar now?", "steps": [ "266 / 19 = 14", "14 + 5 = 19" ] }
exact_match
<calc>266 / 19 = 14 <calc>14 + 5 = 19 <ans>19
[]
true
[]
{ "answer": 19 }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-57246", "status": "ok", "amount": 1640.85, "region": "EU"}, {"id": "ord-68707", "status": "ok", "amount": 1305.76, "region": "APAC"}, {"id": "ord-39809", "status": "retry", "amount": 1933.36, "region": "EU"}, {"id": "ord-52892", "status": "pending", "amount...
{ "rows": [ { "id": "ord-57246", "status": "ok", "amount": 1640.85, "region": "EU" }, { "id": "ord-68707", "status": "ok", "amount": 1305.76, "region": "APAC" }, { "id": "ord-39809", "status": "retry", "amount": 1933.36, "regi...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records <val>{"id": "ord-57246", "status": "ok", "amount": 1640.85, "region": "EU"}</val> <val>{"id": "ord-68707", "status": "ok", "amount": 1305.76, "region": "APAC"}</val> <val>{"id": "ord-39809", "status": "retry", "amount": 1933.36, "regi...
[]
true
[]
{ "ok_total": 2946.61, "failed_ids": [] }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-90136", "status": "ok", "amount": 493.97, "region": "EU"}, {"id": "ord-41950", "status": "retry", "amount": 149.29, "region": "EU"}, {"id": "ord-19847", "status": "ok", "amount": 1272.59, "region": "APAC"}, {"id": "ord-57079", "status": "retry", "amount": 9...
{ "rows": [ { "id": "ord-90136", "status": "ok", "amount": 493.97, "region": "EU" }, { "id": "ord-41950", "status": "retry", "amount": 149.29, "region": "EU" }, { "id": "ord-19847", "status": "ok", "amount": 1272.59, "region":...
programmatic
<goal>report total amount for status 'ok'; list failed ids <fact>GET /v2/orders-api/records: [{"id": "ord-90136", "status": "ok", "amount": 493.97, "region": "EU"}, {"id": "ord-41950", "status": "retry", "amount": 149.29, "region": "EU"}, {"id": "ord-19847", "status": "ok", "amount": 1272.59, "region": "APAC"}, {"id": ...
[ { "candidate": "<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>\"ord-90136\",\"ord-41950\",\"ord-19847\",\"ord-57079\",\"ord-23229\",\"ord-33536\",\"ord-50058\" <field>status <val>\"ok\",\"retry\",\"ok\",\"retry\",\"failed\",\"pending\",\"ok\" <field>amount ...
true
[]
{ "ok_total": 3186.66, "failed_ids": [ "ord-23229" ] }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mod.py:mean_positive divides by full list len; crashes on empty input <fix>divide by count of positives; return 0 for empty input <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
cot_math
Problem: A printer produces 130 pages in 26 hours. How many pages in 7 hours at the same rate? Let me solve this step by step. First, rate = 130 / 26 = 5 pages/h. Then, 5 x 7 = 35. Therefore the final answer is 35.
{ "question": "A printer produces 130 pages in 26 hours. How many pages in 7 hours at the same rate?", "steps": [ "rate = 130 / 26 = 5 pages/h", "5 x 7 = 35" ] }
exact_match
<goal>calc pages in 7h @ same rate <fact>130 pages, 26h <calc>rate = 130 / 26 = 5 pages/h <calc>5 x 7 = 35 <ans>35
[ { "candidate": "<calc>rate=130/26=5 <calc>5x7=35 <ans>35", "problems": [ "missing numbers: ['7']", "missing path (basename): pages/h." ] } ]
true
[]
{ "answer": 35 }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mod.py:mean_positive divides by full list len; crashes on empty input <fix>divide by count of positives; return 0 for empty input <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
handoff
Task: Summarize the support report located at /data/support/q211.csv. Focus on anomalies, flag any entry that declined more than 10%, and produce a markdown table. Keep it under 400 words.
{ "path": "/data/support/q211.csv", "threshold": 10, "max_words": 400, "fmt": "markdown table", "focus": "anomalies" }
criteria
<goal>summarize /data/support/q211.csv <step>focus anomalies; flag entry decline >10% <out>md table, <=400w
[]
true
[]
null
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>mod.py:clamp ignores upper bound <fix>wrap w/ min() <test>add unit test for failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
cot_math
Problem: A printer produces 64 pages in 2 hours. How many pages in 8 hours at the same rate? Let me solve this step by step. First, rate = 64 / 2 = 32 pages/h. Then, 32 x 8 = 256. Therefore the final answer is 256.
{ "question": "A printer produces 64 pages in 2 hours. How many pages in 8 hours at the same rate?", "steps": [ "rate = 64 / 2 = 32 pages/h", "32 x 8 = 256" ] }
exact_match
<calc>rate=64/2=32pg/h <calc>32*8=256 <ans>256
[]
true
[]
{ "answer": 256 }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mean_positive in mod.py divides by full list len; crashes on empty input <fix>divide by count of positives; return 0 for empty input <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-94730", "status": "retry", "amount": 1952.74, "region": "EU"}, {"id": "ord-18168", "status": "failed", "amount": 1162.24, "region": "US"}, {"id": "ord-28152", "status": "failed", "amount": 1966.52, "region": "APAC"}]. Report the total amount for records wi...
{ "rows": [ { "id": "ord-94730", "status": "retry", "amount": 1952.74, "region": "EU" }, { "id": "ord-18168", "status": "failed", "amount": 1162.24, "region": "US" }, { "id": "ord-28152", "status": "failed", "amount": 1966.52, ...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/billing-api/records -> [{"id": "ord-94730", "status": "retry", "amount": 1952.74, "region": "EU"}, {"id": "ord-18168", "status": "failed", "amount": 1162.24, "region": "US"}, {"id": "ord-28152", "status": "failed", "amount": 1966.52, "region": "APAC"}] ...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-18168", "ord-28152" ] }
cot_math
Problem: A warehouse has 8 crates, each holding 9 boxes. An extra 9 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 8 crates x 9 boxes = 72 boxes. Then, 72 + 9 = 81. Therefore the final answer is 81.
{ "question": "A warehouse has 8 crates, each holding 9 boxes. An extra 9 boxes are loose. How many boxes are there in total?", "steps": [ "8 crates x 9 boxes = 72 boxes", "72 + 9 = 81" ] }
exact_match
<calc>8*9=72; 72+9=81 <ans>81
[]
true
[]
{ "answer": 81 }
handoff
Task: Summarize the hr report located at /data/hr/q324.csv. Focus on anomalies, flag any entry that declined more than 10%, and produce a bullet list. Keep it under 300 words.
{ "path": "/data/hr/q324.csv", "threshold": 10, "max_words": 300, "fmt": "bullet list", "focus": "anomalies" }
criteria
<goal>summarize /data/hr/q324.csv <step>focus anomalies; flag entry decline >10% <out>bullet list, <=300w
[]
true
[]
null
cot_math
Problem: A warehouse has 29 crates, each holding 12 boxes. An extra 10 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 29 crates x 12 boxes = 348 boxes. Then, 348 + 10 = 358. Therefore the final answer is 358.
{ "question": "A warehouse has 29 crates, each holding 12 boxes. An extra 10 boxes are loose. How many boxes are there in total?", "steps": [ "29 crates x 12 boxes = 348 boxes", "348 + 10 = 358" ] }
exact_match
<calc>29*12=348 <calc>348+10=358 <ans>358
[]
true
[]
{ "answer": 358 }
cot_math
Problem: A printer produces 440 pages in 22 hours. How many pages in 5 hours at the same rate? Let me solve this step by step. First, rate = 440 / 22 = 20 pages/h. Then, 20 x 5 = 100. Therefore the final answer is 100.
{ "question": "A printer produces 440 pages in 22 hours. How many pages in 5 hours at the same rate?", "steps": [ "rate = 440 / 22 = 20 pages/h", "20 x 5 = 100" ] }
exact_match
<calc>rate = 440 / 22 = 20 pages/h <calc>20 x 5 = 100 <ans>100
[]
true
[]
{ "answer": 100 }
handoff
Task: Summarize the sales report located at /data/sales/q315.csv. Focus on top-5 categories, flag any entry that declined more than 10%, and produce a bullet list. Keep it under 400 words.
{ "path": "/data/sales/q315.csv", "threshold": 10, "max_words": 400, "fmt": "bullet list", "focus": "top-5 categories" }
criteria
<goal>summarize /data/sales/q315.csv <step>top-5 categories; flag entry decline >10% <out>bullet list, <=400w
[]
true
[]
null
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>mod.py:clamp ignores upper bound, applies only lower <fix>wrap w/ min() to enforce upper <test>add unit test for failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
handoff
Task: Summarize the support report located at /data/support/q113.csv. Focus on top-5 categories, flag any entry that declined more than 20%, and produce a markdown table. Keep it under 300 words.
{ "path": "/data/support/q113.csv", "threshold": 20, "max_words": 300, "fmt": "markdown table", "focus": "top-5 categories" }
criteria
<goal>summarize /data/support/q113.csv <step>top-5 categories; flag entry decline >20% <out>md table, <=300w
[]
true
[]
null
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-16833", "status": "retry", "amount": 1364.86, "region": "APAC"}, {"id": "ord-60328", "status": "pending", "amount": 1090.72, "region": "EU"}, {"id": "ord-78704", "status": "ok", "amount": 1616.85, "region": "EU"}, {"id": "ord-45065", "status": "ok", "amount...
{ "rows": [ { "id": "ord-16833", "status": "retry", "amount": 1364.86, "region": "APAC" }, { "id": "ord-60328", "status": "pending", "amount": 1090.72, "region": "EU" }, { "id": "ord-78704", "status": "ok", "amount": 1616.85, ...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records: [{"id": "ord-16833", "status": "retry", "amount": 1364.86, "region": "APAC"}, {"id": "ord-60328", "status": "pending", "amount": 1090.72, "region": "EU"}, {"id": "ord-78704", "status": "ok", "amount": 1616.85, "region": "EU"}, {"id":...
[]
true
[]
{ "ok_total": 4428.82, "failed_ids": [] }
handoff
Task: Summarize the hr report located at /data/hr/q413.csv. Focus on anomalies, flag any entry that declined more than 15%, and produce a markdown table. Keep it under 400 words.
{ "path": "/data/hr/q413.csv", "threshold": 15, "max_words": 400, "fmt": "markdown table", "focus": "anomalies" }
criteria
<goal>summarize /data/hr/q413.csv <step>focus anomalies; flag entry decline >15% <out>md table, <=400w
[]
true
[]
null
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>parse_date in mod.py uses naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>mod.py:last_n slices items[:n] vs last n <fix>items[-n:]; handle n==0 <test>unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
cot_math
Problem: A warehouse has 18 crates, each holding 28 boxes. An extra 6 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 18 crates x 28 boxes = 504 boxes. Then, 504 + 6 = 510. Therefore the final answer is 510.
{ "question": "A warehouse has 18 crates, each holding 28 boxes. An extra 6 boxes are loose. How many boxes are there in total?", "steps": [ "18 crates x 28 boxes = 504 boxes", "504 + 6 = 510" ] }
exact_match
<calc>18*28=504 <calc>504+6=510 <ans>510
[]
true
[]
{ "answer": 510 }
handoff
Task: Summarize the logistics report located at /data/logistics/q216.csv. Focus on top-5 categories, flag any entry that declined more than 15%, and produce a CSV. Keep it under 400 words.
{ "path": "/data/logistics/q216.csv", "threshold": 15, "max_words": 400, "fmt": "CSV", "focus": "top-5 categories" }
criteria
<goal>summarize /data/logistics/q216.csv <step>top-5 categories; flag entry decline >15% <out>CSV, <=400w
[]
true
[]
null
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>mod.py:last_n slices items[:n] vs last n <fix>slice items[-n:]; handle n==0 <test>unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mean_positive mod.py: divides by full list len; crashes empty <fix>divide by count positives; return 0 empty <test>add unit test failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
cot_math
Problem: 841 candies are split equally into 29 jars, then 3 candies are added to each jar. How many candies per jar now? Let me solve this step by step. First, 841 / 29 = 29. Then, 29 + 3 = 32. Therefore the final answer is 32.
{ "question": "841 candies are split equally into 29 jars, then 3 candies are added to each jar. How many candies per jar now?", "steps": [ "841 / 29 = 29", "29 + 3 = 32" ] }
exact_match
<calc>841 / 29 = 29 <calc>29 + 3 = 32 <ans>32
[]
true
[]
{ "answer": 32 }
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>mod.py:last_n slices items[:n] vs last n <fix>items[-n:]; handle n==0 <test>cover failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
handoff
Task: Summarize the sales report located at /data/sales/q113.csv. Focus on monthly trend, flag any entry that declined more than 5%, and produce a CSV. Keep it under 400 words.
{ "path": "/data/sales/q113.csv", "threshold": 5, "max_words": 400, "fmt": "CSV", "focus": "monthly trend" }
criteria
<goal>summarize /data/sales/q113.csv <step>monthly trend; flag entry decline >5% <out>csv, <=400w
[]
true
[]
null
handoff
Task: Summarize the logistics report located at /data/logistics/q323.csv. Focus on regional breakdown, flag any entry that declined more than 15%, and produce a markdown table. Keep it under 400 words.
{ "path": "/data/logistics/q323.csv", "threshold": 15, "max_words": 400, "fmt": "markdown table", "focus": "regional breakdown" }
criteria
<goal>summarize /data/logistics/q323.csv <step>region breakdown; flag entry decline >15% <out>md table, <=400w
[]
true
[]
null
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-55903", "status": "failed", "amount": 1080.89, "region": "APAC"}, {"id": "ord-99576", "status": "retry", "amount": 230.63, "region": "LATAM"}, {"id": "ord-60120", "status": "pending", "amount": 1115.99, "region": "APAC"}, {"id": "ord-93300", "status": "pen...
{ "rows": [ { "id": "ord-55903", "status": "failed", "amount": 1080.89, "region": "APAC" }, { "id": "ord-99576", "status": "retry", "amount": 230.63, "region": "LATAM" }, { "id": "ord-60120", "status": "pending", "amount": 1115.99, ...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/billing-api/records -> [{"id": "ord-55903", "status": "failed", "amount": 1080.89, "region": "APAC"}, {"id": "ord-99576", "status": "retry", "amount": 230.63, "region": "LATAM"}, {"id": "ord-60120", "status": "pending", "amount": 1115.99, "region": "APA...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-55903" ] }
cot_math
Problem: A printer produces 540 pages in 20 hours. How many pages in 8 hours at the same rate? Let me solve this step by step. First, rate = 540 / 20 = 27 pages/h. Then, 27 x 8 = 216. Therefore the final answer is 216.
{ "question": "A printer produces 540 pages in 20 hours. How many pages in 8 hours at the same rate?", "steps": [ "rate = 540 / 20 = 27 pages/h", "27 x 8 = 216" ] }
exact_match
<goal>calc pages in 8h @ same rate <fact>540 pages in 20h <calc>rate=540/20=27 pages/h <calc>27x8=216 <ans>216
[]
true
[]
{ "answer": 216 }
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>mod.py clamp: applies lower bound, ignores upper <fix>wrap w/ min() enforce upper <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>parse_date in mod.py: naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-42457", "status": "failed", "amount": 1261.2, "region": "LATAM"}, {"id": "ord-92478", "status": "pending", "amount": 1269.3, "region": "LATAM"}, {"id": "ord-45423", "status": "pending", "amount": 1536.16, "region": "EU"}, {"id": "ord-55803", "status": "fail...
{ "rows": [ { "id": "ord-42457", "status": "failed", "amount": 1261.2, "region": "LATAM" }, { "id": "ord-92478", "status": "pending", "amount": 1269.3, "region": "LATAM" }, { "id": "ord-45423", "status": "pending", "amount": 1536.16...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>"ord-42457" <field>status <val>"failed" <field>amount <val>1261.2 <field>region <val>"LATAM" <field>id <val>"ord-92478" <field>status <val>"pending" <field>amount <val>1269.3 <field>region <val>"LATAM" <field>id <val>"o...
[ { "candidate": "<goal>sum total amount where status='ok'; list failed ids <fact>GET /v2/orders-api/records <field>status <val>ok <calc>1490.77 <ans>1490.77 <field>status <val>failed <ans>ord-42457, ord-55803, ord-99788, ord-19142", "problems": [ "missing numbers: ['1261.2', '1269.3', '138.66', '1536.1...
true
[]
{ "ok_total": 1490.77, "failed_ids": [ "ord-19142", "ord-42457", "ord-55803", "ord-99788" ] }
handoff
Task: Summarize the inventory report located at /data/inventory/q122.csv. Focus on year-over-year change, flag any entry that declined more than 15%, and produce a markdown table. Keep it under 400 words.
{ "path": "/data/inventory/q122.csv", "threshold": 15, "max_words": 400, "fmt": "markdown table", "focus": "year-over-year change" }
criteria
<goal>summarize /data/inventory/q122.csv <step>yoy change; flag entry decline >15% <out>md table, <=400w
[]
true
[]
null
handoff
Task: Summarize the logistics report located at /data/logistics/q312.csv. Focus on year-over-year change, flag any entry that declined more than 5%, and produce a bullet list. Keep it under 400 words.
{ "path": "/data/logistics/q312.csv", "threshold": 5, "max_words": 400, "fmt": "bullet list", "focus": "year-over-year change" }
criteria
<goal>summarize /data/logistics/q312.csv <step>YoY change; flag entry decline >5% <out>bullet list, <=400w
[]
true
[]
null
cot_math
Problem: A warehouse has 13 crates, each holding 11 boxes. An extra 12 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 13 crates x 11 boxes = 143 boxes. Then, 143 + 12 = 155. Therefore the final answer is 155.
{ "question": "A warehouse has 13 crates, each holding 11 boxes. An extra 12 boxes are loose. How many boxes are there in total?", "steps": [ "13 crates x 11 boxes = 143 boxes", "143 + 12 = 155" ] }
exact_match
<calc>13*11=143; 143+12=155 <ans>155
[]
true
[]
{ "answer": 155 }
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>mod.py:clamp ignores upper bound, applies only lower <fix>wrap w/ min() enforce upper <test>add unit test cover failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-40423", "status": "retry", "amount": 1124.28, "region": "US"}, {"id": "ord-73389", "status": "failed", "amount": 1734.1, "region": "APAC"}, {"id": "ord-39139", "status": "failed", "amount": 1927.76, "region": "US"}, {"id": "ord-96617", "status": "ok", "amou...
{ "rows": [ { "id": "ord-40423", "status": "retry", "amount": 1124.28, "region": "US" }, { "id": "ord-73389", "status": "failed", "amount": 1734.1, "region": "APAC" }, { "id": "ord-39139", "status": "failed", "amount": 1927.76, ...
programmatic
null
[ { "candidate": "<goal>sum GET /v2/orders-api/records <step>sum amount where status='ok'; list ids where status='failed' <calc>1704.29 <ans>1704.29 <field>id <val>\"ord-73389\", \"ord-39139\", \"ord-89463\"", "problems": [ "missing numbers: ['1124.28', '1164.96', '149.72', '1734.1', '1866.58', '1927.76...
null
null
{ "ok_total": 1704.29, "failed_ids": [ "ord-39139", "ord-73389", "ord-89463" ] }
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>mod.py last_n slices items[:n] vs last n <fix>slice items[-n:]; handle n==0 <test>unit test covering failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-41521", "status": "ok", "amount": 1437.73, "region": "APAC"}, {"id": "ord-18942", "status": "ok", "amount": 459.1, "region": "APAC"}, {"id": "ord-74534", "status": "ok", "amount": 1910.87, "region": "EU"}, {"id": "ord-17253", "status": "ok", "amount": 1778....
{ "rows": [ { "id": "ord-41521", "status": "ok", "amount": 1437.73, "region": "APAC" }, { "id": "ord-18942", "status": "ok", "amount": 459.1, "region": "APAC" }, { "id": "ord-74534", "status": "ok", "amount": 1910.87, "region"...
programmatic
<goal>sum total amount where status='ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-41521", "status": "ok", "amount": 1437.73, "region": "APAC"}, {"id": "ord-18942", "status": "ok", "amount": 459.1, "region": "APAC"}, {"id": "ord-74534", "status": "ok", "amount": 1910.87, "region": "EU"}, {"id": ...
[ { "candidate": "<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>\"ord-41521\",\"ord-18942\",\"ord-74534\",\"ord-17253\",\"ord-99561\",\"ord-54884\" <field>status <val>\"ok\",\"ok\",\"ok\",\"ok\",\"ok\",\"failed\" <field>amount <val>1437.73,459.1,1910.87,1778....
true
[]
{ "ok_total": 6577.46, "failed_ids": [ "ord-54884" ] }
handoff
Task: Summarize the inventory report located at /data/inventory/q424.csv. Focus on monthly trend, flag any entry that declined more than 20%, and produce a markdown table. Keep it under 300 words.
{ "path": "/data/inventory/q424.csv", "threshold": 20, "max_words": 300, "fmt": "markdown table", "focus": "monthly trend" }
criteria
<goal>summarize /data/inventory/q424.csv <step>monthly trend; flag entry decline >20% <out>md table, <=300w
[]
true
[]
null
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>last_n in mod.py slices items[:n] <fix>slice items[-n:]; handle n==0 <test>cover failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
cot_math
Problem: 256 candies are split equally into 16 jars, then 6 candies are added to each jar. How many candies per jar now? Let me solve this step by step. First, 256 / 16 = 16. Then, 16 + 6 = 22. Therefore the final answer is 22.
{ "question": "256 candies are split equally into 16 jars, then 6 candies are added to each jar. How many candies per jar now?", "steps": [ "256 / 16 = 16", "16 + 6 = 22" ] }
exact_match
<calc>256 / 16 = 16 <calc>16 + 6 = 22 <ans>22
[]
true
[]
{ "answer": 22 }
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-24541", "status": "pending", "amount": 1988.81, "region": "EU"}, {"id": "ord-12020", "status": "ok", "amount": 1715.89, "region": "APAC"}, {"id": "ord-60219", "status": "failed", "amount": 1838.09, "region": "LATAM"}, {"id": "ord-30980", "status": "pending", "...
{ "rows": [ { "id": "ord-24541", "status": "pending", "amount": 1988.81, "region": "EU" }, { "id": "ord-12020", "status": "ok", "amount": 1715.89, "region": "APAC" }, { "id": "ord-60219", "status": "failed", "amount": 1838.09, ...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/crm-api/records -> [{"id": "ord-24541", "status": "pending", "amount": 1988.81, "region": "EU"}, {"id": "ord-12020", "status": "ok", "amount": 1715.89, "region": "APAC"}, {"id": "ord-60219", "status": "failed", "amount": 1838.09, "region": "LATAM"}, {"i...
[]
true
[]
{ "ok_total": 1715.89, "failed_ids": [ "ord-60219", "ord-70671" ] }
handoff
Task: Summarize the inventory report located at /data/inventory/q118.csv. Focus on monthly trend, flag any entry that declined more than 5%, and produce a markdown table. Keep it under 500 words.
{ "path": "/data/inventory/q118.csv", "threshold": 5, "max_words": 500, "fmt": "markdown table", "focus": "monthly trend" }
criteria
<goal>summarize /data/inventory/q118.csv <step>monthly trend; flag entry decline >5% <out>md table, <=500w
[]
true
[]
null
handoff
Task: Summarize the inventory report located at /data/inventory/q316.csv. Focus on top-5 categories, flag any entry that declined more than 20%, and produce a bullet list. Keep it under 500 words.
{ "path": "/data/inventory/q316.csv", "threshold": 20, "max_words": 500, "fmt": "bullet list", "focus": "top-5 categories" }
criteria
<goal>summarize /data/inventory/q316.csv <step>top-5 categories; flag entry decline >20% <out>bullet list, <=500w
[]
true
[]
null
coding
The function mean_positive in mod.py has a bug: it divides by the full list length instead of the count of matching elements, and crashes on empty input. Please fix it. The fix should divide by the count of positives and return 0 for empty input. Add a unit test covering the failing case.
{ "buggy_code": "def mean_positive(nums):\n return sum(n for n in nums if n > 0) / len(nums)\n", "test_code": "def test_mean_positive():\n from mod import mean_positive\n assert mean_positive([1, -1, 3]) == 2.0\n assert mean_positive([]) == 0\n", "fname": "mean_positive", "file": "mod.py", "line":...
pytest
<bug>mean_positive @mod.py: divides by full list len; crashes on empty input <fix>divide by count of positives; return 0 for empty input <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "divide by count of positive numbers, not total length; guard empty" }
handoff
Task: Summarize the hr report located at /data/hr/q221.csv. Focus on year-over-year change, flag any entry that declined more than 20%, and produce a bullet list. Keep it under 200 words.
{ "path": "/data/hr/q221.csv", "threshold": 20, "max_words": 200, "fmt": "bullet list", "focus": "year-over-year change" }
criteria
<goal>summarize /data/hr/q221.csv <step>YoY change; flag entry decline >20% <out>bullet list, <=200w
[]
true
[]
null
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-80307", "status": "retry", "amount": 1840.24, "region": "EU"}, {"id": "ord-45008", "status": "ok", "amount": 506.9, "region": "EU"}, {"id": "ord-29793", "status": "ok", "amount": 1837.7, "region": "LATAM"}, {"id": "ord-15885", "status": "ok", "amount": 1276.06...
{ "rows": [ { "id": "ord-80307", "status": "retry", "amount": 1840.24, "region": "EU" }, { "id": "ord-45008", "status": "ok", "amount": 506.9, "region": "EU" }, { "id": "ord-29793", "status": "ok", "amount": 1837.7, "region": ...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/crm-api/records: [{"id": "ord-80307", "status": "retry", "amount": 1840.24, "region": "EU"}, {"id": "ord-45008", "status": "ok", "amount": 506.9, "region": "EU"}, {"id": "ord-29793", "status": "ok", "amount": 1837.7, "region": "LATAM"}, {"id": "ord-1588...
[]
true
[]
{ "ok_total": 3620.66, "failed_ids": [] }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-15258", "status": "pending", "amount": 1065.27, "region": "LATAM"}, {"id": "ord-97065", "status": "pending", "amount": 1791.35, "region": "LATAM"}, {"id": "ord-13226", "status": "failed", "amount": 185.3, "region": "APAC"}, {"id": "ord-21244", "status": "f...
{ "rows": [ { "id": "ord-15258", "status": "pending", "amount": 1065.27, "region": "LATAM" }, { "id": "ord-97065", "status": "pending", "amount": 1791.35, "region": "LATAM" }, { "id": "ord-13226", "status": "failed", "amount": 185.3...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/billing-api/records: [{"id": "ord-15258", "status": "pending", "amount": 1065.27, "region": "LATAM"}, {"id": "ord-97065", "status": "pending", "amount": 1791.35, "region": "LATAM"}, {"id": "ord-13226", "status": "failed", "amount": 185.3, "region": "APA...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-13226", "ord-17623", "ord-21244" ] }
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>parse_date mod.py: naive strptime no fallback -> raises <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>clamp in mod.py applies lower bound only; ignores upper bound <fix>wrap w/ min() to enforce upper bound <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
handoff
Task: Summarize the inventory report located at /data/inventory/q220.csv. Focus on anomalies, flag any entry that declined more than 15%, and produce a CSV. Keep it under 500 words.
{ "path": "/data/inventory/q220.csv", "threshold": 15, "max_words": 500, "fmt": "CSV", "focus": "anomalies" }
criteria
<goal>summarize /data/inventory/q220.csv <step>focus anomalies; flag entry decline >15% <out>CSV, <=500w
[]
true
[]
null
handoff
Task: Summarize the support report located at /data/support/q119.csv. Focus on anomalies, flag any entry that declined more than 10%, and produce a bullet list. Keep it under 300 words.
{ "path": "/data/support/q119.csv", "threshold": 10, "max_words": 300, "fmt": "bullet list", "focus": "anomalies" }
criteria
<goal>summarize /data/support/q119.csv <step>focus anomalies; flag entry decline >10% <out>bullet list, <=300w
[]
true
[]
null
cot_math
Problem: A warehouse has 29 crates, each holding 13 boxes. An extra 4 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 29 crates x 13 boxes = 377 boxes. Then, 377 + 4 = 381. Therefore the final answer is 381.
{ "question": "A warehouse has 29 crates, each holding 13 boxes. An extra 4 boxes are loose. How many boxes are there in total?", "steps": [ "29 crates x 13 boxes = 377 boxes", "377 + 4 = 381" ] }
exact_match
<calc>29*13=377 <calc>377+4=381 <ans>381
[]
true
[]
{ "answer": 381 }
cot_math
Problem: A warehouse has 22 crates, each holding 28 boxes. An extra 14 boxes are loose. How many boxes are there in total? Let me solve this step by step. First, 22 crates x 28 boxes = 616 boxes. Then, 616 + 14 = 630. Therefore the final answer is 630.
{ "question": "A warehouse has 22 crates, each holding 28 boxes. An extra 14 boxes are loose. How many boxes are there in total?", "steps": [ "22 crates x 28 boxes = 616 boxes", "616 + 14 = 630" ] }
exact_match
<calc>22*28=616; 616+14=630 <ans>630
[]
true
[]
{ "answer": 630 }
cot_math
Problem: 319 candies are split equally into 11 jars, then 7 candies are added to each jar. How many candies per jar now? Let me solve this step by step. First, 319 / 11 = 29. Then, 29 + 7 = 36. Therefore the final answer is 36.
{ "question": "319 candies are split equally into 11 jars, then 7 candies are added to each jar. How many candies per jar now?", "steps": [ "319 / 11 = 29", "29 + 7 = 36" ] }
exact_match
<calc>319/11=29 <calc>29+7=36 <ans>36
[]
true
[]
{ "answer": 36 }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-78170", "status": "ok", "amount": 1054.63, "region": "US"}, {"id": "ord-51564", "status": "failed", "amount": 1570.49, "region": "EU"}, {"id": "ord-69220", "status": "failed", "amount": 962.0, "region": "APAC"}, {"id": "ord-59876", "status": "ok", "amount":...
{ "rows": [ { "id": "ord-78170", "status": "ok", "amount": 1054.63, "region": "US" }, { "id": "ord-51564", "status": "failed", "amount": 1570.49, "region": "EU" }, { "id": "ord-69220", "status": "failed", "amount": 962, "regio...
programmatic
<goal>calc total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-78170", "status": "ok", "amount": 1054.63, "region": "US"}, {"id": "ord-51564", "status": "failed", "amount": 1570.49, "region": "EU"}, {"id": "ord-69220", "status": "failed", "amount": 962.0, "region": "APAC"}, {"id":...
[ { "candidate": "<goal>report total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records <field>id <val>\"ord-78170\" \"ord-51564\" \"ord-69220\" \"ord-59876\" \"ord-27639\" <field>status <val>\"ok\" \"failed\" \"failed\" \"ok\" \"ok\" <field>amount <val>1054.63 1570.49 962.0 1844.97 1049.8 <calc...
true
[]
{ "ok_total": 3949.4, "failed_ids": [ "ord-51564", "ord-69220" ] }
coding
The function clamp in mod.py has a bug: it only applies the lower bound and ignores the upper bound entirely. Please fix it. The fix should wrap with min() to also enforce the upper bound. Add a unit test covering the failing case.
{ "buggy_code": "def clamp(x, lo, hi):\n return max(x, lo)\n", "test_code": "def test_clamp():\n from mod import clamp\n assert clamp(5, 0, 3) == 3\n assert clamp(-1, 0, 3) == 0\n", "fname": "clamp", "file": "mod.py", "line": 1, "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
pytest
<bug>mod.py clamp ignores upper bound <fix>wrap w/ min() <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "must also cap at hi: return min(max(x, lo), hi)" }
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-58514", "status": "retry", "amount": 618.24, "region": "APAC"}, {"id": "ord-79747", "status": "pending", "amount": 63.0, "region": "APAC"}, {"id": "ord-38984", "status": "pending", "amount": 1814.08, "region": "US"}, {"id": "ord-63884", "status": "ok", "amount...
{ "rows": [ { "id": "ord-58514", "status": "retry", "amount": 618.24, "region": "APAC" }, { "id": "ord-79747", "status": "pending", "amount": 63, "region": "APAC" }, { "id": "ord-38984", "status": "pending", "amount": 1814.08, ...
programmatic
<goal>sum total amount status 'ok'; list failed ids <fact>GET /v2/crm-api/records -> [{"id": "ord-58514", "status": "retry", "amount": 618.24, "region": "APAC"}, {"id": "ord-79747", "status": "pending", "amount": 63.0, "region": "APAC"}, {"id": "ord-38984", "status": "pending", "amount": 1814.08, "region": "US"}, {"id"...
[ { "candidate": "<goal>sum total amount status='ok'; list failed ids <fact>GET /v2/crm-api/records <calc>sum where status='ok': 1624.4 <ans>total: 1624.4; failed ids: [\"ord-73789\"]", "problems": [ "missing numbers: ['1288.26', '1814.08', '19543', '24016', '38984', '443.77', '48.59', '527.09', '58514'...
true
[]
{ "ok_total": 1624.4, "failed_ids": [ "ord-73789" ] }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-65763", "status": "retry", "amount": 1352.82, "region": "US"}, {"id": "ord-73197", "status": "ok", "amount": 1628.99, "region": "APAC"}, {"id": "ord-63386", "status": "pending", "amount": 21.52, "region": "LATAM"}, {"id": "ord-77408", "status": "retry", "am...
{ "rows": [ { "id": "ord-65763", "status": "retry", "amount": 1352.82, "region": "US" }, { "id": "ord-73197", "status": "ok", "amount": 1628.99, "region": "APAC" }, { "id": "ord-63386", "status": "pending", "amount": 21.52, "r...
programmatic
<goal>sum total amount status 'ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-65763", "status": "retry", "amount": 1352.82, "region": "US"}, {"id": "ord-73197", "status": "ok", "amount": 1628.99, "region": "APAC"}, {"id": "ord-63386", "status": "pending", "amount": 21.52, "region": "LATAM"}, {"id...
[]
true
[]
{ "ok_total": 1628.99, "failed_ids": [] }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-10839", "status": "pending", "amount": 1921.24, "region": "EU"}, {"id": "ord-80880", "status": "ok", "amount": 1644.62, "region": "APAC"}, {"id": "ord-81175", "status": "failed", "amount": 1053.63, "region": "LATAM"}, {"id": "ord-89006", "status": "failed"...
{ "rows": [ { "id": "ord-10839", "status": "pending", "amount": 1921.24, "region": "EU" }, { "id": "ord-80880", "status": "ok", "amount": 1644.62, "region": "APAC" }, { "id": "ord-81175", "status": "failed", "amount": 1053.63, ...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/billing-api/records <field>id <val>"ord-10839","ord-80880","ord-81175","ord-89006","ord-76364","ord-43127" <field>status <val>"pending","ok","failed","failed","retry","ok" <field>amount <val>1921.24,1644.62,1053.63,907.78,1174.6,1989.09 <field>region <v...
[]
true
[]
{ "ok_total": 3633.71, "failed_ids": [ "ord-81175", "ord-89006" ] }
tool_relay
Tool call result from GET /v2/billing-api/records: [{"id": "ord-96375", "status": "ok", "amount": 1798.0, "region": "EU"}, {"id": "ord-10631", "status": "retry", "amount": 541.41, "region": "APAC"}, {"id": "ord-58841", "status": "retry", "amount": 1538.43, "region": "LATAM"}, {"id": "ord-69788", "status": "ok", "amount...
{ "rows": [ { "id": "ord-96375", "status": "ok", "amount": 1798, "region": "EU" }, { "id": "ord-10631", "status": "retry", "amount": 541.41, "region": "APAC" }, { "id": "ord-58841", "status": "retry", "amount": 1538.43, "regio...
programmatic
<goal>report total amount status 'ok'; list failed ids <fact>GET /v2/billing-api/records <val>[{"id": "ord-96375", "status": "ok", "amount": 1798.0, "region": "EU"}, {"id": "ord-10631", "status": "retry", "amount": 541.41, "region": "APAC"}, {"id": "ord-58841", "status": "retry", "amount": 1538.43, "region": "LATAM"}, ...
[]
true
[]
{ "ok_total": 2768.03, "failed_ids": [] }
tool_relay
Tool call result from GET /v2/crm-api/records: [{"id": "ord-87277", "status": "failed", "amount": 1899.51, "region": "LATAM"}, {"id": "ord-43806", "status": "failed", "amount": 1480.34, "region": "APAC"}, {"id": "ord-66820", "status": "failed", "amount": 1555.11, "region": "LATAM"}, {"id": "ord-38241", "status": "retry...
{ "rows": [ { "id": "ord-87277", "status": "failed", "amount": 1899.51, "region": "LATAM" }, { "id": "ord-43806", "status": "failed", "amount": 1480.34, "region": "APAC" }, { "id": "ord-66820", "status": "failed", "amount": 1555.11,...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/crm-api/records -> [{"id": "ord-87277", "status": "failed", "amount": 1899.51, "region": "LATAM"}, {"id": "ord-43806", "status": "failed", "amount": 1480.34, "region": "APAC"}, {"id": "ord-66820", "status": "failed", "amount": 1555.11, "region": "LATAM"...
[]
true
[]
{ "ok_total": 0, "failed_ids": [ "ord-43806", "ord-66820", "ord-87277" ] }
tool_relay
Tool call result from GET /v2/orders-api/records: [{"id": "ord-26969", "status": "pending", "amount": 1933.2, "region": "US"}, {"id": "ord-13425", "status": "ok", "amount": 510.18, "region": "LATAM"}, {"id": "ord-22969", "status": "retry", "amount": 1301.07, "region": "US"}]. Report the total amount for records with st...
{ "rows": [ { "id": "ord-26969", "status": "pending", "amount": 1933.2, "region": "US" }, { "id": "ord-13425", "status": "ok", "amount": 510.18, "region": "LATAM" }, { "id": "ord-22969", "status": "retry", "amount": 1301.07, "...
programmatic
<goal>calc total amount status='ok'; list failed ids <fact>GET /v2/orders-api/records -> [{"id": "ord-26969", "status": "pending", "amount": 1933.2, "region": "US"}, {"id": "ord-13425", "status": "ok", "amount": 510.18, "region": "LATAM"}, {"id": "ord-22969", "status": "retry", "amount": 1301.07, "region": "US"}] <calc...
[]
true
[]
{ "ok_total": 510.18, "failed_ids": [] }
handoff
Task: Summarize the hr report located at /data/hr/q116.csv. Focus on regional breakdown, flag any entry that declined more than 20%, and produce a markdown table. Keep it under 400 words.
{ "path": "/data/hr/q116.csv", "threshold": 20, "max_words": 400, "fmt": "markdown table", "focus": "regional breakdown" }
criteria
<goal>summarize /data/hr/q116.csv <step>region breakdown; flag entry decline >20% <out>md table, <=400w
[]
true
[]
null
coding
The function last_n in mod.py has a bug: it slices from the front with items[:n] instead of taking the last n items. Please fix it. The fix should slice with items[-n:] and handle n==0. Add a unit test covering the failing case.
{ "buggy_code": "def last_n(items, n):\n return items[:n]\n", "test_code": "def test_last_n():\n from mod import last_n\n assert last_n([1,2,3,4], 2) == [3, 4]\n assert last_n([1], 0) == []\n", "fname": "last_n", "file": "mod.py", "line": 1, "fix_desc": "should return the LAST n items: items[-n:...
pytest
<bug>last_n in mod.py slices items[:n] vs last n <fix>slice items[-n:]; handle n==0 <test>cover failing case
[]
true
[]
{ "fix_desc": "should return the LAST n items: items[-n:] (and [] when n==0)" }
coding
The function parse_date in mod.py has a bug: it uses naive strptime without a fallback, so it raises on unexpected formats. Please fix it. The fix should add a try/except with a fromisoformat fallback. Add a unit test covering the failing case.
{ "buggy_code": "from datetime import datetime\n\ndef parse_date(s):\n return datetime.strptime(s, '%Y-%m-%d')\n", "test_code": "def test_parse_date():\n from mod import parse_date\n assert parse_date('2024-01-15').year == 2024\n", "fname": "parse_date", "file": "mod.py", "line": 3, "fix_desc": "ha...
pytest
<bug>mod.py parse_date: naive strptime w/o fallback -> raises on unexpected formats <fix>add try/except w/ fromisoformat fallback <test>add unit test covering failing case
[]
true
[]
{ "fix_desc": "handle timezone-aware input by falling back to fromisoformat" }
End of preview.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

shorthand-agent-comm

Datasets and scripts for the trained shorthand project: Qwen3.5-9B agents fine-tuned (LoRA) to communicate in a terse learned slot-marker shorthand.

v4 architecture (current)

User (English task)
   ▼
TRANSLATOR  (GreenPT/shorthand-translator-v4)  EN → slot-marker shorthand spec
   ▼
WORKER  (GreenPT/shorthand-worker-v4)  shorthand-native agentic loop:
   read / edit / test / done against a pytest sandbox
   ▼
TRANSLATOR  shorthand done-report → English summary
  • Adapters: GreenPT/shorthand-translator-v4, GreenPT/shorthand-worker-v4 (LoRA r=64, 3 epochs, bf16, tokenizer included)
  • Teacher: Qwen/Qwen3.5-397B-A17B via HF Inference Providers (:deepinfra route)
  • Data: 2,883 trajectories (92–98% validity) + 195 held-out → v4_traj_raw.jsonl, v4_worker_train.jsonl (11,532 rows), v4_translator_train.jsonl (8,649 rows); held-out: v4_heldout_*.jsonl
  • Validated (measured, full 195-task held-out set, pytest-verified): translator+worker success 60.0% (117/195) at median 1,436 total tokens/task; functional English baseline (worked-example prompt) 79.5% at median 293 tokens/task — the shorthand loop is ~5.3x more expensive and 19.5pp less successful on this benchmark. Raw records: v4_bench_heldout.jsonl + v4_bench_heldout_a2.jsonl. (Supersedes an earlier 20-task smoke claim of 100% success.)

Costs (v4, session 3 — measured)

Item Amount
Teacher API (397B, v4 gen + pilots) $1.68
GPU (a100-large, 3 jobs + smoke) ~$7
Total (session 3) ≈ $9
Project GPU total ≈ 16 a100-hours ≈ $40

What's in this repo

Files Contents
v4_traj_raw.jsonl, v4_worker_train.jsonl, v4_translator_train.jsonl v4 trajectories + per-role training rows
v4_heldout_*.jsonl 195 held-out v4 tasks (same schema)
v4_bench_heldout.jsonl Full held-out bench records (390 rows: vanilla minimal-prompt + shorthand, token counts, success, actions)
v4_bench_heldout_a2.jsonl Held-out bench records for the functional English baseline (195 rows, worked-example prompt)
real_*.jsonl v3 real-task eval: heldout, baseline/shorthand outputs
eval_*.jsonl, train_pairs.jsonl, reader_train*.jsonl, encoder_train_v3.jsonl v1/v3 training + eval data
gen_v4.py, schema.py, loop_bench.py v4 generator, shorthand validation, loop benchmark
run_*.py, train_sft.py, swe_harness.py eval runners, SFT training, SWE-bench harness

Usage

See GUIDE.md (v4 translator–worker section) in the code repo, or GreenPT/trained-shorthand-report for the report. Quick start:

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")
base = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen3.5-9B", dtype=torch.bfloat16, device_map="cuda")
model = PeftModel.from_pretrained(
    base, "GreenPT/shorthand-translator-v4", adapter_name="translator")
model.load_adapter("GreenPT/shorthand-worker-v4", adapter_name="worker")
# model.set_adapter("translator" | "worker") — see GUIDE.md for prompts
Downloads last month
57