Alterna · learning material
18.6. The cycle of action shall stop
The program can alternate model proposals and the results of the tools; this requires steps limitations and an understandable reason for completion.
What this material covers
- Planning becomes a budget machine.
Content and key concepts
On the previous page, the entry of the application does not equal the weight of the model.
The program can alternate model proposals and the results of the tools; this requires steps limitations and an understandable reason for completion.
The search selects fragments; the beilder adds them to the question. The memory, history and tool results have different sources. The right of action checks the program, and the cycle has to have a reason for stopping.
Для изменения рисунка включитеJavaScript; расчёт и теория доступны далее.
Planning becomes a budget machine.
Agentic system rotates the model decision, action and observation, saving trade. ReAct explores joint reasoning and action, but production exector is not obliged to disclose or store hidden chain-of-thought. Sufficiently checked state: goal, selected tool, arms, observation and stop reson. F13.
The cycle has to have an allowlist and limits of steps/time/cost.
finish
==Career==Invalid action, exhausted dudget and tool error are different terminal states. The same observation should not trigger an endless retrie without changing policy.
s
t
+
1
=
F
(
s
t
,
a
t
,
o
t
)
,
a
t
∈
A
a
l
l
o
w
e
d
,
t
<
K
.
s_{t+1}=F(s_t,a_t,o_t),\quad a_t\in A_{allowed},\quad t<K.
s
t
+
1
=
F
(
s
t
,
a
t
,
o
t
)
,
a
t
∈
A
a
ll
o
w
e
d
,
t
<
K
.
That's what the model shows.
Stepper does not show future actions in advance: each next transfer appears after observation. Budget ledger considers a model call, tool calls and elapsed time. Human appendix is a separate state, not a text request that the model itself may consider to be confirmed.
Scope of applicability.
Bunded loop limits the damage but does not make the action correct. Autonomy cannot be taken out of the length of the trade. Multi-agent labels does not create an independent check if all rolls use one source of error. Transactional action requires transactional release, confirmation and recovery outside the language model.
plan_18f=['lookup','lookup','finish']; allowed_18f={'lookup','finish'}; max_steps_18f=3
trace_18f=[]; status_18f='budget_exhausted'
for action_18f in plan_18f[:max_steps_18f]:
assert action_18f in allowed_18f
trace_18f.append(action_18f)
if action_18f=='finish': status_18f='completed'; break
assert trace_18f==plan_18f and status_18f=='completed'
The code repeats the operations just taken care of.
Completely checked Python-example Chapter
Available with a separate file; the short piece shown does not replace its implementation.
The obvious transitions and limits can stop the wrong cycle.
How do you split a big system into devices and add another kind of entry?
Python examples of Chapter 18
Academic base