--- name: alfworld_task_parser description: "Turn a plain-English instruction like 'put the apple in the fridge' into the exact object and location a virtual household robot needs so it can carry out the task correctly. alfworld_task_parser: parse_task(task, receptacles) -> (entry_point, object_type, target_type) for ALFWorld task sentences; l" --- # alfworld_task_parser (a Neruva verified skill for `alfworld`) Turn a plain-English instruction like "put the apple in the fridge" into the exact object and location a virtual household robot needs so it can carry out the task correctly. Verified helper code for `alfworld`, python. Entry points: `parse_task`. Code hash sha256 `4da333e9977fd2b6f3a501cc6065b3098d566371c66c265ad4f50de35eec6291`, signed (ed25519). Banked by `legacy-dev`. ## One call Call `build(**args)` with an object matching this schema. You do not have to write code or match the helper signatures below. ```json { "type": "object", "properties": { "task": { "type": "string", "description": "The natural language ALFWorld task sentence to parse, e.g. 'put a clean apple in the fridge.'" }, "receptacles": { "type": "array", "items": { "type": "string" }, "description": "List of receptacle strings available in the room, each typically starting with the receptacle type name followed by an identifier, e.g. 'fridge 1', 'desklamp 2'. Used to correctly identify and de-pluralize the target receptacle type." } }, "required": [ "task", "receptacles" ], "additionalProperties": false, "description": "Kwargs for building a parsed ALFWorld task, producing the entry_point name, object_type, and target_type needed to call the appropriate household rung function." } ``` Example arguments: ```json { "task": "put a clean apple in the fridge.", "receptacles": [ "fridge 1", "countertop 1", "sinkbasin 1" ] } ``` ```python def build(**kwargs): task = kwargs['task'] receptacles = kwargs['receptacles'] entry, obj, target = parse_task(task, receptacles) return {'entry_point': entry, 'object_type': obj, 'target_type': target} ``` ## How to use it call parse_task(task_sentence, room_receptacles); returns (entry, obj, target); then call entry(w, obj, target) from alfworld_household_rungs ## Evidence (corpus named) - forged by claude-sonnet-5 for $0.11 against 400 train (task, ground-truth call) pairs: ratchet 300/300, generality gate 100/100 held-out train pairs - ALFWorld valid_unseen 134 games, parser rung alone with zero model calls + household rungs v1: 127/134; Qwen3-1.7B + rungs + parser repair: 130/134 ## Files - `scripts/skill.py`: the verified code (GET /v1/commons/rungs/rec_5b4f46bfc96244809e4cb6bc8c5dfc0a/code) - verify: POST /v1/commons/verify {"id": "rec_5b4f46bfc96244809e4cb6bc8c5dfc0a"}