u-10bei's picture
Upload README.md with huggingface_hub
7a0c02f verified
|
Raw
History Blame Contribute Delete
3.64 kB
metadata
license: mit
task_categories:
  - text-generation
  - conversational
language:
  - ja
  - en
tags:
  - alfworld
  - agent
  - trajectory
  - react
  - function-calling
  - multi-turn
  - synthetic
size_categories:
  - 1K<n<10K

ALFWorld Trajectory Dataset

Overview

This is a synthetic SFT (Supervised Fine-Tuning) dataset designed for agent training in ALFWorld-compatible environments. The dataset programmatically generates expert trajectories without requiring an actual ALFWorld environment or a large language model.

Key Approach

  • Template-based Simulation: Lightweight simulator based on published ALFWorld information (papers, ReAct prompt examples).
  • Subgoal Decomposition: Rule-based expert system supporting 6 task types.
  • Observation & Thought Diversity: Various templates for diversifying observation and thought texts.
  • Multiple Formats: Supports both function-calling and ReAct formats.

Key Features

Feature Description
Compatibility ALFWorld-compatible tasks and actions
Task Types 6 distinct task types: pick_and_place, clean_and_place, heat_and_place, cool_and_place, examine, pick_two
Difficulty Levels Easy, Normal, Hard (controlling exploration detours)
Trajectory Format Function-calling (also available in ReAct format)
Multi-turn Dialogue Each trajectory is a multi-turn conversation between user (observation) and assistant (thought, action)
Synthetic Data Programmatically generated, ensuring controlled and varied scenarios

Dataset Statistics

  • Total trajectories: 1,200
  • Average messages per trajectory: 24.2
  • Number of steps (turns) distribution: 9 steps (3.9%) / 11 steps (4.8%) / 13 steps (6.2%) / 15 steps (6.8%) / 17 steps (9.8%) / 19 steps (7.2%) / 21 steps (8.2%) / 23 steps (7.0%) / 25 steps (9.4%) / 27 steps (8.2%) / 29 steps (7.5%) / 31 steps (6.0%) / 33 steps (3.8%) / 35 steps (4.0%) / 37 steps (1.9%) / 39 steps (1.8%) / 41 steps (1.8%) / 43 steps (0.7%) / 45 steps (0.3%) / 47 steps (0.2%) / 49 steps (0.2%) / 51 steps (0.2%) / 53 steps (0.2%)
  • Task type distribution: clean_and_place: 200 (16.7%) / cool_and_place: 200 (16.7%) / examine: 200 (16.7%) / heat_and_place: 200 (16.7%) / pick_and_place: 200 (16.7%) / pick_two: 200 (16.7%)
  • Difficulty distribution: Easy: 209 (17.4%) / Hard: 381 (31.8%) / Normal: 610 (50.8%)

Data Format

Each line in the JSONL file is a JSON object with the following fields:

{{ # Start of outer JSON object
  "messages": [
    {{"role": "system", "content": "Interact with a household to solve a task..."}},
    {{"role": "user", "content": "You are in the middle of a room..."}},
    {{"role": "assistant", "content": "Think: I should look for apple...",
      "tool_calls": [
        {{"id": "call_1", "type": "function", "function": {{ # Inner function object
          "name": "act", "arguments": "{"action": "go to microwave 1"}"
        }}}}
      ]
    }},
    {{"role": "tool", "tool_call_id": "call_1", "content": "The microwave 1 is open..."}}
    // ... more turns
  ],
  "metadata": {{ # Metadata object
    "task_type": "heat_and_place",
    "description": "put a hot apple in/on stoveburner 1.",
    "room_type": "kitchen",
    "difficulty": "normal",
    "num_steps": 17
  }}
}}

Usage

For SFT Training

from datasets import load_dataset
ds = load_dataset("u-10bei/sft_alfworld_trajectory_dataset_v3")

for sample in ds["train"]:
    messages = sample["messages"]
    # messages is already in chat format for training

Last Updated

2026-02-10 03:47:24

License

MIT