Behavior
- Returns
{text}by default. - With
output_schema, returns JSON validated against it, so every declared field is present. modelpicks a model role; omit it for the chat role.
When to use it
- Classify, extract or summarize inside a plan.
- Inside a
map, interpolate{{item}}per call instead of passing the whole list.
Input
string
required
Complete, self-contained instruction, including the data to analyze (reference earlier step results with {{Ex…}} templates, or the current element with {{item}} inside a map body).
string
Optional standing instructions sent as the system prompt instead of in the instruction. Keep it identical across calls that share it — across the items of a map, say — so the provider can cache it.
object
Optional JSON Schema for the result. When present, the output is structured JSON matching this schema instead of {text: …}. Must be an object schema: give it a top-level “type”: “object” and a “properties” map (a bare {properties, required} is coerced to object, but write the type explicitly).
enum<string>
What to do when the output still doesn’t match output_schema after the automatic fix-up: “error” (the default) fails the step; “return” hands back the output as it is, for a caller that checks it itself and retries.Available options:
error, return