Example. Token generation as a stopped environment interaction [ftip-0027]
Example. Token generation as a stopped environment interaction [ftip-0027]
A prefix tree represents token emission as a finite interaction stopped either by an end token or by a hard length cap.
Take vocabulary \(\{a,\mathtt {EOS}\}\). The terminal histories are an immediate end token, an end token after \(a\), and a length-capped history \(aa\). Their probabilities are products of the conditional token laws and sum to one. The last history terminates because the declared maximum length is reached, not because the policy emitted \(\mathtt {EOS}\).
The causal token product is given in [phuong2022formal, Section 3]. The finite representation distinguishes two stopping mechanisms. Token steps remain distinct from tool calls, and unbounded generation is outside the construction.