Encode the state
The state side sees the current context plus the routing question. It produces one state embedding for this hop; it does not generate a response.
The Router turns runtime context into one ranked, legal next step. The graph owns the boundaries; the model supplies the signal.
βI need a copy of my invoice.β
The current hop becomes one embedding.
Similarity scores rank only the graph's legal targets. Bar lengths are illustrative.
The runtime checks the selected edge before execution.
ROUTER / FORWARD PATH
Routing is a classification decision with an explicit action space.
The state side sees the current context plus the routing question. It produces one state embedding for this hop; it does not generate a response.
Each legal target is an action embedding. A similarity score compares the state with every candidate, then softmax turns the scores into a ranked probability distribution.
The runtime consumes rank one and checks it against the graph. The scorer proposes; the FSM decides whether the edge can execute.
WHY THIS SPLIT MATTERS
Keep extraction, routing, and reasoning as separate observable decisions. Each one can be measured, tuned, and rejected without hiding the graphβs intent inside a single prompt.
Next: Schema extraction β