CoolFace
Datasetpublic

ssaraf1/slm-workflow-planner-policy-v2

SLM Workflow Planner — Policy-Corrected Instruction Tuning Dataset (v2) Overview High-quality instruction-tuning dataset for training a Small Language Model (SLM) to serve as a workflow execution planner. The model learns to make policy-aware decisions about workflow transitions: when to proceed (NEXT), retry (RETRY), parallelize (FORK), synchronize (JOIN), or escalate (META). Key Features 648K instruction pairs across 2 stages (decision type +… See the full description on the dataset page: https://huggingface.co/datasets/ssaraf1/slm-workflow-planner-policy-v2.

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes42downloads
Dataset Card

SLM Workflow Planner — Policy-Corrected Instruction Tuning Dataset (v2)

Overview

High-quality instruction-tuning dataset for training a Small Language Model (SLM) to serve as a workflow execution planner. The model learns to make policy-aware decisions about workflow transitions: when to proceed (NEXT), retry (RETRY), parallelize (FORK), synchronize (JOIN), or escalate (META).

Key Features

  • 648K instruction pairs across 2 stages (decision type + node selection)
  • Policy-corrected labels: FORK/JOIN/META decisions are conditioned on state signals (resource pressure, parallel activity, goal progress, uncertainty), not just topology flags
  • Counterfactual negatives: Scenarios where topology suggests FORK/JOIN but state signals dictate NEXT — teaching the model true policy boundaries
  • 89 diverse workflow graphs across 8 structural families + 2 semantic workflows
  • Balanced decision distribution: NEXT ~36%, JOIN ~27%, META ~13%, FORK ~12%, RETRY ~12%

Dataset Structure

Each sample is a chat-completion format message with 3 roles:

json
{
  "messages": [
    {"role": "system", "content": "You are a workflow planner..."},
    {"role": "user", "content": "Current node: ... State: ... Eligible: ..."},
    {"role": "assistant", "content": "FORK"}
  ]
}

Stage 1: Decision Type Classification

Given current node, outcome, state signals, eligible nodes, forkable sets, and join-ready nodes → predict one of: NEXT, RETRY, FORK, JOIN, META

Stage 2: Node Selection

Given the decision type and candidates → select which node(s) to execute

State Signals

Each sample includes realistic state signals:

  • goal_progress (0→1): How close to workflow completion
  • retry_count / total_retries: Retry budget tracking
  • parallel_active / parallel_depth: Current parallelism state
  • resource_pressure (0→1): System load indicator
  • sla_pressure (0→1): Deadline urgency
  • uncertainty_level (0→1): Confidence in current path
  • cost_accrued: Cumulative cost so far
  • escalation_count: Number of escalations triggered

Policy Boundaries (What Makes This Dataset Special)

Unlike naive topology-based labeling, this dataset includes:

ScenarioTopology saysState saysLabel
Forkable set present + high resource pressureFORKDon't parallelizeNEXT
Forkable set present + already parallelFORKAlready forkedNEXT
Join-ready + low goal progressJOINToo earlyNEXT
Anomaly outcome + high uncertaintyNEXTEscalateMETA

These counterfactual samples are critical for learning policy vs topology.

Workflow Families

Generated from 89 workflows spanning:

  1. 1.Linear with optional exits
  2. 2.Retry loops
  3. 3.Fork-Join patterns
  4. 4.OR-alternative paths
  5. 5.Escalation ladders
  6. 6.Partial (k-of-n) joins
  7. 7.Conditional irreversible branches
  8. 8.Long horizon workflows
  9. 9.Semantic parallel (Insurance Claim)
  10. 10.Semantic join patterns

Intended Use

Fine-tuning SLMs (3B–7B) with LoRA for workflow planning tasks. Tested with: Qwen/Qwen2.5-7B-Instruct

Splits

SplitSamples
Train583,504
Valid32,417
Test32,417
Total648,338

Citation

Part of the Agentic Factory project — building autonomous workflow orchestration with SLM-powered planning.