feat: add alphabet-sort-v1 taskset - #1595
Conversation
Port the v0 `alphabet-sort` env to a v1 taskset. Task generation, prompts, and scoring are reused verbatim from v0; the multi-turn follow-ups (v0's `MultiTurnEnv.env_response`) are colocated with the agent as a `vf.User` that replays the pre-generated turns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Move to a package (`alphabet_sort_v1/__init__.py` + `user.py`), matching the other example tasksets. - Inline the dataset building and scoring into the taskset (drop the `get_dataset_builder`/`compute_reward` indirection, the HF `Dataset` round-trip, and unused `info` fields). - Trim the config: fix the source dataset + seed as module constants, rename `dataset_split` to a `split` literal, and document every field. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the module-level helper functions: fold the first/last-name sort key into a local in `load_tasks` and the per-turn scoring into the `@vf.reward` method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`DefaultHarnessConfig.enable_bash` already defaults to False, so setting it in the user-simulator eval configs is redundant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 308da10. Configure here.
| terminal-bench-2-v1 = { path = "examples/tasksets/terminal_bench_2_v1", editable = true } | ||
| math-env-v1 = { path = "examples/tasksets/math_env_v1", editable = true } | ||
| aime24-v1 = { path = "examples/tasksets/aime24_v1", editable = true } | ||
| alphabet-sort-v1 = { path = "examples/tasksets/alphabet_sort_v1", editable = true } |
There was a problem hiding this comment.
Lockfile missing new package
Medium Severity
The root pyproject.toml registers alphabet-sort-v1 in the examples dependency group and [tool.uv.sources], but uv.lock is not updated to include that workspace package. A releasable merge should keep the lockfile aligned with dependency changes so uv sync and CI use a consistent resolved graph.
Triggered by project rule: BugBot Instructions
Reviewed by Cursor Bugbot for commit 308da10. Configure here.
ApprovabilityVerdict: Needs human review This PR introduces a complete new taskset with substantial new logic (~230 lines) including custom reward functions, multi-turn episode generation, and an MCP-based user simulator. New features introducing new components warrant human review even when well-scoped. You can customize Macroscope's approvability policy. Learn more. |
* feat: add alphabet-sort-v1 taskset with a colocated user simulator Port the v0 `alphabet-sort` env to a v1 taskset. Task generation, prompts, and scoring are reused verbatim from v0; the multi-turn follow-ups (v0's `MultiTurnEnv.env_response`) are colocated with the agent as a `vf.User` that replays the pre-generated turns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor: package layout and minimal taskset for alphabet-sort-v1 - Move to a package (`alphabet_sort_v1/__init__.py` + `user.py`), matching the other example tasksets. - Inline the dataset building and scoring into the taskset (drop the `get_dataset_builder`/`compute_reward` indirection, the HF `Dataset` round-trip, and unused `info` fields). - Trim the config: fix the source dataset + seed as module constants, rename `dataset_split` to a `split` literal, and document every field. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor: inline the name-split and scoring into the taskset methods Drop the module-level helper functions: fold the first/last-name sort key into a local in `load_tasks` and the per-turn scoring into the `@vf.reward` method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: drop redundant enable_bash=false from eval configs `DefaultHarnessConfig.enable_bash` already defaults to False, so setting it in the user-simulator eval configs is redundant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>


Summary
alphabet-sortenvironment to a v1 taskset underexamples/tasksets/alphabet_sort_v1/(a package:__init__.py+user.py, like the other example tasksets).MultiTurnEnv.env_response) are colocated with the agent as avf.User(user.py): after each assistant turn the interception server drives the simulator, which replays the next pre-generated follow-up as a user turn and signalsdoneafter the last turn.<alphabetical_sorted>/<combined_alphabetical_sorted>content against the per-turn ground truth with the same difflib-similarity, power-scaling, and strictly-improving multi-attempt logic as v0.AlphabetSortConfigexposesmin_turns/max_turns/min_names_per_turn/max_names_per_turn/similarity_power/power_per_turn/split(the source dataset and seed are fixed module constants).alphabet-sort-v1inpyproject.toml(examplesgroup +[tool.uv.sources]) and addconfigs/alphabet_sort.toml.enable_bash = falsefrom the user-simulator eval configs (alphabet_sort,wordle,textarena) — it's already the harness default.Verification
Identity vs the v0 env (
environments/alphabet_sort):power_per_turnmodes).Smoke test:
All rollouts
user_completed, 2 turns each, no errors, rewards 0.15–1.0. Trace confirmsuser → assistant <alphabetical_sorted> → [user-sim follow-up] → assistant <combined_alphabetical_sorted> → user_completed.🤖 Generated with Claude Code
Note
Low Risk
New example taskset and config-only harness tweaks; no changes to core auth, harness defaults, or existing task behavior beyond removing redundant config keys.
Overview
Adds alphabet-sort-v1, a v1 port of the multi-turn alphabetical name-sorting eval: episodes are built from a Hugging Face author-names dataset, graded with the same tagged-output difflib reward as v0, and follow-up user turns are replayed by a colocated
vf.UserMCP subprocess instead of harness-side env responses.Wires the plugin into
pyproject.toml(examples group + uv source) and addsconfigs/alphabet_sort.tomlfor subprocess evals with fixed 2-turn episodes.Removes redundant
enable_bash = falsefrom the wordle, textarena, and alphabet_sort harness configs because the default harness already disables bash.Reviewed by Cursor Bugbot for commit 308da10. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add alphabet-sort-v1 multi-turn sorting taskset
AlphabetSortConfig(turn counts, names per turn, similarity power scaling); ground truths include' // new name!'annotations after the first turn.difflib.SequenceMatcherratio against ground truth per turn, with strict improvement required across multiple attempts and optional per-turn power scaling.alphabet_sort_v1.user) drives follow-up turns by reading pre-generated episode data from theALPHABET_SORT_INFOenvironment variable.alphabet-sort-v1extra in pyproject.toml and adds a run config at configs/alphabet_sort.toml (5 tasks, 2 rollouts, max 4 turns, bounded to 2 turns per episode).Macroscope summarized 308da10.