Glossary · AI
Structured output
Also called: JSON mode, structured outputs, LLM JSON output
Structured output is a model response in a predefined, machine-readable format, typically a JSON object matching a schema, so the next steps of a workflow can use the fields directly instead of parsing prose.
A human can read "The vendor is Acme and the total looks like about $4,200." A router can't. Structured output asks the model for:
{ "vendor": "Acme Ltd", "total": 4200, "currency": "USD", "po_number": "" }and the rest of the workflow reads total like any other value.
How to get it
- Ask precisely. Name every field, its type and what to do when it's missing ("empty string, never a guess").
- Use the provider's JSON features where available. Many APIs offer a JSON mode or schema-constrained output that guarantees parseable JSON.
- Validate anyway. Parseable isn't correct. Check required fields, types and ranges against a JSON schema before any action uses the data.
- Route the failures. A response that fails validation should go to a retry or a person, not quietly continue.
Pitfalls
- Wrapping the JSON in prose or code fences ("Here's the JSON: …"). Instruct against it and strip fences defensively.
- Numbers as strings (
"4,200"). Specify "number, no currency symbols or separators". - Invented values to fill required fields. Allow empty values explicitly, or the model will make something up.
In Fluxo Flow
AI Generate steps can return JSON, which later steps read as {{input.json.field}}. A Validator node checks data against rules or a JSON schema and routes to pass or fail, so bad output never reaches a CRM or an email. Every template's AI step ends its prompt with "Reply with one JSON object only. No markdown, no code fences." and names each field.
Read next
Related terms
- JSON schemaJSON Schema is a standard vocabulary for describing what a JSON document must look like (which fields are required, their types, formats, allowed values and ranges) so data can be validated automatically.
- AI guardrailsAI guardrails are automated checks placed before or after a model call that block, correct or route away inputs and outputs that break your rules, such as banned content, leaked data or invalid formats.
- LLMAn LLM, or large language model, is a neural network trained on large amounts of text that generates text by repeatedly predicting the next token, which lets it summarize, classify, extract and draft.
- TokenA token is the unit of text a language model reads and writes, usually a word, part of a word or a punctuation mark, and the unit AI providers use to price usage and set context limits.
- Sub-workflowA sub-workflow is a workflow that another workflow calls as one of its steps, passing data in and getting a result back, so shared logic is built once and reused.
- SSO and SAMLSingle sign-on (SSO) lets people use one company identity to sign in to many applications, and SAML (Security Assertion Markup Language) is a widely used standard that carries that sign-in from the identity provider to each app.