| Task |
Ran ran on a synthesized input |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("50555611ef7241a5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
from dataclasses import dataclass
from typing import Any
@dataclass
class Task:
"""One Workspace-Bench-Lite source task, with resolved on-disk paths."""
task_id: str
dir: str
meta: dict[str, Any]
@property
def persona(self) -> str:
return self.meta.get('persona', '')
@property
def difficulty(self) -> str:
return self.meta.get('task_diff', '')
@property
def rubrics(self) -> list[str]:
return self.meta.get('rubrics', [])
@property
def rubric_types(self) -> list[str]:
return self.meta.get('rubric_types', [])
@property
def output_files(self) -> list[str]:
return self.meta.get('output_files', [])
@property
def dep_edges(self) -> list[dict[str, str]]:
return self.meta.get('file_dep_graph', [])
@property
def capabilities(self) -> list[str]:
return self.meta.get('tested_capabilities', [])
def manifest(self) -> list[dict[str, str]]:
"""[{filename, stored_relpath, abspath, ext, exists}] for input files."""
out = []
for e in self.meta.get('data_manifest', []):
abspath = os.path.join(self.dir, e['stored_relpath'])
out.append({'filename': e['filename'], 'stored_relpath': e['stored_relpath'], 'abspath': abspath, 'ext': os.path.splitext(e['filename'])[1].lower(), 'exists': os.path.exists(abspath)})
return out
# Create a temporary directory for the task
tmpdir = tempfile.mkdtemp()
# Create a sample input file
sample_file_path = os.path.join(tmpdir, 'input_data.txt')
with open(sample_file_path, 'w') as f:
f.write('sample data')
INIT_ARGS = {
'task_id': 'task_001',
'dir': tmpdir,
'meta': {
'persona': 'data_analyst',
'task_diff': 'medium',
'rubrics': ['accuracy', 'efficiency'],
'rubric_types': ['quantitative', 'qualitative'],
'output_files': ['output.csv', 'report.txt'],
'file_dep_graph': [
{'source': 'input.txt', 'target': 'output.csv'},
{'source': 'output.csv', 'target': 'report.txt'}
],
'tested_capabilities': ['data_processing', 'visualization'],
'data_manifest': [
{'filename': 'input_data.txt', 'stored_relpath': 'input_data.txt'},
{'filename': 'config.json', 'stored_relpath': 'config.json'}
]
}
}
ARGS = {
}
METHOD = 'manifest'
if __name__ == '__main__':
task = Task(**INIT_ARGS)
result = getattr(task, METHOD)(**ARGS)
print(f"Task ID: {task.task_id}")
print(f"Persona: {task.persona}")
print(f"Difficulty: {task.difficulty}")
print(f"Rubrics: {task.rubrics}")
print(f"Rubric Types: {task.rubric_types}")
print(f"Output Files: {task.output_files}")
print(f"Dep Edges: {task.dep_edges}")
print(f"Capabilities: {task.capabilities}")
print(f"Manifest: {result}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| _basename |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("d51e4c398d236d99") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
def _basename(x: str) -> str:
return os.path.basename(x)
ARGS = {
"x": "/path/to/some/file.txt"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _diff |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("658a736fc983ccd5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def _diff(d: str) -> str:
return d if d in ('easy', 'medium', 'hard') else 'unknown'
ARGS = {
'd': 'easy'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _find_match |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("f1755930b596fc49") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
import numpy as np
# Construct valid arguments for _find_match
# agg_index: dict mapping view names to lists of aggregate dicts
# Each agg dict should have 'value' and 'agg' keys
agg_index = {
'view_1': [
{'value': 100.5, 'agg': 'SUM'},
{'value': 50.25, 'agg': 'AVG'},
{'value': 5, 'agg': 'COUNT_DISTINCT'},
],
'view_2': [
{'value': 100.48, 'agg': 'SUM'},
{'value': 21.05, 'agg': 'SUM'},
{'value': 10, 'agg': 'COUNT'},
],
'view_3': [
{'value': 75.3, 'agg': 'AVG'},
{'value': 3, 'agg': 'COUNT_DISTINCT'},
],
}
# target: float value to match
target = 100.5
# unit: string specifying the unit type
unit = 'currency'
ARGS = {
'agg_index': agg_index,
'target': target,
'unit': unit,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _find_number_in_docs |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("4f74db37867a8af6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
def _find_number_in_docs(value, unit, kb_texts: dict):
"""Return the doc that contains this figure, or None.
Matches formatting variants: 1710971.47 may appear as "1,710,971.47",
"1710971.47", "$1,710,971", "16.89%", "16.89", etc. Requires the digit
core to appear as a token, so unrelated substrings don't false-match.
"""
if isinstance(value, float) and value.is_integer():
value = int(value)
variants = set()
sval = f'{value}'
variants.add(sval)
if isinstance(value, int):
variants.add(f'{value:,}')
else:
variants.add(f'{value:,.2f}')
variants.add(f'{value:.2f}')
variants.add(f'{value:.1f}')
variants.add(str(value).rstrip('0').rstrip('.') if '.' in str(value) else str(value))
for doc, text in kb_texts.items():
for v in variants:
if not v:
continue
pat = '(?<![\\d.,])' + re.escape(v) + '(?![\\d])'
if re.search(pat, text):
return doc
return None
ARGS = {
'value': 1234.56,
'unit': 'USD',
'kb_texts': {
'doc_1': 'The total amount is $1,234.56 in revenue.',
'doc_2': 'Another document with different numbers like 999.99 dollars.',
'doc_3': 'No matching value here, just some text with 5000.',
}
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _load_kb_texts |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("637c295f7bd61edc") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
import shutil
# Create a temporary directory structure with KB documents
temp_dir = tempfile.mkdtemp()
kb_dir = os.path.join(temp_dir, 'kb_docs')
os.makedirs(kb_dir, exist_ok=True)
# Create some sample KB markdown files for task 123
task_id = "123"
doc1_path = os.path.join(kb_dir, f't{task_id}__doc1.md')
doc2_path = os.path.join(kb_dir, f't{task_id}__doc2.md')
with open(doc1_path, 'w', encoding='utf-8') as f:
f.write("# Document 1\nThis is the first KB document.")
with open(doc2_path, 'w', encoding='utf-8') as f:
f.write("# Document 2\nThis is the second KB document.")
# Also create a file that shouldn't match the pattern
other_path = os.path.join(kb_dir, 'other_file.md')
with open(other_path, 'w', encoding='utf-8') as f:
f.write("This should not be loaded.")
ARGS = {
'profile_dir': temp_dir,
'task_id': task_id
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _num |
Ran ran, honoured the contract we drafted |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("c185ef24e5b1d0cd") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def _num(s: str) -> float:
v = float(s.replace(',', ''))
return int(v) if v.is_integer() else v
ARGS = {
's': '1,234.56'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _precompute_aggregates |
Ran ran, honoured the contract we drafted |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("444eb71010da0d2f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import sqlite3
import tempfile
import os
# Create a temporary SQLite database with a test view
temp_db = tempfile.NamedTemporaryFile(delete=False, suffix='.db')
temp_db.close()
db_path = temp_db.name
con = sqlite3.connect(db_path)
cursor = con.cursor()
# Create a test table with numeric and non-numeric columns
cursor.execute('''
CREATE TABLE test_data (
id INTEGER,
price REAL,
quantity INTEGER,
name TEXT,
discount_pct TEXT
)
''')
# Insert test data
cursor.execute("INSERT INTO test_data VALUES (1, 100.50, 5, 'item1', '10%')")
cursor.execute("INSERT INTO test_data VALUES (2, 200.75, 3, 'item2', '15%')")
cursor.execute("INSERT INTO test_data VALUES (3, 150.25, 8, 'item3', '5%')")
con.commit()
# Create a view from the table
cursor.execute('CREATE VIEW test_view AS SELECT * FROM test_data')
con.commit()
ARGS = {
'con': con,
'view': 'test_view'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _rubric_subject |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("a56b4f1f21bb9943") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
CURRENCY_RE = re.compile('\\$\\s*([\\d,]+(?:\\.\\d+)?)')
PERCENT_RE = re.compile('(\\d+(?:\\.\\d+)?)\\s*%')
def _rubric_subject(rubric: str) -> str:
"""Trim a yes/no rubric into a declarative subject clue (no gold leak of #)."""
s = re.sub('^\\s*(is|are|does|do|did|was|were|has|have|can)\\b\\s*', '', rubric, flags=re.I).strip()
s = CURRENCY_RE.sub('___', s)
s = PERCENT_RE.sub('___', s)
return s[:140] + '…' if len(s) > 140 else s
ARGS = {
'rubric': 'Is the project budget $50,000 or more and includes 25% contingency?'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _view_label |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("5bf023c7243c38cc") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import torch
def _view_label(view: str) -> str:
return view.split('__', 1)[1] if '__' in view else view
ARGS = {
'view': 'namespace__label_name'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| classify_rubric |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("1bbfdd43612bf773") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
COUNT_CTX_RE = re.compile('(?:total of|a total of|is|are|with|of|contains?|includes?|exactly)?\\s*(\\d{1,3}(?:,\\d{3})*|\\d+)\\s+(order records?|orders?|records?|rows?|items?|files?|roles?|entries?|tasks?|categories|segments?|libraries|dependencies|bugs?)', re.I)
CURRENCY_RE = re.compile('\\$\\s*([\\d,]+(?:\\.\\d+)?)')
EXISTENCE_RE = re.compile('\\b(generat|creat|produc|sav|writ|output)\\w*\\b.*?\\b([\\w\\-. ]+\\.(md|txt|csv|xlsx|docx?|pptx?|json|pdf))\\b', re.I)
PERCENT_RE = re.compile('(\\d+(?:\\.\\d+)?)\\s*%')
def classify_rubric(rubric: str) -> str:
r = rubric.lower()
if CURRENCY_RE.search(rubric) or PERCENT_RE.search(rubric) or COUNT_CTX_RE.search(rubric):
return 'extractive_numeric'
if re.search('\\b(include|contain|list|cover)\\b.*\\b(all|each|every|following|:)\\b', r):
return 'extractive_string_set'
if EXISTENCE_RE.search(rubric):
return 'extractive_boolean'
if re.search('\\b(present|format|table|markdown|section|header|structur)\\b', r):
return 'structural'
return 'qualitative'
ARGS = {
'rubric': 'Please include all of the following items in your response: name, email, and phone number.'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| connect_registry |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("825e9c562c1bb706") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import json
import os
import tempfile
import duckdb
import pyarrow.parquet as pq
import pyarrow as pa
import numpy as np
# Create a temporary directory for tables
tables_dir = tempfile.mkdtemp()
# Create a sample parquet file
data1 = pa.table({
'id': [1, 2, 3],
'value': [10.0, 20.0, 30.0]
})
pq_path1 = os.path.join(tables_dir, 'table1.parquet')
pq.write_table(data1, pq_path1)
# Create another sample parquet file
data2 = pa.table({
'id': [4, 5],
'value': [40.0, 50.0]
})
pq_path2 = os.path.join(tables_dir, 'table2.parquet')
pq.write_table(data2, pq_path2)
# Create registry.json
registry = {
'view1': {
'task': 'task_a',
'parquet': 'table1.parquet'
},
'view2': {
'task': 'task_b',
'parquet': 'table2.parquet'
},
'view3': {
'task': 'task_a',
'parquet': 'table1.parquet'
}
}
registry_path = os.path.join(tables_dir, 'registry.json')
with open(registry_path, 'w') as f:
json.dump(registry, f)
ARGS = {
'tables_dir': tables_dir,
'tasks': ['task_a']
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- duckdb, numpy, pyarrow — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| derive_abstain_tasks |
Ran ran, honoured the contract we drafted |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("7caccd4c7127af45") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
# Define a minimal Task class with the required attributes
class Task:
def __init__(self, task_id, rubrics):
self.task_id = task_id
self.rubrics = rubrics
# Create sample rubrics with extractive_numeric patterns
rubrics = [
"What is the total of $1,500.00 in expenses?",
"How many orders are there with 42 items?",
"What percentage is 25.5% of the budget?",
"How many records contain $999.99?",
"Is there a total of 100 entries processed?"
]
# Create a minimal task object
task = Task(task_id="task_001", rubrics=rubrics)
# Create kb_texts dictionary with sample documents
# Some numbers present, some absent to test the grounding check
kb_texts = {
"doc_1": "The total of $1,500.00 was recorded in the system. We have 42 items in stock.",
"doc_2": "Processing 25.5% of the dataset took 2 hours. Total records: 100.",
"doc_3": "The budget allocation shows $999.99 for supplies. Revenue was $5,234.50.",
"doc_4": "Another document without the specific numbers we're testing for."
}
# Define all arguments for derive_abstain_tasks
ARGS = {
'task': task,
'kb_texts': kb_texts,
'qid_start': 1,
'max_per_task': 2
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| derive_aggregate_tasks |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("597a8ad966f83f5b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
# Mock task object with required attributes
class MockTask:
def __init__(self):
self.task_id = "task_001"
self.persona = "data_analyst"
self.difficulty = "medium"
self.rubrics = [
"Is the total revenue $1,234.56?",
"Does the dataset contain 42 records?",
"Is the success rate 85.5%?",
"Are there 100 items with value $500?"
]
# Construct agg_index: {view: [aggregate dicts]}
agg_index = {
"sales_summary": [
{
'value': 1234.56,
'agg': 'SUM',
'col': 'revenue',
'query': 'SELECT SUM(revenue) FROM sales_summary',
'span': '$1,234.56'
},
{
'value': 85.5,
'agg': 'AVG',
'col': 'success_rate',
'query': 'SELECT AVG(success_rate) FROM sales_summary',
'span': '85.5%'
}
],
"records_view": [
{
'value': 42.0,
'agg': 'COUNT',
'col': 'id',
'query': 'SELECT COUNT(*) FROM records_view',
'span': '42 records'
},
{
'value': 500.0,
'agg': 'COUNT_DISTINCT',
'col': 'item_id',
'query': 'SELECT COUNT(DISTINCT item_id) FROM records_view',
'span': '100 items'
}
]
}
ARGS = {
'task': MockTask(),
'agg_index': agg_index,
'qid_start': 1
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| derive_rag_numeric_tasks |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("e6ed0255c21201e1") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
class MockTask:
def __init__(self, task_id, persona, difficulty, rubrics):
self.task_id = task_id
self.persona = persona
self.difficulty = difficulty
self.rubrics = rubrics
# Create a mock task with extractive numeric rubrics
task = MockTask(
task_id="task_001",
persona="data_analyst",
difficulty="medium",
rubrics=[
"What is the total amount in currency? The total is $1,500.00",
"What percentage of items? About 25.5%",
"How many orders? We have 150 orders in the system",
"Non-numeric rubric about quality",
]
)
# Create kb_texts dictionary with documents containing the numeric values
kb_texts = {
"doc_financial.txt": "The budget allocation is $1,500.00 for this quarter. We need to track expenses carefully.",
"doc_metrics.txt": "The conversion rate improved to 25.5% last month. This represents a significant gain.",
"doc_orders.csv": "Total of 150 orders processed. Each order contains multiple line items.",
"doc_general.txt": "General information about the workspace and various metrics.",
}
qid_start = 1
ARGS = {
"task": task,
"kb_texts": kb_texts,
"qid_start": qid_start,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| derive_table_tasks |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("8b3448b2b7608511") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
# Stand-in task class with required attributes
class Task:
def __init__(self, task_id, persona, difficulty, rubrics):
self.task_id = task_id
self.persona = persona
self.difficulty = difficulty
self.rubrics = rubrics
# Create a task instance with sample rubrics containing numeric patterns
task = Task(
task_id='task_001',
persona='analyst',
difficulty='medium',
rubrics=[
'The dataset contains 150 order records with a total of 3,250.50 in revenue.',
'There are exactly 42 items in the inventory.',
'The report shows 75% completion rate.',
'$1,500 was spent on this category.',
]
)
# Create rc_index mapping view names to row counts
rc_index = {
'orders__main_view': 150,
'inventory__items_view': 42,
'sales__transactions': 100,
}
# Starting question ID
qid_start = 1
# Define ARGS dictionary with all function parameters
ARGS = {
'task': task,
'rc_index': rc_index,
'qid_start': qid_start,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| extract_numeric_answers |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("adc1cea8e4526957") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
COUNT_CTX_RE = re.compile('(?:total of|a total of|is|are|with|of|contains?|includes?|exactly)?\\s*(\\d{1,3}(?:,\\d{3})*|\\d+)\\s+(order records?|orders?|records?|rows?|items?|files?|roles?|entries?|tasks?|categories|segments?|libraries|dependencies|bugs?)', re.I)
CURRENCY_RE = re.compile('\\$\\s*([\\d,]+(?:\\.\\d+)?)')
PERCENT_RE = re.compile('(\\d+(?:\\.\\d+)?)\\s*%')
def _num(s: str) -> float:
v = float(s.replace(',', ''))
return int(v) if v.is_integer() else v
def extract_numeric_answers(rubric: str) -> list[dict]:
"""Return candidate (value, unit, kind, span) tuples from one rubric."""
out = []
for m in CURRENCY_RE.finditer(rubric):
out.append({'value': _num(m.group(1)), 'unit': 'currency', 'kind': 'number', 'span': m.group(0)})
for m in PERCENT_RE.finditer(rubric):
out.append({'value': _num(m.group(1)), 'unit': 'percent', 'kind': 'number', 'span': m.group(0)})
for m in COUNT_CTX_RE.finditer(rubric):
out.append({'value': _num(m.group(1)), 'unit': m.group(2).lower(), 'kind': 'count', 'span': m.group(0)})
return out
ARGS = {
'rubric': 'The total of 1,500 orders with $25.50 in revenue represents 85% of our records containing 42 items and 100 bugs found in the system.'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| persona_slug |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("c0baf8fdddda9318") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import re
PERSONA_SLUGS = {'Operations Manager': 'operations_manager', 'Logistics Manager': 'logistics_manager', 'Researcher': 'researcher', 'Backend Developer': 'backend_developer', 'Product Manager': 'product_manager'}
def persona_slug(persona: str) -> str:
return PERSONA_SLUGS.get(persona, re.sub('[^a-z0-9]+', '_', persona.lower()).strip('_'))
# Test with a known persona
ARGS = {
'persona': 'Operations Manager'
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| strip_hash_prefix |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("847bae8834887b9c") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import re
HASH_PREFIX_RE = re.compile('^[0-9a-f]{16}_')
def strip_hash_prefix(name: str) -> str:
"""product_info.csv from a508...._product_info.csv (basename only)."""
base = os.path.basename(name)
return HASH_PREFIX_RE.sub('', base)
# Test cases with various inputs
ARGS = {
"name": "a508f1c2d3e4f5a6_product_info.csv"
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| tasks_by_persona |
Ran ran; our contract draft was wrong, not the code |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("ec56c45d66bcfe3b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import os
import tempfile
from dataclasses import dataclass
from typing import Any
# Define the Task class and related functions
PERSONA_SLUGS = {'Operations Manager': 'operations_manager', 'Logistics Manager': 'logistics_manager', 'Researcher': 'researcher', 'Backend Developer': 'backend_developer', 'Product Manager': 'product_manager'}
@dataclass
class Task:
"""One Workspace-Bench-Lite source task, with resolved on-disk paths."""
task_id: str
dir: str
meta: dict[str, Any]
@property
def persona(self) -> str:
return self.meta.get('persona', '')
@property
def difficulty(self) -> str:
return self.meta.get('task_diff', '')
@property
def rubrics(self) -> list[str]:
return self.meta.get('rubrics', [])
@property
def rubric_types(self) -> list[str]:
return self.meta.get('rubric_types', [])
@property
def output_files(self) -> list[str]:
return self.meta.get('output_files', [])
@property
def dep_edges(self) -> list[dict[str, str]]:
return self.meta.get('file_dep_graph', [])
@property
def capabilities(self) -> list[str]:
return self.meta.get('tested_capabilities', [])
def manifest(self) -> list[dict[str, str]]:
"""[{filename, stored_relpath, abspath, ext, exists}] for input files."""
out = []
for e in self.meta.get('data_manifest', []):
abspath = os.path.join(self.dir, e['stored_relpath'])
out.append({'filename': e['filename'], 'stored_relpath': e['stored_relpath'], 'abspath': abspath, 'ext': os.path.splitext(e['filename'])[1].lower(), 'exists': os.path.exists(abspath)})
return out
import re
def persona_slug(persona: str) -> str:
return PERSONA_SLUGS.get(persona, re.sub('[^a-z0-9]+', '_', persona.lower()).strip('_'))
def tasks_by_persona(tasks: list[Task]) -> dict[str, list[Task]]:
groups: dict[str, list[Task]] = {}
for t in tasks:
groups.setdefault(persona_slug(t.persona), []).append(t)
return groups
# Create temporary directories for tasks
tmpdir1 = tempfile.mkdtemp()
tmpdir2 = tempfile.mkdtemp()
tmpdir3 = tempfile.mkdtemp()
# Create sample Task instances with different personas
task1 = Task(
task_id='task_001',
dir=tmpdir1,
meta={
'persona': 'Operations Manager',
'task_diff': 'medium',
'rubrics': ['accuracy', 'efficiency'],
'rubric_types': ['quantitative'],
'output_files': ['output.txt'],
'file_dep_graph': [],
'tested_capabilities': ['planning'],
'data_manifest': []
}
)
task2 = Task(
task_id='task_002',
dir=tmpdir2,
meta={
'persona': 'Backend Developer',
'task_diff': 'hard',
'rubrics': ['code_quality'],
'rubric_types': ['qualitative'],
'output_files': ['code.py'],
'file_dep_graph': [],
'tested_capabilities': ['coding'],
'data_manifest': []
}
)
task3 = Task(
task_id='task_003',
dir=tmpdir3,
meta={
'persona': 'Researcher',
'task_diff': 'easy',
'rubrics': ['completeness'],
'rubric_types': ['quantitative'],
'output_files': ['report.pdf'],
'file_dep_graph': [],
'tested_capabilities': ['analysis'],
'data_manifest': []
}
)
ARGS = {
'tasks': [task1, task2, task3]
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| _clean |
Not yet run unverified (harvested, no recorded run) |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("a708f6a90056157c") How it ran |
| derive_graph_tasks |
Not yet run unverified (harvested, no recorded run) |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("83785c6423c13f0f") How it ran |
| load_tasks |
Not yet run unverified (harvested, no recorded run) |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("1db4d10fb1273ea4") How it ran |
| main |
Not yet run unverified (harvested, no recorded run) |
haolpku/WorkSurface-Bench/worksurface/derive_tasks.py code served (permissive licence) · get_code("662806b1db61b796") How it ran |