docs: clarify the null residual for map chains with unrelated state_updates
1 file changed
+7
-4
+7
-4
@@ -1345,10 +1345,13 @@ map's `output_key`, see [`map` nodes](#map)).
|
|||||||
Two consequences of the restore step that bite in parallel super-steps:
|
Two consequences of the restore step that bite in parallel super-steps:
|
||||||
|
|
||||||
- A node with **no `state_updates`** writes nothing at all. A map branch
|
- A node with **no `state_updates`** writes nothing at all. A map branch
|
||||||
chain that never declares a write to the map's `output_key` therefore
|
chain whose nodes declare no `state_updates`/`output_schema` at all
|
||||||
fails the map at run time (the key is removed from each item's fork
|
therefore fails the map at run time (the key is removed from each item's
|
||||||
before the chain starts, so nothing is inherited), and the validator
|
fork before the chain starts, so nothing is inherited), and the validator
|
||||||
warns about it at load time. Always declare what the branch writes.
|
warns about it at load time. A chain node whose `state_updates` name
|
||||||
|
*other* keys leaves `output: null` instead, so a map with the default
|
||||||
|
`output_key: output` collects `null` — one more reason to always declare
|
||||||
|
a named `output_key` and write it explicitly.
|
||||||
- When `output` was **absent** from state before the super-step, every
|
- When `output` was **absent** from state before the super-step, every
|
||||||
LLM/agent/rag branch that has `state_updates` leaves `output: null`
|
LLM/agent/rag branch that has `state_updates` leaves `output: null`
|
||||||
behind (the restore falls back to `null`). Two or more such branches
|
behind (the restore falls back to `null`). Two or more such branches
|
||||||
|
|||||||
Reference in new issue
Block a user