Key Concepts
- Structured output: A predefined format (like a form) that constrains an LLM's response to labeled fields instead of freeform text. The LLM performs the same analysis either way, but returns clean, machine-readable answers instead of paragraphs.
- Boolean: A yes/no (true/false) output. Used when the next node needs to make a binary decision or choose between two paths.
- Text (as structured output): A single word or short label returned by the LLM, typically representing a category. Not freeform prose. Examples:
urgent, billing, Spanish. - List (array): An ordered set of individual items. Used when the next node needs to loop through, count, or individually process multiple results.
Quick Reference
Design principle: Always design your structured output based on what the next node needs to receive, not what the LLM is analyzing.
Choosing the right output type:
- Boolean - Next node makes a go/no-go decision. "Did the page change?" "Is the score above threshold?"
- Number - Next node does math: comparisons, thresholds, percentage changes. Must arrive as an actual number, not digits buried in a sentence.
- Text - Next node routes or labels. Triage categories, sentiment, language detection, priority levels. Define your valid categories upfront.
- List - Next node loops, counts, or processes items individually. Keywords, competitors, issues found.
To add structured outputs in your workflow tool:
- Select the LLM node whose output feeds into another node
- Pick a structured output type from the dropdown
- Name the field descriptively
- Repeat for each field the next node requires
When your LLM nodes use structured outputs consistently, your agent produces the same shaped output every run. That predictability is what makes multi-step chains reliable.