Evaluated on 20 representative scenarios across Workshop and Insurance Claim domains:
1from mlx_lm import load, generate
2from mlx_lm.sample_utils import make_sampler
3
4model, tokenizer = load(
5 "Qwen/Qwen2.5-7B-Instruct",
6 adapter_path="ssaraf1/slm-workflow-planner-7b-v1"
7)
8
9messages = [
10 {"role": "system", "content": "You are a workflow planner. Given the current workflow state, eligible nodes, and topology information, classify the decision type."},
11 {"role": "user", "content": "Current node: TRIAGE_AND_ASSIGN (AGENT)\nOutcome: assigned\n\nState:\n goal_progress=0.15\n parallel_active=0\n resource_pressure=0.1\n\nEligible nodes:\n 1. VERIFY_POLICY (SYSTEM) → produces: policy_status\n 2. FRAUD_SCREENING (SYSTEM) → produces: fraud_score\n 3. DAMAGE_ASSESSMENT (AGENT) → produces: damage_report\n\nForkable sets: [{VERIFY_POLICY, FRAUD_SCREENING, DAMAGE_ASSESSMENT}]\nJoin-ready: []\n\nWhat decision type?"}
12]
13
14prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
15sampler = make_sampler(temp=0.0)
16response = generate(model, tokenizer, prompt=prompt, max_tokens=10, sampler=sampler)
17print(response) # Expected: FORK
The adapter handles both stages via the same LoRA weights.