Skip to content

Requirement→DAG: recognition-not-generation planning, sinks formalization, live HF Space - #26

Merged
jdonaldson merged 7 commits into
mainfrom
requirement-dag
Jul 5, 2026
Merged

Requirement→DAG: recognition-not-generation planning, sinks formalization, live HF Space#26
jdonaldson merged 7 commits into
mainfrom
requirement-dag

Conversation

@jdonaldson

Copy link
Copy Markdown
Owner

Can a small model translate an NL requirement into a typed plan-DAG (Agentforce/Burr framing)?

  • Burr mock: NL → validated typed plan → Burr state machine; guardrails checked BEFORE execution (naive refund plan rejected statically)
  • Generation is capacity-gated + prompt-fragile (dag_extract, N=12 ladder): 1–2/12 at 1.5–1.7B, 6/12 Phi-4-mini; branchy one-shot contaminates
  • Sinks formalization (verified 12/12 + 201/201): goals = a plan's sinks = the unique minimal generator; requirement ≡ demanded keys + guard decision-table; polarity is the NL-bound residue; sink-F1 is the honest metric; the abstraction gradient (goal-lists are HARDER to generate than full plans)
  • Recognition closes it (goal_probe): held-out unseen wordings — keys set-exact .49/.57 (1.7B/360M), polarity 9/9 vs neg-regex 0/9 on antonym negations, decision-table .45/.52 with 360M ≥ 1.7B; heads are span-composable (fork-arm assignment 54/54, no retraining)
  • Deployed: https://huggingface.co/spaces/jdonaldson/requirement-dag — one 360M forward on CPU, symbolic regress/toposort, clickable DAG → Salesforce docs, emitted Burr source, calibrated abstain. Zero tokens generated end-to-end.

Includes the merge of main's frame-family arc (both frontier entries kept).

…-> Burr

Standalone demo (no deps, no model): a closed typed action vocabulary, a
plan validator (data deps + guardrails, checked BEFORE execution), Burr
ApplicationBuilder codegen, and a mini-Burr runner with an audit trace.
Demo 1 shows a naive black-box refund plan rejected statically; demo 2
shows an eligibility-gated plan validating, executing, and emitting the
reviewable Burr source. plan_from_nl is the marked stub the probe work
replaces.
Generation ladder (SmolLM2-1.7B / Qwen2.5-1.5B / Phi-4-mini-3.8B, N=12):
whole-DAG generation is capacity-sensitive (1-2/12 at 1.5-1.7B, 6/12 Phi)
and prompt-fragile (a branchy one-shot contaminates: Phi 2->6/12 from a
disciplined two-shot). --mode regress replaces generation with symbolic
goal-regression over the typed signatures (validity-by-construction,
glue insertion solved) but disarms the dep-validator and exposes the
abstraction gradient: every model's sinks are WORSE when asked for the
goal list than for the full plan. Sink-F1/SEM-correct metrics score the
demanded outcomes (per the sinks formalization) instead of glue.
v2, sinks-framed: 201 label-by-construction requirements (54 conditional,
half neg-polarity incl. antonym negations), held-out = unseen wordings.
13 logistic heads on mean-pooled mid-stack states, layer picked by
wording-transfer (in-distribution CV picks a lexical layer that collapses
on synonyms). Held-out: keys set-exact .49/.57 (1.7B/360M) vs lexical .08;
check identity .94/.89; polarity 9/9 vs neg-regex 0/9 on the regex-blind
antonym subset; decision-table exact .45/.52 with 360M >= 1.7B —
recognition is capacity-flat where generation was capacity-gated.
A plan's goals are exactly its sinks (writes no other consumer reads;
fork guards consume their check's boolean). Checked mechanically:
regress(sinks + checks) == plan and sink-minimality on 12/12 gold plans;
corpus-label <-> sink-rule agreement 201/201. Consequences: sinks are the
unique minimal generator (the goal list is a normal form, not a
compression); goalness is relational (action x plan); polarity is the
NL-bound residue; sink-F1 is the honest generation metric.
Live at https://huggingface.co/spaces/jdonaldson/requirement-dag.
build_space_probe.py exports the SmolLM2-360M heads as a 254KB npz
(deployment heads fit on the full corpus; held-out numbers reported
separately) and evaluates clause-span arm assignment: the SAME
requirement-level key heads re-scored on span-pooled features resolve
which demanded key runs in which fork world 54/54 — the heads are
span-composable, no retraining. agentforce_space/ is the standalone
Gradio app: one 360M forward on CPU -> numpy heads -> regress/toposort
-> clickable solarized SVG DAG (nodes link to verified Salesforce
Agentforce docs) -> emitted Burr source, with a calibrated abstain path.
Zero tokens generated end to end.
@jdonaldson
jdonaldson merged commit a391e5a into main Jul 5, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant