Control steps
filter
Splits a list into the items that pass a per-item condition and the items that don't.
How it works
overmust produce a list. The gate runs once per item, with{{item}}and{{index}}available.- Gate it with exactly one of
where,inferordecide. See Conditions and bodies. - With
decide, the result also includes each item'sprobabilities.
When to use it
- Narrow a list before
map, so later steps only see items they can handle. - Prefer
wherewhen a field comparison decides.inferanddecidemake one model call per item; setconcurrencyto run them in parallel.
Input
Maximum infer verdicts in flight; 1 (default) evaluates one at a time.
A per-item yes/no question answered by a decision model (only when one is configured); keeps the element when its probability reaches min_confidence. Results add probabilities, aligned with over.
0 to 1; default 0.5
A decision model role; defaults to decider
The data to judge, usually {{item}}
A yes/no question about {{item}}; the element is kept on yes. One judge call per item.
Model role for infer verdicts (any configured role, standard or custom); defaults to the judge role.
The list to partition — usually a template like {{E0.issues}} that resolves to an array.
Available options: eq, ne, gt, lt, gte, lte, empty, not_empty, contains
Comparison operand (omit for empty/not_empty)
Usually a template about the current element, like {{item.status}}
Result
Later steps read these as {{<step id>.<field>}}.
How many items passed.
The items that didn't pass.
How many items didn't pass.
The items that passed, in their original order.
With decide: each item's probability, in list order.
- id: E1
tool_name: filter
input:
over: "{{input.over}}"{
"count": 2,
"dropped": [
{
"…": "…"
}
],
"dropped_count": 1,
"items": [
{
"…": "…"
},
{
"…": "…"
}
],
"probabilities": [
0.91,
0.12,
0.77
]
}