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.
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:
{
"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 completionretry_count/total_retries: Retry budget trackingparallel_active/parallel_depth: Current parallelism stateresource_pressure(0→1): System load indicatorsla_pressure(0→1): Deadline urgencyuncertainty_level(0→1): Confidence in current pathcost_accrued: Cumulative cost so farescalation_count: Number of escalations triggered
Policy Boundaries (What Makes This Dataset Special)
Unlike naive topology-based labeling, this dataset includes:
These counterfactual samples are critical for learning policy vs topology.
Workflow Families
Generated from 89 workflows spanning:
- Linear with optional exits
- Retry loops
- Fork-Join patterns
- OR-alternative paths
- Escalation ladders
- Partial (k-of-n) joins
- Conditional irreversible branches
- Long horizon workflows
- Semantic parallel (Insurance Claim)
- Semantic join patterns
Intended Use
Fine-tuning SLMs (3B–7B) with LoRA for workflow planning tasks. Tested with: Qwen/Qwen2.5-7B-Instruct
Splits
Citation
Part of the Agentic Factory project — building autonomous workflow orchestration with SLM-powered planning.
